diff options
| author | Alessandro Chitolina <[email protected]> | 2018-09-25 20:06:09 +0200 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2019-02-20 22:05:45 +0200 |
| commit | 6cfc78f2d95eca0b6fc6d0a19a76a1102f8c2254 (patch) | |
| tree | dd19d586681fe3da215a55e363ae3dadcf1e97c7 /js/tests | |
| parent | e866b1ae432f387180b18b21fed59cd21b62957e (diff) | |
| download | bootstrap-6cfc78f2d95eca0b6fc6d0a19a76a1102f8c2254.tar.xz bootstrap-6cfc78f2d95eca0b6fc6d0a19a76a1102f8c2254.zip | |
Remove IE support and button bsChecked hack
Diffstat (limited to 'js/tests')
| -rw-r--r-- | js/tests/browsers.js | 14 | ||||
| -rw-r--r-- | js/tests/unit/button.js | 6 | ||||
| -rw-r--r-- | js/tests/unit/dom/manipulator.js | 46 | ||||
| -rw-r--r-- | js/tests/visual/button.html | 3 |
4 files changed, 4 insertions, 65 deletions
diff --git a/js/tests/browsers.js b/js/tests/browsers.js index da36e497b..2341f58ab 100644 --- a/js/tests/browsers.js +++ b/js/tests/browsers.js @@ -30,13 +30,6 @@ const browsers = { browser: 'Edge', browser_version: 'latest' }, - ie11Win10: { - base: 'BrowserStack', - os: 'Windows', - os_version: '10', - browser: 'IE', - browser_version: '11.0' - }, chromeWin10: { base: 'BrowserStack', os: 'Windows', @@ -51,13 +44,6 @@ const browsers = { browser: 'Firefox', browser_version: 'latest' }, - ie10Win8: { - base: 'BrowserStack', - os: 'Windows', - os_version: '8', - browser: 'IE', - browser_version: '10.0' - }, iphoneX: { base: 'BrowserStack', os: 'ios', diff --git a/js/tests/unit/button.js b/js/tests/unit/button.js index e116730c2..a1d15116b 100644 --- a/js/tests/unit/button.js +++ b/js/tests/unit/button.js @@ -130,21 +130,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(!(inputBtn2.bsChecked || inputBtn2.checked), 'btn2 is not checked') + assert.ok(!inputBtn2.checked, 'btn2 is not checked') inputBtn2.dispatchEvent(new Event('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(inputBtn2.bsChecked || inputBtn2.checked, 'btn2 is checked') + assert.ok(inputBtn2.checked, 'btn2 is checked') inputBtn2.dispatchEvent(new Event('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(inputBtn2.bsChecked || inputBtn2.checked, 'btn2 is checked') + assert.ok(inputBtn2.checked, 'btn2 is checked') }) QUnit.test('should only toggle selectable inputs', function (assert) { diff --git a/js/tests/unit/dom/manipulator.js b/js/tests/unit/dom/manipulator.js index 19effa423..8a0be08ea 100644 --- a/js/tests/unit/dom/manipulator.js +++ b/js/tests/unit/dom/manipulator.js @@ -8,52 +8,6 @@ $(function () { assert.ok(Manipulator, 'Manipulator is defined') }) - QUnit.test('should set checked for input', function (assert) { - assert.expect(2) - - var $input = $('<input type="checkbox" />').appendTo('#qunit-fixture') - Manipulator.setChecked($input[0], true) - - assert.ok($input[0].checked) - - Manipulator.setChecked($input[0], false) - - assert.ok(!$input[0].checked) - }) - - QUnit.test('should not set checked for non input element', function (assert) { - assert.expect(1) - - var $div = $('<div />').appendTo('#qunit-fixture') - Manipulator.setChecked($div[0], true) - - assert.ok(typeof $div[0].checked === 'undefined') - }) - - QUnit.test('should verify if an element is checked', function (assert) { - assert.expect(2) - - var $input = $('<input type="checkbox" />').appendTo('#qunit-fixture') - Manipulator.setChecked($input[0], true) - - assert.ok(Manipulator.isChecked($input[0])) - - Manipulator.setChecked($input[0], false) - - assert.ok(!Manipulator.isChecked($input[0])) - }) - - QUnit.test('should throw an error when the element is not an input', function (assert) { - assert.expect(1) - - var $div = $('<div />').appendTo('#qunit-fixture') - try { - Manipulator.isChecked($div[0]) - } catch (e) { - assert.strictEqual(e.message, 'INPUT parameter is not an HTMLInputElement') - } - }) - QUnit.test('should set data attribute', function (assert) { assert.expect(1) diff --git a/js/tests/visual/button.html b/js/tests/visual/button.html index 428fd156f..44a91a821 100644 --- a/js/tests/visual/button.html +++ b/js/tests/visual/button.html @@ -44,12 +44,11 @@ </div> </div> + <script src="../../dist/util.js"></script> <script src="../../dist/dom/polyfill.js"></script> <script src="../../dist/dom/eventHandler.js"></script> - <script src="../../dist/dom/manipulator.js"></script> <script src="../../dist/dom/selectorEngine.js"></script> <script src="../../dist/dom/data.js"></script> - <script src="../../dist/util.js"></script> <script src="../../dist/button.js"></script> </body> </html> |
