Page MenuHomePhabricator

EntitySchema CI broken: EntitySchemaEditActionTest::testShowWarningForAnonymousUsers: anonymous edit warning is unexpectedly absent
Closed, ResolvedPublic

Description

First seen in daily CI and also happens on Gerrit (build):

There was 1 failure:

1) EntitySchema\Tests\Integration\MediaWiki\Actions\EntitySchemaEditActionTest::testShowWarningForAnonymousUsers
anonymous edit warning is unexpectedly absent
Failed asserting that '<div class='mw-htmlform-ooui-wrapper oo-ui-layout oo-ui-panelLayout'><form action='/index.php?title=E1&amp;action=edit' method='post' enctype='application/x-www-form-urlencoded' class='mw-htmlform mw-htmlform-ooui oo-ui-layout oo-ui-formLayout'><input type="hidden" value="E1" name="title">\n
<div id='ooui-php-6' class='mw-htmlform-field-HTMLTextAreaField oo-ui-layout oo-ui-fieldLayout oo-ui-fieldLayout-align-top' data-ooui='{"_":"mw.htmlform.FieldLayout","fieldWidget":{"tag":"mw-input-wpschema-text"},"align":"top","helpInline":true,"$overlay":true,"classes":["mw-htmlform-field-HTMLTextAreaField"]}'><div class='oo-ui-fieldLayout-body'><span class='oo-ui-fieldLayout-header'><label for='ooui-php-1' class='oo-ui-labelElement-label'></label></span><div class='oo-ui-fieldLayout-field'><div id='mw-input-wpschema-text' class='oo-ui-widget oo-ui-widget-enabled oo-ui-inputWidget oo-ui-textInputWidget oo-ui-textInputWidget-type-text oo-ui-textInputWidget-php' data-ooui='{"_":"OO.ui.MultilineTextInputWidget","rows":25,"name":"wpschema-text","inputId":"ooui-php-1","required":false}'><textarea tabindex='0' name='wpschema-text' rows='25' id='ooui-php-1' class='oo-ui-inputWidget-input'></textarea><span class='oo-ui-iconElement-icon oo-ui-iconElement-noIcon'></span><span class='oo-ui-indicatorElement-indicator oo-ui-indicatorElement-noIndicator'></span></div></div></div></div><div id='ooui-php-7' class='mw-htmlform-field-HTMLTextField oo-ui-layout oo-ui-fieldLayout oo-ui-fieldLayout-align-top' data-ooui='{"_":"mw.htmlform.FieldLayout","fieldWidget":{"tag":"mw-input-wpedit-summary"},"align":"top","helpInline":true,"$overlay":true,"classes":["mw-htmlform-field-HTMLTextField"]}'><div class='oo-ui-fieldLayout-body'><span class='oo-ui-fieldLayout-header'><label for='ooui-php-3' class='oo-ui-labelElement-label'></label></span><div class='oo-ui-fieldLayout-field'><div id='mw-input-wpedit-summary' class='oo-ui-widget oo-ui-widget-enabled oo-ui-inputWidget oo-ui-textInputWidget oo-ui-textInputWidget-type-text oo-ui-textInputWidget-php' data-ooui='{"_":"OO.ui.TextInputWidget","name":"wpedit-summary","inputId":"ooui-php-3","required":false}'><input type='text' tabindex='0' name='wpedit-summary' value='' id='ooui-php-3' class='oo-ui-inputWidget-input' /><span class='oo-ui-iconElement-icon oo-ui-iconElement-noIcon'></span><span class='oo-ui-indicatorElement-indicator oo-ui-indicatorElement-noIndicator'></span></div></div></div></div><div id='ooui-php-8' class='mw-htmlform-field-HTMLInfoField oo-ui-layout oo-ui-fieldLayout oo-ui-fieldLayout-align-top' data-ooui='{"_":"mw.htmlform.FieldLayout","fieldWidget":{"tag":"mw-input-wp0"},"align":"top","helpInline":true,"$overlay":true,"classes":["mw-htmlform-field-HTMLInfoField"]}'><div class='oo-ui-fieldLayout-body'><span class='oo-ui-fieldLayout-header'><label id='ooui-php-4' class='oo-ui-labelElement-label'></label></span><div class='oo-ui-fieldLayout-field'><label id='mw-input-wp0' aria-labelledby='ooui-php-4' class='oo-ui-widget oo-ui-widget-enabled oo-ui-labelElement-label oo-ui-labelElement oo-ui-labelWidget' data-ooui='{"_":"OO.ui.LabelWidget","label":{"html":"&lt;div&gt;&lt;\/div&gt;"}}'><div></div></label></div></div></div><div id='ooui-php-9' class='mw-htmlform-field-HTMLInfoField oo-ui-layout oo-ui-fieldLayout oo-ui-fieldLayout-align-top' data-ooui='{"_":"mw.htmlform.FieldLayout","fieldWidget":{"tag":"mw-input-wp0"},"align":"top","helpInline":true,"$overlay":true,"classes":["mw-htmlform-field-HTMLInfoField"]}'><div class='oo-ui-fieldLayout-body'><span class='oo-ui-fieldLayout-header'><label id='ooui-php-5' class='oo-ui-labelElement-label'></label></span><div class='oo-ui-fieldLayout-field'><label id='mw-input-wp0' aria-labelledby='ooui-php-5' class='oo-ui-widget oo-ui-widget-enabled oo-ui-labelElement-label oo-ui-labelWidget' data-ooui='{"_":"OO.ui.LabelWidget"}'></label></div></div></div><input id="wpEditToken" type="hidden" value="+\" name="wpEditToken">\n
<input id="mw-input-wpbase-rev" name="wpbase-rev" type="hidden" value="0">\n
<div class="mw-htmlform-submit-buttons">\n
<span class='oo-ui-widget oo-ui-widget-enabled oo-ui-inputWidget oo-ui-buttonElement oo-ui-buttonElement-framed oo-ui-labelElement oo-ui-flaggedElement-primary oo-ui-flaggedElement-progressive oo-ui-buttonInputWidget'><button type='submit' tabindex='0' accesskey='accesskey-save' name='wpSave' value='savechanges' class='oo-ui-inputWidget-input oo-ui-buttonElement-button'><span class='oo-ui-iconElement-icon oo-ui-iconElement-noIcon oo-ui-image-invert'></span><span class='oo-ui-labelElement-label'>savechanges</span><span class='oo-ui-indicatorElement-indicator oo-ui-indicatorElement-noIndicator oo-ui-image-invert'></span></button></span></div>\n
</form></div>' contains "entityschema-anonymouseditwarning".

/workspace/src/extensions/EntitySchema/tests/phpunit/integration/MediaWiki/Actions/EntitySchemaEditActionTest.php:177
phpvfscomposer:///workspace/src/vendor/phpunit/phpunit/phpunit:106

Event Timeline

This is caused by a core change; git bisect says Remove getText usages in the vicinity of MessageCache is the first bad commit. (Which sounds plausible at a glance – it is at least message-related.)

The good news is that this seems to be a test-only breakage – the anonymous edit warning is still shown when actually loading the edit page. (Note that temporary accounts must be disabled for this.)

I’m confused by that HTML… it looks pretty much like the HTML for the form is supposed to look, except all the messages are just missing? Empty <label></label> etc.

Change #1090874 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/EntitySchema@master] Update mocks for core change

https://gerrit.wikimedia.org/r/1090874

Change #1090874 merged by jenkins-bot:

[mediawiki/extensions/EntitySchema@master] Update mocks for core change

https://gerrit.wikimedia.org/r/1090874