Commit graph

15 commits

Author SHA1 Message Date
C. Scott Ananian 248e886dc0 Use class instead of id for scribunto errors
This avoids having multiple HTML elements with the same `id` attribute
when certain Scribunto errors reoccur more than once on the same page.

Bug: T375539
Change-Id: I123a0f0046a616f63506f096651ae917bbc65cc5
2024-09-24 15:47:25 -04:00
Bartosz Dziewoński c6b1f32dff Update parser tests for new heading HTML
Bug: T13555
Depends-On: I1180169a8e83af834c2984ba16089e6277f2a8dd
Change-Id: I4d2be132e63aff7bf8953f0f371e806a834db10d
2024-05-16 16:35:58 +00:00
C. Scott Ananian f89e892a06 Fix parsoid parserTests
These errors weren't being flagged because of a bug in how
`parsoid-compatible` was handled in the parser test file options.
See Ifca13393c3bbec27c23cbdc311d4550fbccf21ca.

Change-Id: Ib65dd0adb472da53823c07af5991a140374501e4
2024-02-01 16:45:12 -05:00
DannyS712 e30641e439 Add redirects for modules
ScribuntoContent now supports content being redirects, if the underlying
ScribuntoEngine does so. For Lua, a redirect looks like:

    return require [[Module:Foo]]

which also happens to be perfectly valid Lua. There is intentionally no
`#REDIRECT`-style token (like in wikitext/JavaScript/CSS) because no one
will create a page with this content except for the purposes of a
redirect.

Bug: T120794
Co-Authored-By: DannyS712 <DannyS712.enwiki@gmail.com>
Co-Authored-By: C. Scott Ananian <cscott@cscott.net>
Co-Authored-By: Jackmcbarn <jackmcbarn@gmail.com>
Change-Id: I405e7953d00af8a34d5e8addc61a245732c71e8e
2023-12-13 17:34:30 -05:00
C. Scott Ananian 1eea8281c9 Assign UUIDs to Scribunto errors independent of page parse order
This replaces the use of ParserOutput::addJsConfigVars(), deprecated
since 1.38, and ensures that the IDs used for error messages are
independent of page parse order. (See T300979.)

This is an improved replacement for Ibd3fbcbc774491179b0d4fe29ba3b6a128220703
which was reverted (T346094).

Bug: T300307
Bug: T305161
Bug: T346094
Change-Id: I2c660972b289bbad730ceee1325d70d5ba75d27e
2023-10-13 15:23:22 +00:00
Subramanya Sastry 23ac31e746 Add Parsoid-specific support for handling preprocessed nowikis
* This patch builds on core functionality provided in
  Ied0295feab06027a8df885b3215435e596f0353b.

* This removes any nowiki wrappers present in unstripped text
  (which there would be for preprocssed nowiki tags) which mimics
  the effect of procssing nowikis in core when generating HTML.

* Updated lua tests to verify the new expectation.

* A previously failing parser test added to test T272507 now passes
  and has been re-enabled.

Bug: T272507
Depends-On: Ied0295feab06027a8df885b3215435e596f0353b
Change-Id: I1613ac7bd60cf3ef4a3308b08ea3705b3cf2dee0
2022-09-08 23:17:46 +00:00
Subramanya Sastry 3aa6ad45db Temporarily disable the newly added test in f230419b
* This test fails with a core patch and will only pass in a
  subsequent patch in this repo.

Needed-By: Ied0295feab06027a8df885b3215435e596f0353b
Change-Id: Id6ea611549e98893f53094116a3851e9c42b8dc8
2022-09-01 21:24:25 +00:00
Arlo Breault 7778a6eef3 Revert "Disable Parsoid testing tempoarily"
This reverts commit 2c3a363cdc.

Depends-On: I7c419e1d508c337328db1d5132454fb805bfb1b5
Change-Id: I1770656d450ee0ba0ca115993812c06116eb5928
2022-09-01 21:08:20 +00:00
Subramanya Sastry 2c3a363cdc Disable Parsoid testing tempoarily
* Running into a missing module error in CI but cannot reproduce
  locally.

* Let us unbreak CI for other dependent repos and investigate this
  in the followup patch that reverts this.

Bug: T316331
Change-Id: Ic5983e503203f132fff521e422f0c7143f91d779
2022-08-26 14:57:48 +00:00
Subramanya Sastry f230419baf Enable testing with Parsoid + add failing test for T272507
* Turned on wt2html and wt2wt Parsoid modes for all tests with
  aggressive normalization to eliminate the need to add html/parsoid
  sections.

  We expect these modes to pass.

* The failing wt2wt tests is because the input wikitext duplicates
  arguments and Parsoid's wt2html doesn't capture duplicate template
  args which cause the wt2wt output to be normalized.

  This explains the two failing wt2wt tests and the corresponding
  selser "failures".

* The failing wt2html safesubst test might be a real failure and
  something we will have to look into. Will file a phab task for this.

* Added a new test for T272507 that fails with Parsoid right now,
  but will pass in a subsequent patch.

Change-Id: I96fba68dda7524d2fe562eb60ced64e5e0518f65
2022-08-22 13:27:20 -05:00
Bartosz Dziewoński ca57230318 Update parser test
Test output changed in I3fac0f34d134d8eec46c7eefa3ad2b67abb957da.

Depends-On: I3fac0f34d134d8eec46c7eefa3ad2b67abb957da
Change-Id: I8797ab1adbd44b2766ec803d9b6fe646b3a5a116
2022-06-22 18:37:34 +00:00
Bartosz Dziewoński dbbf202d43 Temporarily disable failing parser test
Test output will change in I3fac0f34d134d8eec46c7eefa3ad2b67abb957da.

Change-Id: Idbf0b95a3c0b04caa056b71dd08f46659920114a
2022-05-14 02:43:08 +02:00
C. Scott Ananian 5565d3d3d2 Update parserTests to v2 (tidy by default)
Bug: T174199
Bug: T249194
Change-Id: I23ccb612c940b98ca9da46a2e0848ccfe70e695d
2020-04-02 13:50:52 -04:00
Arlo Breault cd9de940eb Update tests to match parser changes
Bug: T208070
Bug: T218702
Depends-On: I8b6a8c8241a8766fdccdcac45553298fa23a5046
Change-Id: I15c81a2c15311406b643fee5ec0ae597c1887b3f
2019-03-19 13:38:48 -04:00
Jayprakash12345 7da38c8e10 Update extensions to take advantage of parser test autodiscovery
Bug: T170037
Change-Id: Ifeffbf7a27dfd4915998159617d37d4d9b9a1c17
2018-04-13 15:07:17 +00:00