2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-14 18:42:30 +03:00

Add Manipulator object to add shortcuts for dom manipulations

This commit is contained in:
Johann-S
2017-09-05 14:35:52 +02:00
committed by XhmikosR
parent 44f38e4128
commit 9f9712b98c
7 changed files with 34 additions and 6 deletions
+3 -3
View File
@@ -127,21 +127,21 @@ $(function () {
assert.ok($btn1.hasClass('active'), 'btn1 has active class')
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')
assert.ok(!Manipulator.isChecked($btn2.find('input')[0]), 'btn2 is not checked')
EventHandler.trigger($btn2.find('input')[0], 'click')
assert.ok(!$btn1.hasClass('active'), 'btn1 does not have active class')
assert.ok(!$btn1.find('input').prop('checked'), 'btn1 is not checked')
assert.ok($btn2.hasClass('active'), 'btn2 has active class')
assert.ok($btn2.find('input').prop('checked'), 'btn2 is checked')
assert.ok(Manipulator.isChecked($btn2.find('input')[0]), 'btn2 is checked')
EventHandler.trigger($btn2.find('input')[0], '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 not checked')
assert.ok($btn2.hasClass('active'), 'btn2 has active class')
assert.ok($btn2.find('input').prop('checked'), 'btn2 is checked')
assert.ok(Manipulator.isChecked($btn2.find('input')[0]), 'btn2 is checked')
})
QUnit.test('should only toggle selectable inputs', function (assert) {