Matmarex has uploaded a new change for review. https://gerrit.wikimedia.org/r/74962
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(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/62/74962/1 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: newchange Gerrit-Change-Id: I48dcf831f6a622f08061b29ca90fb0614e4cbab6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Matmarex <matma....@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits