Skip to content

Commit

Permalink
Core: adds back running class to items and adds tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielcsapo authored and trentmwillis committed Nov 1, 2018
1 parent b1a2552 commit 7910456
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions reporter/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,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 @@ -849,6 +852,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

0 comments on commit 7910456

Please sign in to comment.