mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-12 16:44:17 +02:00
Dropdown unit tests: Tiny style changes
This commit is contained in:
@@ -58,12 +58,16 @@ $(function () {
|
|||||||
+ '</ul>'
|
+ '</ul>'
|
||||||
+ '</li>'
|
+ '</li>'
|
||||||
+ '</ul>'
|
+ '</ul>'
|
||||||
var $dropdown = $(dropdownHTML).find('[data-toggle="dropdown"]').bootstrapDropdown().click()
|
var $dropdown = $(dropdownHTML)
|
||||||
|
.find('[data-toggle="dropdown"]')
|
||||||
|
.bootstrapDropdown()
|
||||||
|
.click()
|
||||||
|
|
||||||
assert.strictEqual($dropdown.attr('aria-expanded'), 'true', 'aria-expanded is set to string "true" on click')
|
assert.strictEqual($dropdown.attr('aria-expanded'), 'true', 'aria-expanded is set to string "true" on click')
|
||||||
})
|
})
|
||||||
|
|
||||||
QUnit.test('should set aria-expanded="false" on target when dropdown menu is hidden', function (assert) {
|
QUnit.test('should set aria-expanded="false" on target when dropdown menu is hidden', function (assert) {
|
||||||
|
var done = assert.async()
|
||||||
var dropdownHTML = '<ul class="tabs">'
|
var dropdownHTML = '<ul class="tabs">'
|
||||||
+ '<li class="dropdown">'
|
+ '<li class="dropdown">'
|
||||||
+ '<a href="#" class="dropdown-toggle" aria-expanded="false" data-toggle="dropdown">Dropdown</a>'
|
+ '<a href="#" class="dropdown-toggle" aria-expanded="false" data-toggle="dropdown">Dropdown</a>'
|
||||||
@@ -80,8 +84,6 @@ $(function () {
|
|||||||
.find('[data-toggle="dropdown"]')
|
.find('[data-toggle="dropdown"]')
|
||||||
.bootstrapDropdown()
|
.bootstrapDropdown()
|
||||||
|
|
||||||
var done = assert.async()
|
|
||||||
|
|
||||||
$dropdown
|
$dropdown
|
||||||
.parent('.dropdown')
|
.parent('.dropdown')
|
||||||
.on('hidden.bs.dropdown', function () {
|
.on('hidden.bs.dropdown', function () {
|
||||||
|
Reference in New Issue
Block a user