NewCheckFieldTest::testCreatingFieldGivesExpectedStrings is failing
https://integration.wikimedia.org/ci/job/mwext-testextension-php55/8375/console
This is blocking merges on the Popups extension
NewCheckFieldTest::testCreatingFieldGivesExpectedStrings is failing
https://integration.wikimedia.org/ci/job/mwext-testextension-php55/8375/console
This is blocking merges on the Popups extension
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Declined | Jdlrobson | T111329 [GOAL] Page previews on mobileweb | |||
Resolved | phuedx | T133947 [EPIC] Reduce bloat of Page Previews RL module(s) | |||
Resolved | Jdlrobson | T144522 [EPIC] Hovercards technical debt and quality enhancements | |||
Resolved | Jdlrobson | T67103 [EPIC] Hovercards: Test Coverage | |||
Resolved | Jdlrobson | T133020 Unit test ext.popups.core.js | |||
Invalid | None | T133055 Split ext.popups.settings.js in units | |||
Resolved | phuedx | T133025 Unit test ext.popups.settings.js | |||
Resolved | phuedx | T133054 Create browser test for add footer link in ext.popups.settings.js | |||
Resolved | Jdlrobson | T133163 BetaFeatures test failure |
This was broken by https://gerrit.wikimedia.org/r/#/c/280884/4
Seems this fix surfaced an error in the test...
Merged the patch as this was blocking work and the test does seem wrong, but this needs following up.
So the real problem was that the test never called $form->loadData(). Before https://gerrit.wikimedia.org/r/#/c/280884/ that resulted in treating all field values as null, whether or not the field had a default value; after that patch the default value is used. (Not calling loadData is an error so the change does not affect correct uses of HTMLForm.) The assertions simply codified the wrong result.
Change 285011 had a related patch set uploaded (by Gergő Tisza):
NewHTMLCheckField fixes
Change 285012 had a related patch set uploaded (by Gergő Tisza):
Make HTMLCheckField::loadDataFromRequest always return a boolean
Also, PHP sadness of the week award goes to array access handling which quietly returns null if the accessed variable is not an array, even in strict mode.
Change 285013 had a related patch set uploaded (by Gergő Tisza):
Handle null data return in HTMLForm
Change 285012 merged by jenkins-bot:
Make HTMLCheckField::loadDataFromRequest always return a boolean
Seems to have resurfaced...! :-O
https://integration.wikimedia.org/ci/job/mwext-testextension-hhvm/10496/console
Change 285623 had a related patch set uploaded (by Gergő Tisza):
Make sure HTMLForm::$mFieldData is always an array
Change 285623 merged by jenkins-bot:
Enforce calling HTMLForm::prepareForm before displayForm
Change 285764 had a related patch set uploaded (by Jdlrobson):
Fix failing BetaFeatures unit tests by using prepareForm
Change 285764 merged by jenkins-bot:
Fix failing BetaFeatures unit tests by using prepareForm
@Tgr and @Jdlrobson's changes are merged, which allowed the relevant change against Page-Previews (284873: Add missing mw.popups.selectPopupElements test case) to be merged.