Otherwise the changes to mw.widgets.TitleWidget in
Iec338e9f595b452c19ce8e74eb81339fbce11640 cause the test to fail.
To avoid making real API requests, use fake server instead.
Change-Id: I7ff705af79760e33200a2dfbfdd05138c18bb110
According to ECMAScript, .trim() and RegExp’s "\s" capture the same
characters, so I replace the initial "\s*" by .trim() to remove
whitespaces and line terminators at the beginning and at the end.
Bug: T371000
Change-Id: Id9188f97a3136b986b052b71cd4079c1109ea8ff
This can be reenabled once Cite changes are merged.
The disabled test is also updated in this patch so that it will pass
with the new Cite code.
Bug: T370512
Change-Id: I56b52c399d2c76689fdcb0bc7fd50a8c0ced28fd
Without this, wheneve VE is installed, test execution ends with the
address bar rewritten to Special:Badtitle, which affects reloads etc
and makes debugging anything else harder.
Bug: T250045
Change-Id: Ic453ae388c842369ff1cb1e84dcad4a8bbc7d54f
transitionend is supported by all our target browsers.
Also use requestAnimationFrame without a fallback as
this is also supported by all browsers.
Change-Id: I563cacdc8b2365ad4b69dfccb7e46a9f176dbd9b
The following rules are failing and were disabled:
* modules/ve-mw/tests:
* implicit-arrow-linebreak
Change-Id: If857233c0de24c8cf619dbb1347ebb375f3ab1ba
I'm going to assume the order in production with Chrome, as asserted
by the unit test, is the preferred order whereby negative numbers are
intended to be prepended before the positive numbers.
This came up in I6ecbd5743f3e, where this was the only unit test across
MediaWiki core and WMF gated extensions, that fails in Firefox.
It is reproducible locally with plain MW core + VisualEditor as well.
Bug: T366299
Change-Id: I6f8546e6e604cbb41e11bd2b59f8b5f19350c676
* Remove need for manual hacking of sub groups via "msg" strings
carefully prepended to every assertion.
* Improve CI details, by reporting the specific case that failed,
and local dev via ability to re-run each case, and reporting names
directly in the HTML Reporter and CLI summary.
* Reduce need for assert.async() and tracking of callbacks, especially
to improve failure details in case of Promise rejection.
Current logic was likely to cause a confusing timeout instead of a
clear failure if the promise ends up rejected.
QUnit propagates these as part of awaiting and asserting the test
closure's promise value (as async fn) automatically.
This approach also avoids the pitfal of a falsely passing test
when an assertion inside a done() handler was never reached.
* Use modern for-of where possible to remove need for closures and
arrow functions. Thus reducing complexity of test code, where
complexity should be kept lowest to avoid false confidence.
* Use plain for-in instead of overly complex Object.keys().forEach().
Change-Id: I934a266e75e64371081f104cfb867fb2c282c84a
Since Parsoid now treats DEFAULTSORT like any other template, we have to
scan mw:Transclusion spans.
Bug: T337398
Change-Id: Icba92fc14c1c56ec4711ba49407e8be368d57842
The observation that the href for wrappers with mw-file-description
class will be the same as the resource still holds. However, on the
other end, if the href is null, setting it to resource doesn't work.
Timed media and when the "|link=|" media option is used, result in an
imgWrapper that's just a span and wouldn't have an href.
This patch fixes a dirtying of timed media in galleries that was
preventing selser from being used. Note, that <source>s in <audio> and
<video> tags are still dropped, so selser won't work yet.
Change-Id: Iefc520b8513e833665dae9d5c3a9dca2762264a6
Follow up to I02ea8421e468635ba6297bb5cda488a5a79c9a1d the depends on
I7a5c24f6ffc15ff0455adf5b025b695ee71501b6 in Parsoid.
Note that the mediaTag isn't currently being passed around for gallery
image nodes so, for example, a <video> becomes an <img> as is. But,
that's independent of this patch, and a follow up will fix it.
Noted in T348703#9278332
Bug: T348703
Bug: T214603
Change-Id: I5f7d3dfe0a41fac1568c97dccc41209c14e741d0
Use MediaWiki core helpers to provide intro messages (including edit
notices), initial page content, and CSS classes for the edit area.
The following intro messages were previously unimplemented,
and will be shown now:
* 'sharedupload-desc-create'
* 'sharedupload-desc-edit'
The following intro messages were previously unimplemented,
but they only apply to pages where VE should never be available,
and will be shown now when editing those pages with 2017WTE:
* 'code-editing-intro'
* 'talkpagetext'
The following intro messages were previously unimplemented,
and are now explicitly skipped:
* 'editpage-head-copy-warn'
The following intro messages were previously unimplemented,
but they only apply to pages where neither VE nor 2017WTE should
ever be available:
* 'userinvalidconfigtitle'
* 'usercssyoucanpreview'
* 'userjsonyoucanpreview'
* 'userjsyoucanpreview'
Depends-On: If0b05710cb52a977bf4e85947d72d68683a0a29e
Bug: T201613
Change-Id: If26e39e383b983f7ee834ed6dd73b80e0545b068
Target#actionsToolbar and Target#toolbar refer to the same object
since change dfaed62d3632d381db9682c603b3ddbeed182292 in VE/VE
(barring bugs like T335469). Once we no longer use the old name,
we'll be able to remove this backwards-compatibility alias.
Bug: T335469
Change-Id: I577e8ae6a857519eb0e8181543ca0a96b515e019
It appears like this was never tested.
Now that it is covered it's much easier to play around with the
implementation and compact it a bit.
Change-Id: Ie9cc14082f69e7240380d352fb362d0a3fa4d341