Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core: adds back running class to items and adds tests #1323

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions reporter/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,10 @@ export function escapeText( s ) {
appendTest( details.name, details.testId, details.module );

running = id( "qunit-testresult-display" );

if ( running ) {
addClass( running, "running" );

bad = QUnit.config.reorder && details.previousFailure;

running.innerHTML = [
Expand Down Expand Up @@ -848,6 +851,8 @@ export function escapeText( s ) {

testItem = id( "qunit-test-output-" + details.testId );

removeClass( testItem, "running" );

if ( details.failed > 0 ) {
status = "failed";
} else if ( details.todo ) {
Expand Down
6 changes: 6 additions & 0 deletions test/reporter-html/reporter-html.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ QUnit.test( "<script id='qunit-unescaped-test'>'test';</script>", function( asse

QUnit.module( "display test info" );

QUnit.test( "Testing for running class", function( assert ) {
assert.expect( 1 );

assert.equal( document.querySelectorAll( ".running" ).length, 1 );
} );

QUnit.test( "running test name displayed", function( assert ) {
assert.expect( 2 );

Expand Down