diff options
| author | David Bailey <[email protected]> | 2017-08-29 15:36:37 +0100 |
|---|---|---|
| committer | David Bailey <[email protected]> | 2017-08-29 15:36:37 +0100 |
| commit | ce41d3fd159ce376b55413cef6e88fd658f4fd30 (patch) | |
| tree | 0a3b4382464b1b41cb5ccd652a58753d6adb4528 /js/tests | |
| parent | 78f29d2b3cb9bd888c927e8d50ee6962c2f9d407 (diff) | |
| download | bootstrap-ce41d3fd159ce376b55413cef6e88fd658f4fd30.tar.xz bootstrap-ce41d3fd159ce376b55413cef6e88fd658f4fd30.zip | |
Add failing test
Diffstat (limited to 'js/tests')
| -rw-r--r-- | js/tests/unit/modal.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/js/tests/unit/modal.js b/js/tests/unit/modal.js index 5b265df15..d22b818d2 100644 --- a/js/tests/unit/modal.js +++ b/js/tests/unit/modal.js @@ -349,6 +349,20 @@ $(function () { $toggleBtn.trigger('click') }) + QUnit.test('should adjust the inline padding of the modal when opening', function (assert) { + assert.expect(1) + var done = assert.async() + + $('<div id="modal-test"/>') + .on('shown.bs.modal', function () { + var expectedPadding = $(this).getScrollbarWidth() + 'px' + var currentPadding = $(this).css('padding-right') + assert.strictEqual(currentPadding, expectedPadding, 'modal padding should be adjusted while opening') + done() + }) + .bootstrapModal('show') + }) + QUnit.test('should adjust the inline body padding when opening and restore when closing', function (assert) { assert.expect(2) var done = assert.async() |
