mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-30 08:39:56 +02:00
upgrade to v4 stable
This commit is contained in:
@@ -570,17 +570,19 @@ $(function () {
|
||||
var $triggerTwo = $('#linkTriggerTwo')
|
||||
var $collapseOne = $('#collapseOne')
|
||||
var $collapseTwo = $('#collapseTwo')
|
||||
|
||||
$collapseOne.on('shown.bs.collapse', function () {
|
||||
assert.ok($collapseOne.hasClass('show'), '#collapseOne is shown')
|
||||
assert.ok(!$collapseTwo.hasClass('show'), '#collapseTwo is not shown')
|
||||
|
||||
$collapseTwo.on('shown.bs.collapse', function () {
|
||||
assert.ok(!$collapseOne.hasClass('show'), '#collapseOne is not shown')
|
||||
assert.ok($collapseTwo.hasClass('show'), '#collapseTwo is shown')
|
||||
done()
|
||||
})
|
||||
$triggerTwo.trigger($.Event('click'))
|
||||
EventHandler.trigger($triggerTwo[0], 'click')
|
||||
})
|
||||
$trigger.trigger($.Event('click'))
|
||||
EventHandler.trigger($trigger[0], 'click')
|
||||
})
|
||||
|
||||
QUnit.test('should allow accordion to target multiple elements', function (assert) {
|
||||
@@ -612,7 +614,7 @@ $(function () {
|
||||
assert.ok($collapseOneTwo.hasClass('show'), '#collapseOneTwo is shown')
|
||||
assert.ok(!$collapseTwoOne.hasClass('show'), '#collapseTwoOne is not shown')
|
||||
assert.ok(!$collapseTwoTwo.hasClass('show'), '#collapseTwoTwo is not shown')
|
||||
$triggerTwo.trigger($.Event('click'))
|
||||
EventHandler.trigger($triggerTwo[0], 'click')
|
||||
}
|
||||
|
||||
function secondTest() {
|
||||
@@ -655,7 +657,7 @@ $(function () {
|
||||
}
|
||||
})
|
||||
|
||||
$trigger.trigger($.Event('click'))
|
||||
EventHandler.trigger($trigger[0], 'click')
|
||||
})
|
||||
|
||||
QUnit.test('should collapse accordion children but not nested accordion children', function (assert) {
|
||||
|
@@ -88,7 +88,7 @@ $(function () {
|
||||
assert.ok(!$dropdown.parent('.dropdown').hasClass('position-static'), '"position-static" class not added')
|
||||
done()
|
||||
})
|
||||
$dropdown.trigger('click')
|
||||
EventHandler.trigger($dropdown[0], 'click')
|
||||
})
|
||||
|
||||
QUnit.test('should add class position-static to dropdown if boundary not scrollParent', function (assert) {
|
||||
@@ -110,7 +110,7 @@ $(function () {
|
||||
assert.ok($dropdown.parent('.dropdown').hasClass('position-static'), '"position-static" class added')
|
||||
done()
|
||||
})
|
||||
$dropdown.trigger('click')
|
||||
EventHandler.trigger($dropdown[0], 'click')
|
||||
})
|
||||
|
||||
QUnit.test('should set aria-expanded="true" on target when dropdown menu is shown', function (assert) {
|
||||
@@ -834,7 +834,7 @@ $(function () {
|
||||
})
|
||||
|
||||
QUnit.test('should ignore space key events for <input>s within dropdown, and accept up, down and escape', function (assert) {
|
||||
assert.expect(6)
|
||||
assert.expect(7)
|
||||
var done = assert.async()
|
||||
|
||||
var dropdownHTML =
|
||||
@@ -907,7 +907,7 @@ $(function () {
|
||||
})
|
||||
|
||||
QUnit.test('should ignore space key events for <textarea>s within dropdown, and accept up, down and escape', function (assert) {
|
||||
assert.expect(6)
|
||||
assert.expect(7)
|
||||
var done = assert.async()
|
||||
|
||||
var dropdownHTML =
|
||||
@@ -1006,7 +1006,7 @@ $(function () {
|
||||
done()
|
||||
})
|
||||
|
||||
$dropdown.trigger('click')
|
||||
EventHandler.trigger($dropdown[0], 'click')
|
||||
})
|
||||
|
||||
QUnit.test('should call Popper.js and detect navbar on update', function (assert) {
|
||||
|
Reference in New Issue
Block a user