aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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()