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:
parent
78f29d2b3c
commit
ce41d3fd15
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user