Page MenuHomePhabricator

QUnit tests: Missing expert destruction leads to failing tests when resourceloaderdebug is disabled
Closed, ResolvedPublic


In valueview.tests.testExpert.js, fresh expert instances are provided for each test. However, these instances are not destroyed after the individual tests have been performed. Due to that, DOM structures being added to the HTML body element during expert initialization are not removed after the tests have run causing interference with other QUnit tests.

Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:16 AM
bzimport set Reference to bz48611.
bzimport added a subscriber: Unknown Object (MLST).

Change 76741 had a related patch set uploaded by Daniel Werner:
(bug 48611) valueview expert test setups won't create instances anymore

This is actually not just about missing experts destruction primarily, it is mostly about experts being constructed outside of the actual tests (in some test definitions) which will even happen if the tests should not even be executed (e.g. because of using ?filter=xxx).

Anyhow, when instantiating certain experts (e.g. time expert) they will use widgets that add some node to the html's body immediately (e.g. inputextender). In the tests of those widgets it is asserted whether the body contains any leftover DOM nodes. This assertion fails in case experts using those widgets got constructed during test setups but not destroyed. My change set will prevent the test setups from initializing experts before the actual test.

Verified in Wikidata demo July 31th.

The according change set has not been merged. How come the fix for this bug got verified?

Change 76741 merged by Jeroen De Dauw:
(bug 48611) valueview expert test setups won't create instances anymore