Page MenuHomePhabricator

MobileFrontend unit tests leave "view-border-box" class on <body>
Closed, ResolvedPublic

Description

When running the unit tests with MobileFrontend installed, even after its test suites are finished, it leaves view-border-box class behind on the body.

It's okay not to explicitly remove it, but this should be using the fixture instead of appending things directly to the body. Using the fixture (or a plain div inside the fixture) will let QUnit automatically reset everything at the end of every test.

Also left behind:

<div class="view-border-box"><p>undefined</p></div>

and

<div class="drawer position-fixed view-border-box"><div class="mw-ui-icon mw-ui-icon-arrow mw-ui-icon-element cancel" title=""></div>
<p>Keep track of this page and all changes to it.</p>[..]=mobile_watchPageActionCta&amp;returntoquery=article_action%3Dwatch&amp;type=signup" class="mw-ui-anchor[...]Sign up</a></div></div>

and

<body style="height: 9999px;">

This last one especially is unexpected and may confuses or make fail other unit tests.

Event Timeline

Krinkle updated the task description. (Show Details)
Jhernandez moved this task from Incoming to Triaged but Future on the Web-Team-Backlog board.
Jdlrobson claimed this task.
Jdlrobson subscribed.

This should only happen if skins.minerva.scripts is loaded in the unit tests as it has side effects.. but we don't load this module any more.