diff options
| author | Mark Otto <[email protected]> | 2016-10-09 20:32:40 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2016-10-09 20:32:40 -0700 |
| commit | 4d725c90d618f50622960c86704faedf04ea3d7a (patch) | |
| tree | 305ad7c643090beebdc466f03eb24fa943751b8e /js/tests/unit | |
| parent | 4493701ee2975a5041d0309ee4f06715f89675cb (diff) | |
| parent | 32f9a5d6a594aaa4afd62b2410b45804edb737c5 (diff) | |
| download | bootstrap-4d725c90d618f50622960c86704faedf04ea3d7a.tar.xz bootstrap-4d725c90d618f50622960c86704faedf04ea3d7a.zip | |
Merge pull request #17568 from Johann-S/fixCollapseHeight
[Fix #17555][V4] fix resetting style on closing collapse
Diffstat (limited to 'js/tests/unit')
| -rw-r--r-- | js/tests/unit/collapse.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/tests/unit/collapse.js b/js/tests/unit/collapse.js index 4eadc205b..d387ebb18 100644 --- a/js/tests/unit/collapse.js +++ b/js/tests/unit/collapse.js @@ -90,6 +90,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() |
