2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-17 19:21:23 +03:00

fix(event-handler): remove the use of our event handler in unit test

This commit is contained in:
Johann-S
2018-06-07 22:21:31 +02:00
committed by XhmikosR
parent 2b78078779
commit 9313446274
9 changed files with 301 additions and 278 deletions
+5 -5
View File
@@ -281,14 +281,14 @@ $(function () {
})
.one('shown.bs.popover', function () {
assert.notEqual($('.popover').length, 0, 'popover was inserted')
EventHandler.trigger($div.find('a')[0], 'click')
$div.find('a')[0].click()
})
.one('hidden.bs.popover', function () {
assert.strictEqual($('.popover').length, 0, 'popover was removed')
done()
})
EventHandler.trigger($div.find('a')[0], 'click')
$div.find('a')[0].click()
})
QUnit.test('should detach popover content rather than removing it so that event handlers are left intact', function (assert) {
@@ -438,11 +438,11 @@ $(function () {
})
$popover.bootstrapPopover('disable')
EventHandler.trigger($popover[0], 'click')
$popover[0].click()
setTimeout(function () {
assert.strictEqual($('.popover').length === 0, true)
$popover.bootstrapPopover('enable')
EventHandler.trigger($popover[0], 'click')
$popover[0].click()
}, 200)
})
@@ -464,6 +464,6 @@ $(function () {
done()
})
EventHandler.trigger($popover[0], 'click')
$popover[0].click()
})
})