The changes from I39f9b994ce5636d70fea2e935a7c87c7d56dcb26 also make
most of the broken tests pass again.
Change-Id: I165f36235b47dee4bcef115e518bc1e81d2f83a5
We originally used 'templates' because it seemed like an obvious
choice for HTML files, and because 'packageFiles' requires extra code
to include anything that isn't a .js or .json file.
However, the templates are expected to be HTML fragments rather than
whole documents, and they are parsed in a particular way that takes a
lot of code to clean up (which we needed to do, because we use the
same test files for testing PHP code).
I tried doing it in the 'packageFiles' way, and the extra code doesn't
seem that bad in comparison after all. Moreover, the 'templates'
mechanism (when used the intended way) feels vaguely deprecated in
favor of Vue.js, and I'd rather move away from it.
This makes the tests faster too (probably mostly thanks to the removal
of the clean up code) – on my machine they go from 1800ms to 1500ms.
(Simplify linearWalk tests, as we no longer need to do weird things
with document fragments to get consistent outputs in PHP and JS.)
Change-Id: I39f9b994ce5636d70fea2e935a7c87c7d56dcb26
This fixes tests in modifier.test.js. The old parser tests
in parser.test.js are currently skipped.
Change-Id: If1fa8055b3cb6c6b43420ab40dd51af79fa083d9
Exposes that the old parser tests are asserting 0 comments added.
The tests are passing becaause testUtils.getThreadContainer returns
the empty string for both actual and expected.
Change-Id: I263a258a8db5c35a6fb1fc5ce281f902fc543038
Part of my secret plan to delete ApiParsoidTrait.
* Inject RevisionLookup into ApiVisualEditor
* Use RevisionLookup::getRevisionById instead of ApiParsoidTrait::getValidRevision
* Use RevisionLookup::getRevisionByTitle instead of ApiParsoidTrait::getLatestRevision
* Use standard MediaWiki error messages
Change-Id: I7244ee4916fb011fad5faa1d9f837e83f6ac2dc1
Follow-up to I8cf8b6960533718646189263acabc852ea976416, where the ...
was unintendedly removed.
Also switch to a suppression, because the type should be documented in
ParsoidClient, rather than enforced in callers. We will remove the
suppression once the documentation is updated.
Change-Id: I3ee2534959c8375d29f43e8391894f0a2002ae1c
Consistent with core, most WMF extensions, and boilerplate as
documented in extensions/README and elsewhere; as per T316722.
Change-Id: I02cfcb2bd3debf877d1cbf8654dff4a98dd354ad
Follow-up to d0126ce6de which made them
default-on for all mobile. These two taken together mean that the
mobile visual enhancement features now *only* depend on this config,
rather than on whether the individual features are enabled on desktop.
Bug: T318871
Change-Id: If767753e6d33f19bbc540d4e74273e478198388c
Pages can be empty (blanked) without outputting the noarticletext
class, so just suppress the top border if the banner is the first
child of the document.
Change-Id: I808160a7f73a9a976d25e77f4bd47727a57b70c0