mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-25 21:09:06 +02: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:
@@ -106,7 +106,7 @@ $(function () {
|
||||
.append($inner)
|
||||
.appendTo('#qunit-fixture')
|
||||
assert.ok(!$btn.hasClass('active'), 'btn does not have active class')
|
||||
$inner.click()
|
||||
$inner.trigger('click')
|
||||
assert.ok($btn.hasClass('active'), 'btn has class active')
|
||||
})
|
||||
|
||||
@@ -126,7 +126,7 @@ $(function () {
|
||||
.append($inner)
|
||||
.appendTo('#qunit-fixture')
|
||||
assert.strictEqual($btn.attr('aria-pressed'), 'false', 'btn aria-pressed state is false')
|
||||
$inner.click()
|
||||
$inner.trigger('click')
|
||||
assert.strictEqual($btn.attr('aria-pressed'), 'true', 'btn aria-pressed state is true')
|
||||
})
|
||||
|
||||
@@ -139,7 +139,7 @@ $(function () {
|
||||
.append($btn.append($inner))
|
||||
.appendTo('#qunit-fixture')
|
||||
assert.ok(!$btn.hasClass('active'), 'btn does not have active class')
|
||||
$inner.click()
|
||||
$inner.trigger('click')
|
||||
assert.ok($btn.hasClass('active'), 'btn has class active')
|
||||
})
|
||||
|
||||
@@ -165,13 +165,13 @@ $(function () {
|
||||
assert.ok($btn1.find('input').prop('checked'), 'btn1 is checked')
|
||||
assert.ok(!$btn2.hasClass('active'), 'btn2 does not have active class')
|
||||
assert.ok(!$btn2.find('input').prop('checked'), 'btn2 is not checked')
|
||||
$btn2.find('input').click()
|
||||
$btn2.find('input').trigger('click')
|
||||
assert.ok(!$btn1.hasClass('active'), 'btn1 does not have active class')
|
||||
assert.ok(!$btn1.find('input').prop('checked'), 'btn1 is checked')
|
||||
assert.ok($btn2.hasClass('active'), 'btn2 has active class')
|
||||
assert.ok($btn2.find('input').prop('checked'), 'btn2 is checked')
|
||||
|
||||
$btn2.find('input').click() // clicking an already checked radio should not un-check it
|
||||
$btn2.find('input').trigger('click') // clicking an already checked radio should not un-check it
|
||||
assert.ok(!$btn1.hasClass('active'), 'btn1 does not have active class')
|
||||
assert.ok(!$btn1.find('input').prop('checked'), 'btn1 is checked')
|
||||
assert.ok($btn2.hasClass('active'), 'btn2 has active class')
|
||||
|
Reference in New Issue
Block a user