-
Notifications
You must be signed in to change notification settings - Fork 783
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HTML Reporter: Restore "running" class on test item
== Background In QUnit 1.16.0, as part of #677, commit 168b048 changed the testStart() callback to no longer always create `qunit-test-output-TESTID` with class "running", but instead eagerly create them ahead of time via a QUnit.begin() handler (without the "running" class), and then during testStart() set the class to "running", or lazily create the item then. This introduced a bug where, late-defined tests lack the "running" class. This bug then later spread to all items as we now treat all tests as late-defined. In QUnit 2.8.0, as part of #1323, this was attempted to be restored, but it added it to a different element, namely `#qunit-testresult-display` which from what I could find in our history, never previously carried this class. This might've been done by acciddent, but in any case, let's keep that. == What * Restore this to simplify the CSS, and makes it more developer-friendly to theme QUnit by not having to list all statuses, and/or having to use a direct-child selector like `#qunit-tests > li` to reliably select test items (and not other lists like the assertion list). * For back-compat, keep the running class on `qunit-testresult-display` but move it to onBegin() since there is no reason to set this again and again on every test since it never changes. * Document these bits in the recently created "Theme API" section.
- Loading branch information
Showing
4 changed files
with
88 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters