aboutsummaryrefslogtreecommitdiff
path: root/js/tests/unit/button.js
diff options
context:
space:
mode:
authorChris Rebert <[email protected]>2015-03-09 17:47:51 -0700
committerChris Rebert <[email protected]>2015-03-09 17:47:51 -0700
commit1383b883288887a90e6f04c8752364f3c85ded2a (patch)
tree4624f6a90ab3f72fe857738a0632eb9a1fb5b245 /js/tests/unit/button.js
parentf972a84dd79cf73a7eb14f8977aecafa142bba4c (diff)
parent725c6848c362f90bbdb931dcea70d40a1753d768 (diff)
downloadbootstrap-1383b883288887a90e6f04c8752364f3c85ded2a.tar.xz
bootstrap-1383b883288887a90e6f04c8752364f3c85ded2a.zip
Merge pull request #16012 from twbs/refs-12761
Disable jQuery event aliases when running test suite
Diffstat (limited to 'js/tests/unit/button.js')
-rw-r--r--js/tests/unit/button.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/js/tests/unit/button.js b/js/tests/unit/button.js
index 7788addd1..02312ebaf 100644
--- a/js/tests/unit/button.js
+++ b/js/tests/unit/button.js
@@ -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')