aboutsummaryrefslogtreecommitdiff
path: root/js/tests
diff options
context:
space:
mode:
authorDavid Bailey <[email protected]>2017-08-29 15:36:37 +0100
committerDavid Bailey <[email protected]>2017-08-29 15:36:37 +0100
commitce41d3fd159ce376b55413cef6e88fd658f4fd30 (patch)
tree0a3b4382464b1b41cb5ccd652a58753d6adb4528 /js/tests
parent78f29d2b3cb9bd888c927e8d50ee6962c2f9d407 (diff)
downloadbootstrap-ce41d3fd159ce376b55413cef6e88fd658f4fd30.tar.xz
bootstrap-ce41d3fd159ce376b55413cef6e88fd658f4fd30.zip
Add failing test
Diffstat (limited to 'js/tests')
-rw-r--r--js/tests/unit/modal.js14
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()