EditPage.activationComplete() was flaky.
We have replaced it with EditPage.toolbar.waitForDisplayed().
We have run all the tests 100 times in a row in CI and it works fine.
Bug: T310772
Change-Id: I321b4114ca03ebd02a79d8bd3863ea0e68494dc2
The 'should save an edit' test is skipped because saving an edit fails
in CI because of T309712.
Bug: T296187
Bug: T309712
Change-Id: Ie4f067ed9b49a993acadaa01c953a9fe46aaae81
selenium-daily-beta-VisualEditor Jenkins daily job became really
unstable. Let's run just the simplest test for a few days to see if that
would help with job stability.
Bug: T296187
Change-Id: I858a3c5614277ea029fdabfd4468bb0d124e94d5
Looks like Selenium tests are flaky. To improve debugging:
- Move code from beforeEach hook to specs.
(Video recording happens only in specs, not in hooks.)
- Increase logLevel from error to info.
Bug: T296187
Change-Id: Iffcfae9a76085670eb8858fbcf622e596a4ff2f0
The goal is to have some tests fail if a new property is added to the
API result, but it's not stored in auto-save data.
Bug: T305225
Change-Id: I9ac328c71c616a8f33e1cfb39431cd9a665adafc
This is needed because the $params array is then passed on to
ApiEditPage, so if the hook implementer wants to alter the data used
with the edit, it needs to be able to modify the $params.
See I494d72a42d9103c28c4d44077cfe0f1269fc7b00 for an example where
GrowthExperiments would like to modify the 'tags' parameter for an
edit.
Depends-On: Idd052281898f99e4f13f241d5633294b59b29329
Bug: T304747
Change-Id: Ia4842a1593028f5fa145de167ccf9b72efa81351
A better assertion if the VisualEditor is opened would be to check for
editing toolbar instead of checking for a notices popup.
Bug: T296187
Change-Id: Ide816646254bc856b44725490c25b2b9962188c9
This allows nonexistent translated pages to fall back to the
corresponding page in a suitable language.
Bug: T299544
Change-Id: I43f461e9f595c364ecdaf2faccbd580fc0df6799
Use paction 'metadata' instead of 'parse' by default, to avoid
accidentally using VirtualRESTServiceClient when testing cases
that don't require it.
Change-Id: I02492a2dc444cf531a5c8767b0dcfe0d20ac7339
WebdriverIO has dropped support of sync mode, hence changed to async.
Update npm packages: @wdio/*, wdio-mediawiki and webdriverio
because async mode needs at least webdriverio v7.9.
Remove npm package: @wdio/sync.
Bug: T299756
Change-Id: I4a09ccddd8049f84232b035b664b42a4e98d7ff0
For readability. The current implementation is a sequence of
7 (!) array_…() function calls. It is also not free from bugs.
If one of the two inputs (ExtensionRegistry and Config) specifies
namespaces by e.g. canonical name, but the other by number,
the two are not properly merged. It should be possible to use
configuration to disable a namespace that would otherwise be
enabled. This currently works only if both use the same array
keys.
Bug: T291727
Change-Id: I2671f391cdc510da21eda8a1dc5ed4d2513a378a
This is more a proof of concept. The PHP code in this codebase
is rather small, but not trivial, and worth being covered by
tests.
Change-Id: I20c713c3c3be5d289947a343cd4fbf5256234a4a
This was caused by a bug in fixupInsertion that caused it to believe
that inserting something like "a</p><p>b</p><p>c" into the middle of an
empty paragraph was invalid.
This commit fixes the fixupInsertion bug, which fixes the
select-all-cut-paste behavior in Chrome. It's still broken in Firefox
because of selection-related issues, but I'll split that out into a
different bug report.
Change-Id: I767f5d37ec7e511778ae9ca8283ec4b26c728298
In preparation for the big extraction of Parsoid out of VisualEditor,
we'll start by moving the tests into the parsoid location.
Change-Id: I4a926ee4aad1490d4f769d44e91af80842b881f0
* When ascending back up the stack, check for a start between two closings
* Also check for an end between two openings
* This introduces code duplication but selectNodes() is full of that
already. I'll have to do a duplication cleanup soon
* Add test case for </li><li>
* Update existing test case that covered a </li>
Change-Id: Ifc80585ce0e0d6988bc54228602c69f0d519200a
This license change is aimed at maximizing the reusability of this code
in other projects. VisualEditor is more than just an awesome editor for
MediaWiki, it's the new editor for the entire internet.
Added license and author files, plus mentions of the license to all
VisualEditor PHP, JavaScript and CSS files. Parser files have not been
modified but are effectively re-licensed since there's no overriding
license information. 3rd party libraries are not changed, but are all
already MIT licensed.
Change-Id: I895b256325db7c8689756edab34523de4418b0f2
* "onevar" warning sometimes solved by just merging var statements
other times solved by making it a function declaration instead
of a function expression.
* Also fixed several '_this' variable names in ve.es.Surface to
more descriptive names, and enabled warnings for dangling _
in identifiers.
Change-Id: I7d411881e3e06cf9a7fe56d689c29375881a81de
This is just to avoid re-licensing along with VE. We want to be compatible
with MediaWiki core to make sure a closely-integrated C port is still
GPL-compatible. We could consider adding MIT to the JS implementation after
porting to C.
Change-Id: Ia83e8620e26c95625793438c4c5e8ddcf2702368
This hopefully makes it clearer that data-rt contains private round-trip info
instead of semantically interesting data.
Change-Id: I03b476ed112a4b627c9871ee3677c450f943429a