Page MenuHomePhabricator

DiscussionTools tests blocking merges in the CheckUser extension
Closed, ResolvedPublicBUG REPORT

Description

All changes to the CheckUser repo are currently blocked by failing DiscussionTools tests. For example, https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CheckUser/+/1245267?tab=checks has some DiscussionTools tests failing consistently

The logs are too long to paste here, but here are some of the failing tests:

08:53:14 18) MediaWiki\Extension\DiscussionTools\Tests\CommentFormatterTest::testAddDiscussionToolsInternal with data set #52 ('Heading with inline styles (oldparser)', 'Talk:Heading_with_styles', 'cases/heading-style-oldparser...r.html', 'cases/heading-style-oldparser...e.html', '../data/enwiki-config.json', '../data/enwiki-data.json', true, true)
08:53:14 Heading with inline styles (oldparser)
08:53:14 Failed asserting that two strings are equal.
08:53:14 --- Expected
08:53:14 +++ Actual
08:53:14 @@ @@
08:53:14 -'<div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><section class="mf-section-0" id="mf-section-0"></section><div class="mw-heading mw-heading2 ext-discussiontools-init-section section-heading" onclick="mfTempOpenSection(1)"><span class="indicator mf-icon mf-icon-expand mf-icon--small"></span><h2><span class="mw-headline" id="Hello" data-mw-thread-id="h-Hello"><span data-mw-comment-start="" id="h-Hello"></span>Hello<span data-mw-comment-end="h-Hello"></span></span></h2></div><section class="mf-section-1 collapsible-block" id="mf-section-1">\n
08:53:14 -</section><h2 style="border: 1px solid green; background: lightgreen; padding: 5px; font-size: 1.5em;" class="section-heading" onclick="mfTempOpenSection(2)"><span class="indicator mf-icon mf-icon-expand mf-icon--small"></span><span id="Hello.21"></span><span class="mw-headline" id="Hello!" data-mw-thread-id="h-Hello!"><span data-mw-comment-start="" id="h-Hello!"></span>Hello!<span data-mw-comment-end="h-Hello!"></span></span></h2><section class="mf-section-2 collapsible-block" id="mf-section-2">\n
08:53:14 -</section></div>\n
08:53:14 +'<div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2><span class="mw-headline" id="Hello" data-mw-thread-id="h-Hello"><span data-mw-comment-start="" id="h-Hello"></span>Hello<span data-mw-comment-end="h-Hello"></span></span></h2></div>\n
08:53:14 +<h2 style="border: 1px solid green; background: lightgreen; padding: 5px; font-size: 1.5em;"><span id="Hello.21"></span><span class="mw-headline" id="Hello!" data-mw-thread-id="h-Hello!"><span data-mw-comment-start="" id="h-Hello!"></span>Hello!<span data-mw-comment-end="h-Hello!"></span></span></h2>\n
08:53:14 +</div>\n
08:53:14  \n
08:53:14  <pre>newestComment: null\n
08:53:14  {\n
08:53:14 
08:53:14 /workspace/src/extensions/DiscussionTools/tests/phpunit/CommentFormatterTest.php:152
08:53:14 
08:53:14 19) MediaWiki\Extension\DiscussionTools\Tests\CommentFormatterTest::testAddDiscussionToolsInternal with data set #55 ('Heading with inline styles (parsoid)', 'Talk:Heading_with_styles', 'cases/heading-style-parsoid/h...d.html', 'cases/heading-style-parsoid/h...e.html', '../data/enwiki-config.json', '../data/enwiki-data.json', true, true)
08:53:14 Heading with inline styles (parsoid)
08:53:14 Failed asserting that two strings are equal.
08:53:14 --- Expected
08:53:14 +++ Actual
08:53:14 @@ @@
08:53:14 -'<section class="mf-section-0" id="mf-section-0"><section data-mw-section-id="0" id="mwAQ"></section><section data-mw-section-id="-1" id="mwAg"><div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="Hello" data-mw-thread-id="h-Hello"><span data-mw-comment-start="" id="h-Hello"></span>Hello<span data-mw-comment-end="h-Hello"></span></h2></div>\n
08:53:14 +'<section data-mw-section-id="0" id="mwAQ"></section><section data-mw-section-id="-1" id="mwAg"><div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="Hello" data-mw-thread-id="h-Hello"><span data-mw-comment-start="" id="h-Hello"></span>Hello<span data-mw-comment-end="h-Hello"></span></h2></div>\n
08:53:14  \n
08:53:14  </section><section data-mw-section-id="-1" id="mwAw"><h2 style="border: 1px solid green; background: lightgreen; padding: 5px; font-size: 1.5em;" id="Hello!" data-mw-thread-id="h-Hello!"><span data-mw-comment-start="" id="h-Hello!"></span><span id="Hello.21" typeof="mw:FallbackId"></span>Hello!<span data-mw-comment-end="h-Hello!"></span></h2></section>\n
08:53:14  <pre>newestComment: null\n
08:53:14 @@ @@
08:53:14  		}\n
08:53:14  	]\n
08:53:14  }\n
08:53:14 -</pre></section>\n
08:53:14 +</pre>\n
08:53:14  '
08:53:14 
08:53:14 /workspace/src/extensions/DiscussionTools/tests/phpunit/CommentFormatterTest.php:152
08:53:14 
08:53:14 20) MediaWiki\Extension\DiscussionTools\Tests\CommentFormatterTest::testAddDiscussionToolsInternal with data set #58 ('Heading with Parsoid template...ibutes', 'Talk:Templated_heading', 'cases/heading-templated-parso...d.html', 'cases/heading-templated-parso...e.html', '../data/enwiki-config.json', '../data/enwiki-data.json', true, true)
08:53:14 Heading with Parsoid template attributes
08:53:14 Failed asserting that two strings are equal.
08:53:14 --- Expected
08:53:14 +++ Actual
08:53:14 @@ @@
08:53:14 -'<section class="mf-section-0" id="mf-section-0"><section data-mw-section-id="0" id="mwAQ"></section><section data-mw-section-id="-1" id="mwAg"><div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="Hello" data-mw-thread-id="h-Hello"><span data-mw-comment-start="" id="h-Hello"></span>Hello<span data-mw-comment-end="h-Hello"></span></h2></div>\n
08:53:14 +'<section data-mw-section-id="0" id="mwAQ"></section><section data-mw-section-id="-1" id="mwAg"><div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="Hello" data-mw-thread-id="h-Hello"><span data-mw-comment-start="" id="h-Hello"></span>Hello<span data-mw-comment-end="h-Hello"></span></h2></div>\n
08:53:14  \n
08:53:14  </section><section data-mw-section-id="-1" id="mwAw"><div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="Hi" typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;Hi&quot;,&quot;href&quot;:&quot;./Template:Hi&quot;},&quot;params&quot;:{},&quot;i&quot;:0}}]}" about="#mwt1" data-mw-thread-id="h-Hi"><span data-mw-comment-start="" id="h-Hi"></span>Hi<span data-mw-comment-end="h-Hi"></span></h2></div></section>\n
08:53:14  <pre>newestComment: null\n
08:53:14 @@ @@
08:53:14  		}\n
08:53:14  	]\n
08:53:14  }\n
08:53:14 -</pre></section>\n
08:53:14 +</pre>\n
08:53:14  '
08:53:14 
08:53:14 /workspace/src/extensions/DiscussionTools/tests/phpunit/CommentFormatterTest.php:152

Acceptance criteria

Details

Related Changes in Gerrit:

Event Timeline

Dreamy_Jazz renamed this task from DiscussionTools tests fail to DiscussionTools tests blocking merges in the CheckUser extension.Mar 4 2026, 9:35 AM
Dreamy_Jazz updated the task description. (Show Details)

Change #1247974 had a related patch set uploaded (by Jforrester; author: Esanders):

[mediawiki/extensions/DiscussionTools@master] Update mobile tests

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

Jdforrester-WMF subscribed.

Possibly caused by the new Parsoid release, T418576. Can someone from Content-Transform-Team please advise if this abrupt DOM change is expected?

For some reason I can't reproduce the failure locally. Has anyone figured out yet what causes it? Maybe it's some missing config that could be fixed in the test setup in DiscussionTools? The failing tests are all for mobile, so it could also be something in MobileFrontend.

Good lead, I can reproduce after installing the ParserMigration extension locally.

edit: git bisect blames 1229638 Enable Parsoid Read Views by default

See also T419043, the ParserMigration is removed as dependency for now

Change #1247974 abandoned by Esanders:

[mediawiki/extensions/DiscussionTools@master] Update mobile tests

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

I guess this is fixed by T419043, there is some remaining work to do on that task.