From bf39bb3ac3d2aef4687b3cd4762015d5f218e2bc Mon Sep 17 00:00:00 2001 From: Starsam80 Date: Thu, 27 Oct 2016 16:13:17 -0600 Subject: Rename `.active` to `.show` --- js/tests/unit/collapse.js | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'js/tests/unit/collapse.js') diff --git a/js/tests/unit/collapse.js b/js/tests/unit/collapse.js index 7db69e2cf..713930433 100644 --- a/js/tests/unit/collapse.js +++ b/js/tests/unit/collapse.js @@ -48,7 +48,7 @@ $(function () { assert.expect(2) var $el = $('
').bootstrapCollapse('show') - assert.ok($el.hasClass('active'), 'has class "active"') + assert.ok($el.hasClass('show'), 'has class "show"') assert.ok(!/height/i.test($el.attr('style')), 'has height reset') }) @@ -62,7 +62,7 @@ $(function () { '
', '
', '
', - '
', + '
', '
', '
' ].join('') @@ -71,15 +71,15 @@ $(function () { var $el2 = $('#collapse2') $el1.bootstrapCollapse('show') - assert.ok($el1.hasClass('active')) - assert.ok($el2.hasClass('active')) + assert.ok($el1.hasClass('show')) + assert.ok($el2.hasClass('show')) }) QUnit.test('should hide a collapsed element', function (assert) { assert.expect(1) var $el = $('
').bootstrapCollapse('hide') - assert.ok(!$el.hasClass('active'), 'does not have class "active"') + assert.ok(!$el.hasClass('show'), 'does not have class "show"') }) QUnit.test('should not fire shown when show is prevented', function (assert) { @@ -150,7 +150,7 @@ $(function () { var $target = $('').appendTo('#qunit-fixture') - $('
') + $('
') .appendTo('#qunit-fixture') .on('hidden.bs.collapse', function () { assert.ok($target.hasClass('collapsed'), 'target has collapsed class') @@ -185,7 +185,7 @@ $(function () { var $target = $('').appendTo('#qunit-fixture') var $alt = $('').appendTo('#qunit-fixture') - $('
') + $('
') .appendTo('#qunit-fixture') .on('hidden.bs.collapse', function () { assert.ok($target.hasClass('collapsed'), 'target has collapsed class') @@ -200,7 +200,7 @@ $(function () { assert.expect(0) var done = assert.async() - var $test = $('
') + var $test = $('
') .appendTo('#qunit-fixture') .on('hide.bs.collapse', function () { assert.ok(false) @@ -244,7 +244,7 @@ $(function () { assert.expect(1) var done = assert.async() - $('
') + $('
') .appendTo('#qunit-fixture') .on('hide.bs.collapse', function () { assert.ok(true, 'hiding a previously-uninitialized shown collapse when the "hide" method is called') @@ -267,7 +267,7 @@ $(function () { var $target1 = $('
').appendTo($groups.eq(0)) - $('