0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-29 21:52:22 +01:00

Add failing test

This commit is contained in:
David Bailey 2017-08-29 15:36:37 +01:00
parent 78f29d2b3c
commit ce41d3fd15

View File

@ -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()