aboutsummaryrefslogtreecommitdiff
path: root/js/tests
diff options
context:
space:
mode:
authorJohann-S <[email protected]>2015-09-11 10:45:08 +0200
committerJohann-S <[email protected]>2015-09-11 10:45:08 +0200
commit32f9a5d6a594aaa4afd62b2410b45804edb737c5 (patch)
tree5c5e03e1b12203a6543f1b4fb220bfeaa83c727e /js/tests
parent4ee6d99c9d7dcba154772c7c8c3901fbe3cb0b04 (diff)
downloadbootstrap-32f9a5d6a594aaa4afd62b2410b45804edb737c5.tar.xz
bootstrap-32f9a5d6a594aaa4afd62b2410b45804edb737c5.zip
fix resetting style on closing collapse
Diffstat (limited to 'js/tests')
-rw-r--r--js/tests/unit/collapse.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/js/tests/unit/collapse.js b/js/tests/unit/collapse.js
index 78fafc6c2..e1bd8855c 100644
--- a/js/tests/unit/collapse.js
+++ b/js/tests/unit/collapse.js
@@ -78,6 +78,21 @@ $(function () {
.bootstrapCollapse('show')
})
+ QUnit.test('should reset style to auto after finishing closing collapse', function (assert) {
+ assert.expect(1)
+ var done = assert.async()
+
+ $('<div class="collapse"/>')
+ .on('shown.bs.collapse', function () {
+ $(this).bootstrapCollapse('hide')
+ })
+ .on('hidden.bs.collapse', function () {
+ assert.strictEqual(this.style.height, '', 'height is auto')
+ done()
+ })
+ .bootstrapCollapse('show')
+ })
+
QUnit.test('should remove "collapsed" class from target when collapse is shown', function (assert) {
assert.expect(1)
var done = assert.async()