2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-11 18:02:28 +03:00

Disable jQuery event aliases when running test suite

To ensure that we don't accidentally use any of the aliases.
This should prevent any future regressions from #12761.
Also updates the test suite since it now can't use these aliases either.
This commit is contained in:
Chris Rebert
2015-03-06 04:34:28 -08:00
parent 21d56378e1
commit 725c6848c3
10 changed files with 104 additions and 64 deletions
+13 -13
View File
@@ -91,7 +91,7 @@ $(function () {
done()
})
$target.click()
$target.trigger('click')
})
QUnit.test('should add "collapsed" class to target when collapse is hidden', function (assert) {
@@ -107,7 +107,7 @@ $(function () {
done()
})
$target.click()
$target.trigger('click')
})
QUnit.test('should remove "collapsed" class from all triggers targeting the collapse when the collapse is shown', function (assert) {
@@ -125,7 +125,7 @@ $(function () {
done()
})
$target.click()
$target.trigger('click')
})
QUnit.test('should add "collapsed" class to all triggers targeting the collapse when the collapse is hidden', function (assert) {
@@ -143,7 +143,7 @@ $(function () {
done()
})
$target.click()
$target.trigger('click')
})
QUnit.test('should not close a collapse when initialized with "show" option if already shown', function (assert) {
@@ -235,7 +235,7 @@ $(function () {
done()
})
$target3.click()
$target3.trigger('click')
})
QUnit.test('should allow dots in data-parent', function (assert) {
@@ -269,7 +269,7 @@ $(function () {
done()
})
$target3.click()
$target3.trigger('click')
})
QUnit.test('should set aria-expanded="true" on target when collapse is shown', function (assert) {
@@ -285,7 +285,7 @@ $(function () {
done()
})
$target.click()
$target.trigger('click')
})
QUnit.test('should set aria-expanded="false" on target when collapse is hidden', function (assert) {
@@ -301,7 +301,7 @@ $(function () {
done()
})
$target.click()
$target.trigger('click')
})
QUnit.test('should set aria-expanded="true" on all triggers targeting the collapse when the collapse is shown', function (assert) {
@@ -319,7 +319,7 @@ $(function () {
done()
})
$target.click()
$target.trigger('click')
})
QUnit.test('should set aria-expanded="false" on all triggers targeting the collapse when the collapse is hidden', function (assert) {
@@ -337,7 +337,7 @@ $(function () {
done()
})
$target.click()
$target.trigger('click')
})
QUnit.test('should change aria-expanded from active accordion target to "false" and set the newly active one to "true"', function (assert) {
@@ -371,7 +371,7 @@ $(function () {
done()
})
$target3.click()
$target3.trigger('click')
})
QUnit.test('should not fire show event if show is prevented because other element is still transitioning', function (assert) {
@@ -396,13 +396,13 @@ $(function () {
var $target2 = $('<a data-toggle="collapse" href="#body2" data-parent="#accordion"/>').appendTo($groups.eq(1))
var $body2 = $('<div id="body2" class="collapse"/>').appendTo($groups.eq(1))
$target2.click()
$target2.trigger('click')
$body2
.toggleClass('in collapsing')
.data('bs.collapse').transitioning = 1
$target1.click()
$target1.trigger('click')
setTimeout(function () {
assert.ok(!showFired, 'show event did not fire')