jenkins-bot has submitted this change and it was merged. Change subject: jquery.makeCollapsible: Consistency in test names ......................................................................
jquery.makeCollapsible: Consistency in test names Mention which part of the code is being tested in parentheses in test names. Some actions can be triggered inmore than one way or in more than one context: this gives a clearer image of what has tests already and what hasn't. Change-Id: I48dcf831f6a622f08061b29ca90fb0614e4cbab6 --- M tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js 1 file changed, 7 insertions(+), 6 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js b/tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js index 38063e6..cc2e067 100644 --- a/tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js +++ b/tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js @@ -10,7 +10,8 @@ .makeCollapsible( options ); } - QUnit.asyncTest( 'testing hooks (triggers)', 4, function ( assert ) { + // This test is first because if it fails, then almost all of the latter tests are meaningless. + QUnit.asyncTest( 'testing hooks/triggers', 4, function ( assert ) { var $collapsible, $content, $toggle; $collapsible = prepareCollapsible( '<div class="mw-collapsible">' + loremIpsum + '</div>' @@ -45,7 +46,7 @@ $toggle.trigger( 'click' ); } ); - QUnit.asyncTest( 'basic operation', 3, function ( assert ) { + QUnit.asyncTest( 'basic operation (<div>)', 3, function ( assert ) { var $collapsible, $content; $collapsible = prepareCollapsible( '<div class="mw-collapsible">' + loremIpsum + '</div>' @@ -63,7 +64,7 @@ $collapsible.find( '.mw-collapsible-toggle' ).trigger( 'click' ); } ); - QUnit.test( 'basic operation with instantHide (synchronous test)', 2, function ( assert ) { + QUnit.test( 'basic operation when synchronous (options.instantHide)', 2, function ( assert ) { var $collapsible, $content; $collapsible = prepareCollapsible( '<div class="mw-collapsible">' + loremIpsum + '</div>', @@ -78,7 +79,7 @@ assert.assertTrue( $content.is( ':hidden' ), 'after collapsing: content is hidden' ); } ); - QUnit.asyncTest( 'initially collapsed - mw-collapsed class', 2, function ( assert ) { + QUnit.asyncTest( 'initial collapse (mw-collapsed class)', 2, function ( assert ) { var $collapsible, $content; $collapsible = prepareCollapsible( '<div class="mw-collapsible mw-collapsed">' + loremIpsum + '</div>' @@ -96,7 +97,7 @@ $collapsible.find( '.mw-collapsible-toggle' ).trigger( 'click' ); } ); - QUnit.asyncTest( 'initially collapsed - options', 2, function ( assert ) { + QUnit.asyncTest( 'initial collapse (options.collapsed)', 2, function ( assert ) { var $collapsible, $content; $collapsible = prepareCollapsible( '<div class="mw-collapsible">' + loremIpsum + '</div>', @@ -115,7 +116,7 @@ $collapsible.find( '.mw-collapsible-toggle' ).trigger( 'click' ); } ); - QUnit.test( 'premade toggler - options.linksPassthru' , 2, function ( assert ) { + QUnit.test( 'clicks on links inside toggler pass through (options.linksPassthru)' , 2, function ( assert ) { var $collapsible, $content; $collapsible = prepareCollapsible( -- To view, visit https://gerrit.wikimedia.org/r/74962 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I48dcf831f6a622f08061b29ca90fb0614e4cbab6 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Matmarex <matma....@gmail.com> Gerrit-Reviewer: Hoo man <h...@online.de> Gerrit-Reviewer: Matmarex <matma....@gmail.com> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits