Commit graph

16 commits

Author SHA1 Message Date
Umherirrender
f27c2433bb tests: Use namespaced classes (2)
Changes to the use statements done automatically via script
Addition of missing use statement done manually

Change-Id: I4ff4d0c10820dc2a3b8419b4115fadf81a76f7a2
2024-06-13 23:21:02 +02:00
James D. Forrester
c020d4972c tests: Provide initial coverage of HTMLSelectNamespace
Change-Id: I0dfc52851ae5d64dc13494b4f2c55e0d5b9bef0e
2024-05-05 22:43:36 +03:00
James D. Forrester
63f55bcac7 HTMLFormFieldTestCase: Provide assertHTMLEqualStrippingWhitespace to simplify tests
Change-Id: I412269af7363fc2d977dd628d41f283a166706cc
2024-05-05 22:43:25 +03:00
James D. Forrester
f784a12c3d HTMLButtonFieldTest: Test regular HTML output
Bug: T359166
Change-Id: I3b11f4389ed135d85bd0dd4148b8c0a0b1eecc9e
2024-04-08 16:42:58 -04:00
James D. Forrester
30817d8283 HTMLButtonFieldTest: Also test OOUI HTML output
Bug: T359166
Change-Id: Iaa30ad82f26e1ab8aec7b2dd4c03c92a8c940944
2024-04-08 16:22:23 -04:00
James D. Forrester
c5d9074dda HTMLFormFieldTestCase: Allow for OOUI tests to be run, too
To start emitting OOUI server-side widgets, first one has to select the
target theme. For our test purposes, the BlankTheme suffices.

Follow-up to 620c556c2c.

Bug: T359166
Change-Id: I667b8c45cf22a1dd97814d7d85b208243d83d59a
2024-04-08 16:22:23 -04:00
jenkins-bot
a924c64170 Merge "tests: Add HTML output tests for HTMLRadioField" 2024-04-08 18:28:38 +00:00
jenkins-bot
929dede050 Merge "tests: Add HTML output tests for HTMLButtonField" 2024-04-08 18:25:58 +00:00
Roan Kattouw
2143c2a596 tests: Add HTML output tests for HTMLRadioField
Bug: T361031
Change-Id: Idde0eab221ef53f14e03b2464e13c9f1dab7b71a
2024-04-08 18:01:43 +00:00
Roan Kattouw
ffcef002d5 tests: Add HTML output tests for HTMLButtonField
Bug: T361031
Change-Id: I6274fe928c377b2bd3034b2a43bcd6a79d75b30c
2024-04-08 18:01:09 +00:00
Roan Kattouw
11ff3154cc tests: Add HTML output tests for HTMLCheckField
Bug: T361031
Change-Id: I41bb66123526ee90bba693017251c95f95d61544
2024-04-08 18:00:27 +00:00
Roan Kattouw
620c556c2c tests: Add test case class for HTMLFormField HTML output tests
Bug: T361031
Change-Id: I04aee7b96aa0fcb18f5ce84f08c35ad11b313349
2024-04-08 13:36:37 -04:00
Timo Tijhof
05c2b0dca0 Html,Xml: Widen @covers tags
> We lose useful coverage and waste valuable time on keeping tags
> accurate through refactors (or worse, forget to do so).
>
> Tracking tiny per-method details wastes time in realizing (and
> fixing) when people inevitably don't keep them in sync, and time
> lost in finding uncovered code to write tests to realize it was
> already covered but "not yet claimed".
>
> Given all used methods are de-facto and liberally claimed, and
> that we keep the coverage limited to the subject class, this
> maintains the spirit and intent. PHPUnit offers a more precise
> tool when you need it (i.e. when testing legacy monster classes),
> but for well-written code, the class-wide tag suffices.

Ref https://gerrit.wikimedia.org/r/q/owner:Krinkle+is:merged+message:Widen

Change-Id: I60151a0f5a811763fe326e92a18d3dcba8082761
2024-03-30 21:48:32 +00:00
Bartosz Dziewoński
dd992c1a7d Remove $wgHTMLFormAllowTableFormat and its uses
Described as "Evil hack for mobile :(", this config variable had been
overridden in the MobileFrontend extension for some time, but this has
been removed last year in Icb1711a0cef828dda0d99b8a7c7963bc409816c9.

Since it was introduced, most HTMLForms using the 'table' format have
been reworked to use 'ooui' (or 'codex', these days), so the hack is
no longer needed.

We recently removed $wgUseMediaWikiUIEverywhere for similar reasons
in aa7eeeeef9 / be135c0fc0.

Change-Id: Id507c0dc5a1c1cfb9737073bae97b14badc30a54
2024-03-26 22:49:55 +01:00
James D. Forrester
34965561cb tests: Add coverage for various trivial HTMLForm methods
- addPreHtml
- addPreText
- setIntro

- setPostHtml
- getPostHtml
- setPostText
- addPostText

- setCollapsibleOptions

Bug: T359166
Change-Id: Icd5b43721a87481bcf4fbffab8b2d4e681365cda
2024-03-10 13:23:07 -04:00
James D. Forrester
ff911bf2ff tests: Namespace and consolidate existing HTMLForm tests
This doesn't alter code coverage, but it puts all the tests in
one place so we can improve them consistently.

Change-Id: I5e2124704aa8dc4b45be17d61fbc2fbd606661b9
2024-03-08 08:11:16 -05:00