mirror of
https://github.com/Hopiu/bootstrap.git
synced 2026-05-24 11:03:44 +00:00
tweak 'close reopened modal' unit test to work under new QUnit API
This commit is contained in:
parent
df73535a2d
commit
1652efc3f6
1 changed files with 7 additions and 2 deletions
|
|
@ -210,13 +210,18 @@ $(function () {
|
||||||
var done = assert.async()
|
var done = assert.async()
|
||||||
|
|
||||||
$('<div id="modal-test"><div class="contents"><div id="close" data-dismiss="modal"/></div></div>')
|
$('<div id="modal-test"><div class="contents"><div id="close" data-dismiss="modal"/></div></div>')
|
||||||
.on('shown.bs.modal', function () {
|
.one('shown.bs.modal', function () {
|
||||||
$('#close').click()
|
$('#close').click()
|
||||||
ok(!$('#modal-test').is(':visible'), 'modal hidden')
|
|
||||||
})
|
})
|
||||||
.one('hidden.bs.modal', function () {
|
.one('hidden.bs.modal', function () {
|
||||||
|
// after one open-close cycle
|
||||||
|
ok(!$('#modal-test').is(':visible'), 'modal hidden')
|
||||||
$(this)
|
$(this)
|
||||||
|
.one('shown.bs.modal', function () {
|
||||||
|
$('#close').click()
|
||||||
|
})
|
||||||
.one('hidden.bs.modal', function () {
|
.one('hidden.bs.modal', function () {
|
||||||
|
ok(!$('#modal-test').is(':visible'), 'modal hidden')
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
.bootstrapModal('show')
|
.bootstrapModal('show')
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue