2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

fix(unit-test): dropdown, collapse and carousel

This commit is contained in:
Johann-S
2018-06-17 15:28:42 +02:00
committed by XhmikosR
parent 8010c010e9
commit 6b0808354d
5 changed files with 26 additions and 16 deletions
+15 -6
View File
@@ -663,6 +663,8 @@ $(function () {
$dropdown[0].dispatchEvent(keydown40)
assert.ok($(document.activeElement).is($('#item1')), 'item1 is focused')
keydown40 = new Event('keydown')
keydown40.which = 40
document.activeElement.dispatchEvent(keydown40)
assert.ok($(document.activeElement).is($('#item2')), 'item2 is focused')
@@ -899,11 +901,15 @@ $(function () {
assert.ok(document.activeElement === $('#item1')[0], 'item1 is focused')
done()
}).bootstrapDropdown('toggle')
$input[0].dispatchEvent(new Event('click'))
})
.bootstrapDropdown('toggle')
$input.bootstrapDropdown('toggle')
})
$input[0].dispatchEvent(new Event('click'))
$input.bootstrapDropdown('toggle')
})
$input[0].dispatchEvent(new Event('click'))
})
@@ -973,10 +979,13 @@ $(function () {
assert.ok(document.activeElement === $('#item1')[0], 'item1 is focused')
done()
}).bootstrapDropdown('toggle')
$textarea[0].dispatchEvent(new Event('click'))
})
.bootstrapDropdown('toggle')
$textarea.bootstrapDropdown('toggle')
})
$textarea[0].dispatchEvent(new Event('click'))
$textarea.bootstrapDropdown('toggle')
})
$textarea[0].dispatchEvent(new Event('click'))
})