2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-20 20:00:36 +03:00

Fix unit tests + Update Popper to 1.6.0

This commit is contained in:
Johann-S
2017-04-14 13:30:55 +02:00
parent c21a2b0d92
commit 69de65180f
8 changed files with 70 additions and 97 deletions
+10 -5
View File
@@ -47,13 +47,18 @@ $(function () {
QUnit.test('should render popover element', function (assert) {
assert.expect(2)
var $popover = $('<a href="#" title="mdo" data-content="https://twitter.com/mdo">@mdo</a>')
var done = assert.async()
$('<a href="#" title="mdo" data-content="https://twitter.com/mdo">@mdo</a>')
.appendTo('#qunit-fixture')
.on('shown.bs.popover', function () {
assert.notEqual($('.popover').length, 0, 'popover was inserted')
$(this).bootstrapPopover('hide')
})
.on('hidden.bs.popover', function () {
assert.strictEqual($('.popover').length, 0, 'popover removed')
done()
})
.bootstrapPopover('show')
assert.notEqual($('.popover').length, 0, 'popover was inserted')
$popover.bootstrapPopover('hide')
assert.strictEqual($('.popover').length, 0, 'popover removed')
})
QUnit.test('should store popover instance in popover data object', function (assert) {