aboutsummaryrefslogtreecommitdiff
path: root/js/tests/unit/collapse.js
diff options
context:
space:
mode:
authorJohann-S <[email protected]>2018-03-05 15:40:23 +0100
committerXhmikosR <[email protected]>2019-02-20 22:05:45 +0200
commit9744886519a834deba45b1cadbb0603ac2446102 (patch)
treeca0b3f03ba69ae82fc91721e93ecb6cfd47b087e /js/tests/unit/collapse.js
parent7f08061eca035d8f75651e9c3c32503e91f86fae (diff)
downloadbootstrap-9744886519a834deba45b1cadbb0603ac2446102.tar.xz
bootstrap-9744886519a834deba45b1cadbb0603ac2446102.zip
upgrade to v4 stable
Diffstat (limited to 'js/tests/unit/collapse.js')
-rw-r--r--js/tests/unit/collapse.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/js/tests/unit/collapse.js b/js/tests/unit/collapse.js
index 3df60200b..8dccf5c18 100644
--- a/js/tests/unit/collapse.js
+++ b/js/tests/unit/collapse.js
@@ -570,17 +570,19 @@ $(function () {
var $triggerTwo = $('#linkTriggerTwo')
var $collapseOne = $('#collapseOne')
var $collapseTwo = $('#collapseTwo')
+
$collapseOne.on('shown.bs.collapse', function () {
assert.ok($collapseOne.hasClass('show'), '#collapseOne is shown')
assert.ok(!$collapseTwo.hasClass('show'), '#collapseTwo is not shown')
+
$collapseTwo.on('shown.bs.collapse', function () {
assert.ok(!$collapseOne.hasClass('show'), '#collapseOne is not shown')
assert.ok($collapseTwo.hasClass('show'), '#collapseTwo is shown')
done()
})
- $triggerTwo.trigger($.Event('click'))
+ EventHandler.trigger($triggerTwo[0], 'click')
})
- $trigger.trigger($.Event('click'))
+ EventHandler.trigger($trigger[0], 'click')
})
QUnit.test('should allow accordion to target multiple elements', function (assert) {
@@ -612,7 +614,7 @@ $(function () {
assert.ok($collapseOneTwo.hasClass('show'), '#collapseOneTwo is shown')
assert.ok(!$collapseTwoOne.hasClass('show'), '#collapseTwoOne is not shown')
assert.ok(!$collapseTwoTwo.hasClass('show'), '#collapseTwoTwo is not shown')
- $triggerTwo.trigger($.Event('click'))
+ EventHandler.trigger($triggerTwo[0], 'click')
}
function secondTest() {
@@ -655,7 +657,7 @@ $(function () {
}
})
- $trigger.trigger($.Event('click'))
+ EventHandler.trigger($trigger[0], 'click')
})
QUnit.test('should collapse accordion children but not nested accordion children', function (assert) {