Commit 4febcb4b authored by Kevin Kirsche's avatar Kevin Kirsche

[Fixes #15953] Implement assert.expect in each unit test

[Fixes #15953] Implement `assert.expect` in each unit test
parent 4311e09b
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
<script> <script>
// See https://github.com/axemclion/grunt-saucelabs#test-result-details-with-qunit // See https://github.com/axemclion/grunt-saucelabs#test-result-details-with-qunit
var log = [] var log = []
// Require assert.expect in each test.
QUnit.config.requireExpects = true
QUnit.done(function (testResults) { QUnit.done(function (testResults) {
var tests = [] var tests = []
for (var i = 0, len = log.length; i < len; i++) { for (var i = 0, len = log.length; i < len; i++) {
......
...@@ -4,6 +4,7 @@ $(function () { ...@@ -4,6 +4,7 @@ $(function () {
QUnit.module('affix plugin') QUnit.module('affix plugin')
QUnit.test('should be defined on jquery object', function (assert) { QUnit.test('should be defined on jquery object', function (assert) {
assert.expect(1)
assert.ok($(document.body).affix, 'affix method is defined') assert.ok($(document.body).affix, 'affix method is defined')
}) })
...@@ -19,10 +20,12 @@ $(function () { ...@@ -19,10 +20,12 @@ $(function () {
}) })
QUnit.test('should provide no conflict', function (assert) { QUnit.test('should provide no conflict', function (assert) {
assert.expect(1)
assert.strictEqual($.fn.affix, undefined, 'affix was set back to undefined (org value)') assert.strictEqual($.fn.affix, undefined, 'affix was set back to undefined (org value)')
}) })
QUnit.test('should return jquery collection containing the element', function (assert) { QUnit.test('should return jquery collection containing the element', function (assert) {
assert.expect(2)
var $el = $('<div/>') var $el = $('<div/>')
var $affix = $el.bootstrapAffix() var $affix = $el.bootstrapAffix()
assert.ok($affix instanceof $, 'returns jquery collection') assert.ok($affix instanceof $, 'returns jquery collection')
...@@ -30,12 +33,14 @@ $(function () { ...@@ -30,12 +33,14 @@ $(function () {
}) })
QUnit.test('should exit early if element is not visible', function (assert) { QUnit.test('should exit early if element is not visible', function (assert) {
assert.expect(1)
var $affix = $('<div style="display: none"/>').bootstrapAffix() var $affix = $('<div style="display: none"/>').bootstrapAffix()
$affix.data('bs.affix').checkPosition() $affix.data('bs.affix').checkPosition()
assert.ok(!$affix.hasClass('affix'), 'affix class was not added') assert.ok(!$affix.hasClass('affix'), 'affix class was not added')
}) })
QUnit.test('should trigger affixed event after affix', function (assert) { QUnit.test('should trigger affixed event after affix', function (assert) {
assert.expect(2)
var done = assert.async() var done = assert.async()
var templateHTML = '<div id="affixTarget">' var templateHTML = '<div id="affixTarget">'
...@@ -70,6 +75,7 @@ $(function () { ...@@ -70,6 +75,7 @@ $(function () {
}) })
QUnit.test('should affix-top when scrolling up to offset when parent has padding', function (assert) { QUnit.test('should affix-top when scrolling up to offset when parent has padding', function (assert) {
assert.expect(1)
var done = assert.async() var done = assert.async()
var templateHTML = '<div id="padding-offset" style="padding-top: 20px;">' var templateHTML = '<div id="padding-offset" style="padding-top: 20px;">'
......
...@@ -4,6 +4,7 @@ $(function () { ...@@ -4,6 +4,7 @@ $(function () {
QUnit.module('alert plugin') QUnit.module('alert plugin')
QUnit.test('should be defined on jquery object', function (assert) { QUnit.test('should be defined on jquery object', function (assert) {
assert.expect(1)
assert.ok($(document.body).alert, 'alert method is defined') assert.ok($(document.body).alert, 'alert method is defined')
}) })
...@@ -19,10 +20,12 @@ $(function () { ...@@ -19,10 +20,12 @@ $(function () {
}) })
QUnit.test('should provide no conflict', function (assert) { QUnit.test('should provide no conflict', function (assert) {
assert.expect(1)
assert.strictEqual($.fn.alert, undefined, 'alert was set back to undefined (org value)') assert.strictEqual($.fn.alert, undefined, 'alert was set back to undefined (org value)')
}) })
QUnit.test('should return jquery collection containing the element', function (assert) { QUnit.test('should return jquery collection containing the element', function (assert) {
assert.expect(2)
var $el = $('<div/>') var $el = $('<div/>')
var $alert = $el.bootstrapAlert() var $alert = $el.bootstrapAlert()
assert.ok($alert instanceof $, 'returns jquery collection') assert.ok($alert instanceof $, 'returns jquery collection')
...@@ -30,6 +33,7 @@ $(function () { ...@@ -30,6 +33,7 @@ $(function () {
}) })
QUnit.test('should fade element out on clicking .close', function (assert) { QUnit.test('should fade element out on clicking .close', function (assert) {
assert.expect(1)
var alertHTML = '<div class="alert alert-danger fade in">' var alertHTML = '<div class="alert alert-danger fade in">'
+ '<a class="close" href="#" data-dismiss="alert">×</a>' + '<a class="close" href="#" data-dismiss="alert">×</a>'
+ '<p><strong>Holy guacamole!</strong> Best check yo self, you\'re not looking too good.</p>' + '<p><strong>Holy guacamole!</strong> Best check yo self, you\'re not looking too good.</p>'
...@@ -42,6 +46,7 @@ $(function () { ...@@ -42,6 +46,7 @@ $(function () {
}) })
QUnit.test('should remove element when clicking .close', function (assert) { QUnit.test('should remove element when clicking .close', function (assert) {
assert.expect(2)
var alertHTML = '<div class="alert alert-danger fade in">' var alertHTML = '<div class="alert alert-danger fade in">'
+ '<a class="close" href="#" data-dismiss="alert">×</a>' + '<a class="close" href="#" data-dismiss="alert">×</a>'
+ '<p><strong>Holy guacamole!</strong> Best check yo self, you\'re not looking too good.</p>' + '<p><strong>Holy guacamole!</strong> Best check yo self, you\'re not looking too good.</p>'
...@@ -56,6 +61,7 @@ $(function () { ...@@ -56,6 +61,7 @@ $(function () {
}) })
QUnit.test('should not fire closed when close is prevented', function (assert) { QUnit.test('should not fire closed when close is prevented', function (assert) {
assert.expect(1)
var done = assert.async() var done = assert.async()
$('<div class="alert"/>') $('<div class="alert"/>')
.on('close.bs.alert', function (e) { .on('close.bs.alert', function (e) {
......
...@@ -4,6 +4,7 @@ $(function () { ...@@ -4,6 +4,7 @@ $(function () {
QUnit.module('button plugin') QUnit.module('button plugin')
QUnit.test('should be defined on jquery object', function (assert) { QUnit.test('should be defined on jquery object', function (assert) {
assert.expect(1)
assert.ok($(document.body).button, 'button method is defined') assert.ok($(document.body).button, 'button method is defined')
}) })
...@@ -19,10 +20,12 @@ $(function () { ...@@ -19,10 +20,12 @@ $(function () {
}) })
QUnit.test('should provide no conflict', function (assert) { QUnit.test('should provide no conflict', function (assert) {
assert.expect(1)
assert.strictEqual($.fn.button, undefined, 'button was set back to undefined (org value)') assert.strictEqual($.fn.button, undefined, 'button was set back to undefined (org value)')
}) })
QUnit.test('should return jquery collection containing the element', function (assert) { QUnit.test('should return jquery collection containing the element', function (assert) {
assert.expect(2)
var $el = $('<div/>') var $el = $('<div/>')
var $button = $el.bootstrapButton() var $button = $el.bootstrapButton()
assert.ok($button instanceof $, 'returns jquery collection') assert.ok($button instanceof $, 'returns jquery collection')
...@@ -30,6 +33,7 @@ $(function () { ...@@ -30,6 +33,7 @@ $(function () {
}) })
QUnit.test('should return set state to loading', function (assert) { QUnit.test('should return set state to loading', function (assert) {
assert.expect(4)
var $btn = $('<button class="btn" data-loading-text="fat">mdo</button>') var $btn = $('<button class="btn" data-loading-text="fat">mdo</button>')
assert.strictEqual($btn.html(), 'mdo', 'btn text equals mdo') assert.strictEqual($btn.html(), 'mdo', 'btn text equals mdo')
$btn.bootstrapButton('loading') $btn.bootstrapButton('loading')
...@@ -43,6 +47,7 @@ $(function () { ...@@ -43,6 +47,7 @@ $(function () {
}) })
QUnit.test('should return reset state', function (assert) { QUnit.test('should return reset state', function (assert) {
assert.expect(7)
var $btn = $('<button class="btn" data-loading-text="fat">mdo</button>') var $btn = $('<button class="btn" data-loading-text="fat">mdo</button>')
assert.strictEqual($btn.html(), 'mdo', 'btn text equals mdo') assert.strictEqual($btn.html(), 'mdo', 'btn text equals mdo')
$btn.bootstrapButton('loading') $btn.bootstrapButton('loading')
...@@ -64,6 +69,7 @@ $(function () { ...@@ -64,6 +69,7 @@ $(function () {
}) })
QUnit.test('should work with an empty string as reset state', function (assert) { QUnit.test('should work with an empty string as reset state', function (assert) {
assert.expect(7)
var $btn = $('<button class="btn" data-loading-text="fat"/>') var $btn = $('<button class="btn" data-loading-text="fat"/>')
assert.strictEqual($btn.html(), '', 'btn text equals ""') assert.strictEqual($btn.html(), '', 'btn text equals ""')
$btn.bootstrapButton('loading') $btn.bootstrapButton('loading')
...@@ -85,6 +91,7 @@ $(function () { ...@@ -85,6 +91,7 @@ $(function () {
}) })
QUnit.test('should toggle active', function (assert) { QUnit.test('should toggle active', function (assert) {
assert.expect(2)
var $btn = $('<button class="btn" data-toggle="button">mdo</button>') var $btn = $('<button class="btn" data-toggle="button">mdo</button>')
assert.ok(!$btn.hasClass('active'), 'btn does not have active class') assert.ok(!$btn.hasClass('active'), 'btn does not have active class')
$btn.bootstrapButton('toggle') $btn.bootstrapButton('toggle')
...@@ -92,6 +99,7 @@ $(function () { ...@@ -92,6 +99,7 @@ $(function () {
}) })
QUnit.test('should toggle active when btn children are clicked', function (assert) { QUnit.test('should toggle active when btn children are clicked', function (assert) {
assert.expect(2)
var $btn = $('<button class="btn" data-toggle="button">mdo</button>') var $btn = $('<button class="btn" data-toggle="button">mdo</button>')
var $inner = $('<i/>') var $inner = $('<i/>')
$btn $btn
...@@ -103,6 +111,7 @@ $(function () { ...@@ -103,6 +111,7 @@ $(function () {
}) })
QUnit.test('should toggle aria-pressed', function (assert) { QUnit.test('should toggle aria-pressed', function (assert) {
assert.expect(2)
var $btn = $('<button class="btn" data-toggle="button" aria-pressed="false">redux</button>') var $btn = $('<button class="btn" data-toggle="button" aria-pressed="false">redux</button>')
assert.strictEqual($btn.attr('aria-pressed'), 'false', 'btn aria-pressed state is false') assert.strictEqual($btn.attr('aria-pressed'), 'false', 'btn aria-pressed state is false')
$btn.bootstrapButton('toggle') $btn.bootstrapButton('toggle')
...@@ -110,6 +119,7 @@ $(function () { ...@@ -110,6 +119,7 @@ $(function () {
}) })
QUnit.test('should toggle aria-pressed when btn children are clicked', function (assert) { QUnit.test('should toggle aria-pressed when btn children are clicked', function (assert) {
assert.expect(2)
var $btn = $('<button class="btn" data-toggle="button" aria-pressed="false">redux</button>') var $btn = $('<button class="btn" data-toggle="button" aria-pressed="false">redux</button>')
var $inner = $('<i/>') var $inner = $('<i/>')
$btn $btn
...@@ -121,6 +131,7 @@ $(function () { ...@@ -121,6 +131,7 @@ $(function () {
}) })
QUnit.test('should toggle active when btn children are clicked within btn-group', function (assert) { QUnit.test('should toggle active when btn children are clicked within btn-group', function (assert) {
assert.expect(2)
var $btngroup = $('<div class="btn-group" data-toggle="buttons"/>') var $btngroup = $('<div class="btn-group" data-toggle="buttons"/>')
var $btn = $('<button class="btn">fat</button>') var $btn = $('<button class="btn">fat</button>')
var $inner = $('<i/>') var $inner = $('<i/>')
...@@ -133,6 +144,7 @@ $(function () { ...@@ -133,6 +144,7 @@ $(function () {
}) })
QUnit.test('should check for closest matching toggle', function (assert) { QUnit.test('should check for closest matching toggle', function (assert) {
assert.expect(12)
var groupHTML = '<div class="btn-group" data-toggle="buttons">' var groupHTML = '<div class="btn-group" data-toggle="buttons">'
+ '<label class="btn btn-primary active">' + '<label class="btn btn-primary active">'
+ '<input type="radio" name="options" id="option1" checked="true"> Option 1' + '<input type="radio" name="options" id="option1" checked="true"> Option 1'
......
...@@ -4,6 +4,7 @@ $(function () { ...@@ -4,6 +4,7 @@ $(function () {
QUnit.module('carousel plugin') QUnit.module('carousel plugin')
QUnit.test('should be defined on jQuery object', function (assert) { QUnit.test('should be defined on jQuery object', function (assert) {
assert.expect(1)
assert.ok($(document.body).carousel, 'carousel method is defined') assert.ok($(document.body).carousel, 'carousel method is defined')
}) })
...@@ -19,10 +20,12 @@ $(function () { ...@@ -19,10 +20,12 @@ $(function () {
}) })
QUnit.test('should provide no conflict', function (assert) { QUnit.test('should provide no conflict', function (assert) {
assert.expect(1)
assert.strictEqual($.fn.carousel, undefined, 'carousel was set back to undefined (orig value)') assert.strictEqual($.fn.carousel, undefined, 'carousel was set back to undefined (orig value)')
}) })
QUnit.test('should return jquery collection containing the element', function (assert) { QUnit.test('should return jquery collection containing the element', function (assert) {
assert.expect(2)
var $el = $('<div/>') var $el = $('<div/>')
var $carousel = $el.bootstrapCarousel() var $carousel = $el.bootstrapCarousel()
assert.ok($carousel instanceof $, 'returns jquery collection') assert.ok($carousel instanceof $, 'returns jquery collection')
...@@ -30,6 +33,7 @@ $(function () { ...@@ -30,6 +33,7 @@ $(function () {
}) })
QUnit.test('should not fire slid when slide is prevented', function (assert) { QUnit.test('should not fire slid when slide is prevented', function (assert) {
assert.expect(1)
var done = assert.async() var done = assert.async()
$('<div class="carousel"/>') $('<div class="carousel"/>')
.on('slide.bs.carousel', function (e) { .on('slide.bs.carousel', function (e) {
...@@ -44,6 +48,7 @@ $(function () { ...@@ -44,6 +48,7 @@ $(function () {
}) })
QUnit.test('should reset when slide is prevented', function (assert) { QUnit.test('should reset when slide is prevented', function (assert) {
assert.expect(6)
var carouselHTML = '<div id="carousel-example-generic" class="carousel slide">' var carouselHTML = '<div id="carousel-example-generic" class="carousel slide">'
+ '<ol class="carousel-indicators">' + '<ol class="carousel-indicators">'
+ '<li data-target="#carousel-example-generic" data-slide-to="0" class="active"/>' + '<li data-target="#carousel-example-generic" data-slide-to="0" class="active"/>'
...@@ -89,6 +94,7 @@ $(function () { ...@@ -89,6 +94,7 @@ $(function () {
}) })
QUnit.test('should fire slide event with direction', function (assert) { QUnit.test('should fire slide event with direction', function (assert) {
assert.expect(4)
var carouselHTML = '<div id="myCarousel" class="carousel slide">' var carouselHTML = '<div id="myCarousel" class="carousel slide">'
+ '<div class="carousel-inner">' + '<div class="carousel-inner">'
+ '<div class="item active">' + '<div class="item active">'
...@@ -143,6 +149,7 @@ $(function () { ...@@ -143,6 +149,7 @@ $(function () {
}) })
QUnit.test('should fire slid event with direction', function (assert) { QUnit.test('should fire slid event with direction', function (assert) {
assert.expect(4)
var carouselHTML = '<div id="myCarousel" class="carousel slide">' var carouselHTML = '<div id="myCarousel" class="carousel slide">'
+ '<div class="carousel-inner">' + '<div class="carousel-inner">'
+ '<div class="item active">' + '<div class="item active">'
...@@ -197,6 +204,7 @@ $(function () { ...@@ -197,6 +204,7 @@ $(function () {
}) })
QUnit.test('should fire slide event with relatedTarget', function (assert) { QUnit.test('should fire slide event with relatedTarget', function (assert) {
assert.expect(2)
var template = '<div id="myCarousel" class="carousel slide">' var template = '<div id="myCarousel" class="carousel slide">'
+ '<div class="carousel-inner">' + '<div class="carousel-inner">'
+ '<div class="item active">' + '<div class="item active">'
...@@ -243,6 +251,7 @@ $(function () { ...@@ -243,6 +251,7 @@ $(function () {
}) })
QUnit.test('should fire slid event with relatedTarget', function (assert) { QUnit.test('should fire slid event with relatedTarget', function (assert) {
assert.expect(2)
var template = '<div id="myCarousel" class="carousel slide">' var template = '<div id="myCarousel" class="carousel slide">'
+ '<div class="carousel-inner">' + '<div class="carousel-inner">'
+ '<div class="item active">' + '<div class="item active">'
...@@ -289,6 +298,7 @@ $(function () { ...@@ -289,6 +298,7 @@ $(function () {
}) })
QUnit.test('should set interval from data attribute', function (assert) { QUnit.test('should set interval from data attribute', function (assert) {
assert.expect(4)
var templateHTML = '<div id="myCarousel" class="carousel slide">' var templateHTML = '<div id="myCarousel" class="carousel slide">'
+ '<div class="carousel-inner">' + '<div class="carousel-inner">'
+ '<div class="item active">' + '<div class="item active">'
...@@ -350,6 +360,7 @@ $(function () { ...@@ -350,6 +360,7 @@ $(function () {
}) })
QUnit.test('should skip over non-items when using item indices', function (assert) { QUnit.test('should skip over non-items when using item indices', function (assert) {
assert.expect(2)
var templateHTML = '<div id="myCarousel" class="carousel" data-interval="1814">' var templateHTML = '<div id="myCarousel" class="carousel" data-interval="1814">'
+ '<div class="carousel-inner">' + '<div class="carousel-inner">'
+ '<div class="item active">' + '<div class="item active">'
...@@ -375,6 +386,7 @@ $(function () { ...@@ -375,6 +386,7 @@ $(function () {
}) })
QUnit.test('should skip over non-items when using next/prev methods', function (assert) { QUnit.test('should skip over non-items when using next/prev methods', function (assert) {
assert.expect(2)
var templateHTML = '<div id="myCarousel" class="carousel" data-interval="1814">' var templateHTML = '<div id="myCarousel" class="carousel" data-interval="1814">'
+ '<div class="carousel-inner">' + '<div class="carousel-inner">'
+ '<div class="item active">' + '<div class="item active">'
...@@ -400,6 +412,7 @@ $(function () { ...@@ -400,6 +412,7 @@ $(function () {
}) })
QUnit.test('should go to previous item if left arrow key is pressed', function (assert) { QUnit.test('should go to previous item if left arrow key is pressed', function (assert) {
assert.expect(2)
var templateHTML = '<div id="myCarousel" class="carousel" data-interval="false">' var templateHTML = '<div id="myCarousel" class="carousel" data-interval="false">'
+ '<div class="carousel-inner">' + '<div class="carousel-inner">'
+ '<div id="first" class="item">' + '<div id="first" class="item">'
...@@ -425,6 +438,7 @@ $(function () { ...@@ -425,6 +438,7 @@ $(function () {
}) })
QUnit.test('should go to next item if right arrow key is pressed', function (assert) { QUnit.test('should go to next item if right arrow key is pressed', function (assert) {
assert.expect(2)
var templateHTML = '<div id="myCarousel" class="carousel" data-interval="false">' var templateHTML = '<div id="myCarousel" class="carousel" data-interval="false">'
+ '<div class="carousel-inner">' + '<div class="carousel-inner">'
+ '<div id="first" class="item active">' + '<div id="first" class="item active">'
...@@ -450,6 +464,7 @@ $(function () { ...@@ -450,6 +464,7 @@ $(function () {
}) })
QUnit.test('should support disabling the keyboard navigation', function (assert) { QUnit.test('should support disabling the keyboard navigation', function (assert) {
assert.expect(3)
var templateHTML = '<div id="myCarousel" class="carousel" data-interval="false" data-keyboard="false">' var templateHTML = '<div id="myCarousel" class="carousel" data-interval="false" data-keyboard="false">'
+ '<div class="carousel-inner">' + '<div class="carousel-inner">'
+ '<div id="first" class="item active">' + '<div id="first" class="item active">'
...@@ -479,6 +494,7 @@ $(function () { ...@@ -479,6 +494,7 @@ $(function () {
}) })
QUnit.test('should ignore keyboard events within <input>s and <textarea>s', function (assert) { QUnit.test('should ignore keyboard events within <input>s and <textarea>s', function (assert) {
assert.expect(7)
var templateHTML = '<div id="myCarousel" class="carousel" data-interval="false">' var templateHTML = '<div id="myCarousel" class="carousel" data-interval="false">'
+ '<div class="carousel-inner">' + '<div class="carousel-inner">'
+ '<div id="first" class="item active">' + '<div id="first" class="item active">'
...@@ -521,6 +537,7 @@ $(function () { ...@@ -521,6 +537,7 @@ $(function () {
}) })
QUnit.test('should only add mouseenter and mouseleave listeners when not on mobile', function (assert) { QUnit.test('should only add mouseenter and mouseleave listeners when not on mobile', function (assert) {
assert.expect(2)
var isMobile = 'ontouchstart' in document.documentElement var isMobile = 'ontouchstart' in document.documentElement
var templateHTML = '<div id="myCarousel" class="carousel" data-interval="false" data-pause="hover">' var templateHTML = '<div id="myCarousel" class="carousel" data-interval="false" data-pause="hover">'
+ '<div class="carousel-inner">' + '<div class="carousel-inner">'
...@@ -543,6 +560,7 @@ $(function () { ...@@ -543,6 +560,7 @@ $(function () {
}) })
QUnit.test('should wrap around from end to start when wrap option is true', function (assert) { QUnit.test('should wrap around from end to start when wrap option is true', function (assert) {
assert.expect(3)
var carouselHTML = '<div id="carousel-example-generic" class="carousel slide" data-wrap="true">' var carouselHTML = '<div id="carousel-example-generic" class="carousel slide" data-wrap="true">'
+ '<ol class="carousel-indicators">' + '<ol class="carousel-indicators">'
+ '<li data-target="#carousel-example-generic" data-slide-to="0" class="active"/>' + '<li data-target="#carousel-example-generic" data-slide-to="0" class="active"/>'
...@@ -587,6 +605,7 @@ $(function () { ...@@ -587,6 +605,7 @@ $(function () {
}) })
QUnit.test('should wrap around from start to end when wrap option is true', function (assert) { QUnit.test('should wrap around from start to end when wrap option is true', function (assert) {
assert.expect(1)
var carouselHTML = '<div id="carousel-example-generic" class="carousel slide" data-wrap="true">' var carouselHTML = '<div id="carousel-example-generic" class="carousel slide" data-wrap="true">'
+ '<ol class="carousel-indicators">' + '<ol class="carousel-indicators">'
+ '<li data-target="#carousel-example-generic" data-slide-to="0" class="active"/>' + '<li data-target="#carousel-example-generic" data-slide-to="0" class="active"/>'
...@@ -620,6 +639,7 @@ $(function () { ...@@ -620,6 +639,7 @@ $(function () {
}) })
QUnit.test('should stay at the end when the next method is called and wrap is false', function (assert) { QUnit.test('should stay at the end when the next method is called and wrap is false', function (assert) {
assert.expect(3)
var carouselHTML = '<div id="carousel-example-generic" class="carousel slide" data-wrap="false">' var carouselHTML = '<div id="carousel-example-generic" class="carousel slide" data-wrap="false">'
+ '<ol class="carousel-indicators">' + '<ol class="carousel-indicators">'
+ '<li data-target="#carousel-example-generic" data-slide-to="0" class="active"/>' + '<li data-target="#carousel-example-generic" data-slide-to="0" class="active"/>'
...@@ -665,6 +685,7 @@ $(function () { ...@@ -665,6 +685,7 @@ $(function () {
}) })
QUnit.test('should stay at the start when the prev method is called and wrap is false', function (assert) { QUnit.test('should stay at the start when the prev method is called and wrap is false', function (assert) {
assert.expect(1)
var carouselHTML = '<div id="carousel-example-generic" class="carousel slide" data-wrap="false">' var carouselHTML = '<div id="carousel-example-generic" class="carousel slide" data-wrap="false">'
+ '<ol class="carousel-indicators">' + '<ol class="carousel-indicators">'
+ '<li data-target="#carousel-example-generic" data-slide-to="0" class="active"/>' + '<li data-target="#carousel-example-generic" data-slide-to="0" class="active"/>'
......
...@@ -4,6 +4,7 @@ $(function () { ...@@ -4,6 +4,7 @@ $(function () {
QUnit.module('collapse plugin') QUnit.module('collapse plugin')
QUnit.test('should be defined on jquery object', function (assert) { QUnit.test('should be defined on jquery object', function (assert) {
assert.expect(1)
assert.ok($(document.body).collapse, 'collapse method is defined') assert.ok($(document.body).collapse, 'collapse method is defined')
}) })
...@@ -19,10 +20,12 @@ $(function () { ...@@ -19,10 +20,12 @@ $(function () {
}) })
QUnit.test('should provide no conflict', function (assert) { QUnit.test('should provide no conflict', function (assert) {
assert.expect(1)
assert.strictEqual($.fn.collapse, undefined, 'collapse was set back to undefined (org value)') assert.strictEqual($.fn.collapse, undefined, 'collapse was set back to undefined (org value)')
}) })
QUnit.test('should return jquery collection containing the element', function (assert) { QUnit.test('should return jquery collection containing the element', function (assert) {
assert.expect(2)
var $el = $('<div/>') var $el = $('<div/>')
var $collapse = $el.bootstrapCollapse() var $collapse = $el.bootstrapCollapse()
assert.ok($collapse instanceof $, 'returns jquery collection') assert.ok($collapse instanceof $, 'returns jquery collection')
...@@ -30,6 +33,7 @@ $(function () { ...@@ -30,6 +33,7 @@ $(function () {
}) })
QUnit.test('should show a collapsed element', function (assert) { QUnit.test('should show a collapsed element', function (assert) {
assert.expect(2)
var $el = $('<div class="collapse"/>').bootstrapCollapse('show') var $el = $('<div class="collapse"/>').bootstrapCollapse('show')
assert.ok($el.hasClass('in'), 'has class "in"') assert.ok($el.hasClass('in'), 'has class "in"')
...@@ -37,6 +41,7 @@ $(function () { ...@@ -37,6 +41,7 @@ $(function () {
}) })
QUnit.test('should hide a collapsed element', function (assert) { QUnit.test('should hide a collapsed element', function (assert) {
assert.expect(2)
var $el = $('<div class="collapse"/>').bootstrapCollapse('hide') var $el = $('<div class="collapse"/>').bootstrapCollapse('hide')
assert.ok(!$el.hasClass('in'), 'does not have class "in"') assert.ok(!$el.hasClass('in'), 'does not have class "in"')
...@@ -44,6 +49,7 @@ $(function () { ...@@ -44,6 +49,7 @@ $(function () {
}) })
QUnit.test('should not fire shown when show is prevented', function (assert) { QUnit.test('should not fire shown when show is prevented', function (assert) {
assert.expect(1)
var done = assert.async() var done = assert.async()
$('<div class="collapse"/>') $('<div class="collapse"/>')
...@@ -59,6 +65,7 @@ $(function () { ...@@ -59,6 +65,7 @@ $(function () {
}) })
QUnit.test('should reset style to auto after finishing opening collapse', function (assert) { QUnit.test('should reset style to auto after finishing opening collapse', function (assert) {
assert.expect(2)
var done = assert.async() var done = assert.async()
$('<div class="collapse" style="height: 0px"/>') $('<div class="collapse" style="height: 0px"/>')
...@@ -73,6 +80,7 @@ $(function () { ...@@ -73,6 +80,7 @@ $(function () {
}) })
QUnit.test('should remove "collapsed" class from target when collapse is shown', function (assert) { QUnit.test('should remove "collapsed" class from target when collapse is shown', function (assert) {
assert.expect(1)
var done = assert.async() var done = assert.async()
var $target = $('<a data-toggle="collapse" class="collapsed" href="#test1"/>').appendTo('#qunit-fixture') var $target = $('<a data-toggle="collapse" class="collapsed" href="#test1"/>').appendTo('#qunit-fixture')
...@@ -88,6 +96,7 @@ $(function () { ...@@ -88,6 +96,7 @@ $(function () {
}) })
QUnit.test('should add "collapsed" class to target when collapse is hidden', function (assert) { QUnit.test('should add "collapsed" class to target when collapse is hidden', function (assert) {
assert.expect(1)
var done = assert.async() var done = assert.async()
var $target = $('<a data-toggle="collapse" href="#test1"/>').appendTo('#qunit-fixture') var $target = $('<a data-toggle="collapse" href="#test1"/>').appendTo('#qunit-fixture')
...@@ -103,6 +112,7 @@ $(function () { ...@@ -103,6 +112,7 @@ $(function () {
}) })
QUnit.test('should remove "collapsed" class from all triggers targeting the collapse when the collapse is shown', function (assert) { QUnit.test('should remove "collapsed" class from all triggers targeting the collapse when the collapse is shown', function (assert) {
assert.expect(2)
var done = assert.async() var done = assert.async()
var $target = $('<a data-toggle="collapse" class="collapsed" href="#test1"/>').appendTo('#qunit-fixture') var $target = $('<a data-toggle="collapse" class="collapsed" href="#test1"/>').appendTo('#qunit-fixture')
...@@ -120,6 +130,7 @@ $(function () { ...@@ -120,6 +130,7 @@ $(function () {
}) })
QUnit.test('should add "collapsed" class to all triggers targeting the collapse when the collapse is hidden', function (assert) { QUnit.test('should add "collapsed" class to all triggers targeting the collapse when the collapse is hidden', function (assert) {
assert.expect(2)
var done = assert.async() var done = assert.async()
var $target = $('<a data-toggle="collapse" href="#test1"/>').appendTo('#qunit-fixture') var $target = $('<a data-toggle="collapse" href="#test1"/>').appendTo('#qunit-fixture')
...@@ -137,9 +148,8 @@ $(function () { ...@@ -137,9 +148,8 @@ $(function () {
}) })
QUnit.test('should not close a collapse when initialized with "show" if already shown', function (assert) { QUnit.test('should not close a collapse when initialized with "show" if already shown', function (assert) {
var done = assert.async()
assert.expect(0) assert.expect(0)
var done = assert.async()
var $test = $('<div id="test1" class="in"/>') var $test = $('<div id="test1" class="in"/>')
.appendTo('#qunit-fixture') .appendTo('#qunit-fixture')
...@@ -153,9 +163,8 @@ $(function () { ...@@ -153,9 +163,8 @@ $(function () {
}) })
QUnit.test('should open a collapse when initialized with "show" if not already shown', function (assert) { QUnit.test('should open a collapse when initialized with "show" if not already shown', function (assert) {
var done = assert.async()
assert.expect(1) assert.expect(1)
var done = assert.async()
var $test = $('<div id="test1" />') var $test = $('<div id="test1" />')
.appendTo('#qunit-fixture') .appendTo('#qunit-fixture')
...@@ -169,6 +178,7 @@ $(function () { ...@@ -169,6 +178,7 @@ $(function () {
}) })
QUnit.test('should remove "collapsed" class from active accordion target', function (assert) { QUnit.test('should remove "collapsed" class from active accordion target', function (assert) {
assert.expect(3)
var done = assert.async() var done = assert.async()
var accordionHTML = '<div class="panel-group" id="accordion">' var accordionHTML = '<div class="panel-group" id="accordion">'
...@@ -202,6 +212,7 @@ $(function () { ...@@ -202,6 +212,7 @@ $(function () {
}) })
QUnit.test('should allow dots in data-parent', function (assert) { QUnit.test('should allow dots in data-parent', function (assert) {
assert.expect(3)
var done = assert.async() var done = assert.async()
var accordionHTML = '<div class="panel-group accordion">' var accordionHTML = '<div class="panel-group accordion">'
...@@ -235,6 +246,7 @@ $(function () { ...@@ -235,6 +246,7 @@ $(function () {
}) })
QUnit.test('should set aria-expanded="true" on target when collapse is shown', function (assert) { QUnit.test('should set aria-expanded="true" on target when collapse is shown', function (assert) {
assert.expect(1)
var done = assert.async() var done = assert.async()
var $target = $('<a data-toggle="collapse" class="collapsed" href="#test1" aria-expanded="false"/>').appendTo('#qunit-fixture') var $target = $('<a data-toggle="collapse" class="collapsed" href="#test1" aria-expanded="false"/>').appendTo('#qunit-fixture')
...@@ -250,6 +262,7 @@ $(function () { ...@@ -250,6 +262,7 @@ $(function () {
}) })
QUnit.test('should set aria-expanded="false" on target when collapse is hidden', function (assert) { QUnit.test('should set aria-expanded="false" on target when collapse is hidden', function (assert) {
assert.expect(1)
var done = assert.async() var done = assert.async()
var $target = $('<a data-toggle="collapse" href="#test1" aria-expanded="true"/>').appendTo('#qunit-fixture') var $target = $('<a data-toggle="collapse" href="#test1" aria-expanded="true"/>').appendTo('#qunit-fixture')
...@@ -265,6 +278,7 @@ $(function () { ...@@ -265,6 +278,7 @@ $(function () {
}) })
QUnit.test('should set aria-expanded="true" on all triggers targeting the collapse when the collapse is shown', function (assert) { QUnit.test('should set aria-expanded="true" on all triggers targeting the collapse when the collapse is shown', function (assert) {
assert.expect(2)
var done = assert.async() var done = assert.async()
var $target = $('<a data-toggle="collapse" class="collapsed" href="#test1" aria-expanded="false"/>').appendTo('#qunit-fixture') var $target = $('<a data-toggle="collapse" class="collapsed" href="#test1" aria-expanded="false"/>').appendTo('#qunit-fixture')
...@@ -282,6 +296,7 @@ $(function () { ...@@ -282,6 +296,7 @@ $(function () {
}) })
QUnit.test('should set aria-expanded="false" on all triggers targeting the collapse when the collapse is hidden', function (assert) { QUnit.test('should set aria-expanded="false" on all triggers targeting the collapse when the collapse is hidden', function (assert) {
assert.expect(2)
var done = assert.async() var done = assert.async()
var $target = $('<a data-toggle="collapse" href="#test1" aria-expanded="true"/>').appendTo('#qunit-fixture') var $target = $('<a data-toggle="collapse" href="#test1" aria-expanded="true"/>').appendTo('#qunit-fixture')
...@@ -299,6 +314,7 @@ $(function () { ...@@ -299,6 +314,7 @@ $(function () {
}) })
QUnit.test('should change aria-expanded from active accordion target to "false" and set the newly active one to "true"', function (assert) { QUnit.test('should change aria-expanded from active accordion target to "false" and set the newly active one to "true"', function (assert) {
assert.expect(3)
var done = assert.async() var done = assert.async()
var accordionHTML = '<div class="panel-group" id="accordion">' var accordionHTML = '<div class="panel-group" id="accordion">'
...@@ -332,6 +348,7 @@ $(function () { ...@@ -332,6 +348,7 @@ $(function () {
}) })
QUnit.test('should not fire show event if show is prevented because other element is still transitioning', function (assert) { QUnit.test('should not fire show event if show is prevented because other element is still transitioning', function (assert) {
assert.expect(1)
var done = assert.async() var done = assert.async()
var accordionHTML = '<div id="accordion">' var accordionHTML = '<div id="accordion">'
...@@ -367,6 +384,7 @@ $(function () { ...@@ -367,6 +384,7 @@ $(function () {
}) })
QUnit.test('should add "collapsed" class to target when collapse is hidden via manual invocation', function (assert) { QUnit.test('should add "collapsed" class to target when collapse is hidden via manual invocation', function (assert) {
assert.expect(1)
var done = assert.async() var done = assert.async()
var $target = $('<a data-toggle="collapse" href="#test1"/>').appendTo('#qunit-fixture') var $target = $('<a data-toggle="collapse" href="#test1"/>').appendTo('#qunit-fixture')
...@@ -381,6 +399,7 @@ $(function () { ...@@ -381,6 +399,7 @@ $(function () {
}) })
QUnit.test('should remove "collapsed" class from target when collapse is shown via manual invocation', function (assert) { QUnit.test('should remove "collapsed" class from target when collapse is shown via manual invocation', function (assert) {
assert.expect(1)
var done = assert.async() var done = assert.async()
var $target = $('<a data-toggle="collapse" class="collapsed" href="#test1"/>').appendTo('#qunit-fixture') var $target = $('<a data-toggle="collapse" class="collapsed" href="#test1"/>').appendTo('#qunit-fixture')
......
...@@ -4,6 +4,7 @@ $(function () { ...@@ -4,6 +4,7 @@ $(function () {
QUnit.module('dropdowns plugin') QUnit.module('dropdowns plugin')
QUnit.test('should be defined on jquery object', function (assert) { QUnit.test('should be defined on jquery object', function (assert) {
assert.expect(1)
assert.ok($(document.body).dropdown, 'dropdown method is defined') assert.ok($(document.body).dropdown, 'dropdown method is defined')
}) })
...@@ -19,10 +20,12 @@ $(function () { ...@@ -19,10 +20,12 @@ $(function () {
}) })
QUnit.test('should provide no conflict', function (assert) { QUnit.test('should provide no conflict', function (assert) {
assert.expect(1)
assert.strictEqual($.fn.dropdown, undefined, 'dropdown was set back to undefined (org value)') assert.strictEqual($.fn.dropdown, undefined, 'dropdown was set back to undefined (org value)')
}) })
QUnit.test('should return jquery collection containing the element', function (assert) { QUnit.test('should return jquery collection containing the element', function (assert) {
assert.expect(2)
var $el = $('<div/>') var $el = $('<div/>')
var $dropdown = $el.bootstrapDropdown() var $dropdown = $el.bootstrapDropdown()
assert.ok($dropdown instanceof $, 'returns jquery collection') assert.ok($dropdown instanceof $, 'returns jquery collection')
...@@ -30,6 +33,7 @@ $(function () { ...@@ -30,6 +33,7 @@ $(function () {
}) })
QUnit.test('should not open dropdown if target is disabled via attribute', function (assert) { QUnit.test('should not open dropdown if target is disabled via attribute', function (assert) {
assert.expect(1)
var dropdownHTML = '<ul class="tabs">' var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">' + '<li class="dropdown">'
+ '<button disabled href="#" class="btn dropdown-toggle" data-toggle="dropdown">Dropdown</button>' + '<button disabled href="#" class="btn dropdown-toggle" data-toggle="dropdown">Dropdown</button>'
...@@ -47,6 +51,7 @@ $(function () { ...@@ -47,6 +51,7 @@ $(function () {
}) })
QUnit.test('should set aria-expanded="true" on target when dropdown menu is shown', function (assert) { QUnit.test('should set aria-expanded="true" on target when dropdown menu is shown', function (assert) {
assert.expect(1)
var dropdownHTML = '<ul class="tabs">' var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">' + '<li class="dropdown">'
+ '<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">Dropdown</a>' + '<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">Dropdown</a>'
...@@ -67,6 +72,7 @@ $(function () { ...@@ -67,6 +72,7 @@ $(function () {
}) })
QUnit.test('should set aria-expanded="false" on target when dropdown menu is hidden', function (assert) { QUnit.test('should set aria-expanded="false" on target when dropdown menu is hidden', function (assert) {
assert.expect(1)
var done = assert.async() var done = assert.async()
var dropdownHTML = '<ul class="tabs">' var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">' + '<li class="dropdown">'
...@@ -96,6 +102,7 @@ $(function () { ...@@ -96,6 +102,7 @@ $(function () {
}) })
QUnit.test('should not open dropdown if target is disabled via class', function (assert) { QUnit.test('should not open dropdown if target is disabled via class', function (assert) {
assert.expect(1)
var dropdownHTML = '<ul class="tabs">' var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">' + '<li class="dropdown">'
+ '<button href="#" class="btn dropdown-toggle disabled" data-toggle="dropdown">Dropdown</button>' + '<button href="#" class="btn dropdown-toggle disabled" data-toggle="dropdown">Dropdown</button>'
...@@ -113,6 +120,7 @@ $(function () { ...@@ -113,6 +120,7 @@ $(function () {
}) })
QUnit.test('should add class open to menu if clicked', function (assert) { QUnit.test('should add class open to menu if clicked', function (assert) {
assert.expect(1)
var dropdownHTML = '<ul class="tabs">' var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">' + '<li class="dropdown">'
+ '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>' + '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>'
...@@ -130,6 +138,7 @@ $(function () { ...@@ -130,6 +138,7 @@ $(function () {
}) })
QUnit.test('should test if element has a # before assuming it\'s a selector', function (assert) { QUnit.test('should test if element has a # before assuming it\'s a selector', function (assert) {
assert.expect(1)
var dropdownHTML = '<ul class="tabs">' var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">' + '<li class="dropdown">'
+ '<a href="/foo/" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>' + '<a href="/foo/" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>'
...@@ -148,6 +157,7 @@ $(function () { ...@@ -148,6 +157,7 @@ $(function () {
QUnit.test('should remove "open" class if body is clicked', function (assert) { QUnit.test('should remove "open" class if body is clicked', function (assert) {
assert.expect(2)
var dropdownHTML = '<ul class="tabs">' var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">' + '<li class="dropdown">'
+ '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>' + '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>'
...@@ -171,6 +181,7 @@ $(function () { ...@@ -171,6 +181,7 @@ $(function () {
}) })
QUnit.test('should remove "open" class if body is clicked, with multiple dropdowns', function (assert) { QUnit.test('should remove "open" class if body is clicked, with multiple dropdowns', function (assert) {
assert.expect(7)
var dropdownHTML = '<ul class="nav">' var dropdownHTML = '<ul class="nav">'
+ '<li><a href="#menu1">Menu 1</a></li>' + '<li><a href="#menu1">Menu 1</a></li>'
+ '<li class="dropdown" id="testmenu">' + '<li class="dropdown" id="testmenu">'
...@@ -207,6 +218,7 @@ $(function () { ...@@ -207,6 +218,7 @@ $(function () {
}) })
QUnit.test('should fire show and hide event', function (assert) { QUnit.test('should fire show and hide event', function (assert) {
assert.expect(2)
var dropdownHTML = '<ul class="tabs">' var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">' + '<li class="dropdown">'
+ '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>' + '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>'
...@@ -241,6 +253,7 @@ $(function () { ...@@ -241,6 +253,7 @@ $(function () {
QUnit.test('should fire shown and hidden event', function (assert) { QUnit.test('should fire shown and hidden event', function (assert) {
assert.expect(2)
var dropdownHTML = '<ul class="tabs">' var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">' + '<li class="dropdown">'
+ '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>' + '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>'
...@@ -274,6 +287,7 @@ $(function () { ...@@ -274,6 +287,7 @@ $(function () {
}) })
QUnit.test('should ignore keyboard events within <input>s and <textarea>s', function (assert) { QUnit.test('should ignore keyboard events within <input>s and <textarea>s', function (assert) {
assert.expect(3)
var done = assert.async() var done = assert.async()
var dropdownHTML = '<ul class="tabs">' var dropdownHTML = '<ul class="tabs">'
...@@ -315,6 +329,7 @@ $(function () { ...@@ -315,6 +329,7 @@ $(function () {
}) })
QUnit.test('should skip disabled element when using keyboard navigation', function (assert) { QUnit.test('should skip disabled element when using keyboard navigation', function (assert) {
assert.expect(1)
var dropdownHTML = '<ul class="tabs">' var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">' + '<li class="dropdown">'
+ '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>' + '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>'
......
...@@ -4,6 +4,7 @@ $(function () { ...@@ -4,6 +4,7 @@ $(function () {
QUnit.module('modal plugin') QUnit.module('modal plugin')
QUnit.test('should be defined on jquery object', function (assert) { QUnit.test('should be defined on jquery object', function (assert) {
assert.expect(1)
assert.ok($(document.body).modal, 'modal method is defined') assert.ok($(document.body).modal, 'modal method is defined')
}) })
...@@ -19,10 +20,12 @@ $(function () { ...@@ -19,10 +20,12 @@ $(function () {
}) })
QUnit.test('should provide no conflict', function (assert) { QUnit.test('should provide no conflict', function (assert) {
assert.expect(1)
assert.strictEqual($.fn.modal, undefined, 'modal was set back to undefined (orig value)') assert.strictEqual($.fn.modal, undefined, 'modal was set back to undefined (orig value)')
}) })
QUnit.test('should return jquery collection containing the element', function (assert) { QUnit.test('should return jquery collection containing the element', function (assert) {
assert.expect(2)
var $el = $('<div id="modal-test"/>') var $el = $('<div id="modal-test"/>')
var $modal = $el.bootstrapModal() var $modal = $el.bootstrapModal()
assert.ok($modal instanceof $, 'returns jquery collection') assert.ok($modal instanceof $, 'returns jquery collection')
...@@ -30,10 +33,12 @@ $(function () { ...@@ -30,10 +33,12 @@ $(function () {
}) })
QUnit.test('should expose defaults var for settings', function (assert) { QUnit.test('should expose defaults var for settings', function (assert) {
assert.expect(1)
assert.ok($.fn.bootstrapModal.Constructor.DEFAULTS, 'default object exposed') assert.ok($.fn.bootstrapModal.Constructor.DEFAULTS, 'default object exposed')
}) })
QUnit.test('should insert into dom when show method is called', function (assert) { QUnit.test('should insert into dom when show method is called', function (assert) {
assert.expect(1)
var done = assert.async() var done = assert.async()
$('<div id="modal-test"/>') $('<div id="modal-test"/>')
...@@ -45,6 +50,7 @@ $(function () { ...@@ -45,6 +50,7 @@ $(function () {
}) })
QUnit.test('should set aria-hidden to false when show method is called', function (assert) { QUnit.test('should set aria-hidden to false when show method is called', function (assert) {
assert.expect(1)
var done = assert.async() var done = assert.async()
$('<div id="modal-test"/>') $('<div id="modal-test"/>')
...@@ -56,6 +62,7 @@ $(function () { ...@@ -56,6 +62,7 @@ $(function () {
}) })
QUnit.test('should fire show event', function (assert) { QUnit.test('should fire show event', function (assert) {
assert.expect(1)
var done = assert.async() var done = assert.async()
$('<div id="modal-test"/>') $('<div id="modal-test"/>')
...@@ -67,6 +74,7 @@ $(function () { ...@@ -67,6 +74,7 @@ $(function () {
}) })
QUnit.test('should not fire shown when show was prevented', function (assert) { QUnit.test('should not fire shown when show was prevented', function (assert) {
assert.expect(1)
var done = assert.async() var done = assert.async()
$('<div id="modal-test"/>') $('<div id="modal-test"/>')
...@@ -82,6 +90,7 @@ $(function () { ...@@ -82,6 +90,7 @@ $(function () {
}) })
QUnit.test('should hide modal when hide is called', function (assert) { QUnit.test('should hide modal when hide is called', function (assert) {
assert.expect(3)
var done = assert.async() var done = assert.async()
$('<div id="modal-test"/>') $('<div id="modal-test"/>')
...@@ -98,6 +107,7 @@ $(function () { ...@@ -98,6 +107,7 @@ $(function () {
}) })
QUnit.test('should set aria-hidden to true when hide is called', function (assert) { QUnit.test('should set aria-hidden to true when hide is called', function (assert) {
assert.expect(2)
var done = assert.async() var done = assert.async()
$('<div id="modal-test"/>') $('<div id="modal-test"/>')
...@@ -113,6 +123,7 @@ $(function () { ...@@ -113,6 +123,7 @@ $(function () {
}) })
QUnit.test('should toggle when toggle is called', function (assert) { QUnit.test('should toggle when toggle is called', function (assert) {
assert.expect(3)
var done = assert.async() var done = assert.async()
$('<div id="modal-test"/>') $('<div id="modal-test"/>')
...@@ -129,6 +140,7 @@ $(function () { ...@@ -129,6 +140,7 @@ $(function () {
}) })
QUnit.test('should remove from dom when click [data-dismiss="modal"]', function (assert) { QUnit.test('should remove from dom when click [data-dismiss="modal"]', function (assert) {
assert.expect(3)
var done = assert.async() var done = assert.async()
$('<div id="modal-test"><span class="close" data-dismiss="modal"/></div>') $('<div id="modal-test"><span class="close" data-dismiss="modal"/></div>')
...@@ -145,6 +157,7 @@ $(function () { ...@@ -145,6 +157,7 @@ $(function () {
}) })
QUnit.test('should allow modal close with "backdrop:false"', function (assert) { QUnit.test('should allow modal close with "backdrop:false"', function (assert) {
assert.expect(2)
var done = assert.async() var done = assert.async()
$('<div id="modal-test" data-backdrop="false"/>') $('<div id="modal-test" data-backdrop="false"/>')
...@@ -160,6 +173,7 @@ $(function () { ...@@ -160,6 +173,7 @@ $(function () {
}) })
QUnit.test('should close modal when clicking outside of modal-content', function (assert) { QUnit.test('should close modal when clicking outside of modal-content', function (assert) {
assert.expect(3)
var done = assert.async() var done = assert.async()
$('<div id="modal-test"><div class="contents"/></div>') $('<div id="modal-test"><div class="contents"/></div>')
...@@ -177,6 +191,7 @@ $(function () { ...@@ -177,6 +191,7 @@ $(function () {
}) })
QUnit.test('should close modal when escape key is pressed via keydown', function (assert) { QUnit.test('should close modal when escape key is pressed via keydown', function (assert) {
assert.expect(3)
var done = assert.async() var done = assert.async()
var div = $('<div id="modal-test"/>') var div = $('<div id="modal-test"/>')
...@@ -196,6 +211,7 @@ $(function () { ...@@ -196,6 +211,7 @@ $(function () {
}) })
QUnit.test('should not close modal when escape key is pressed via keyup', function (assert) { QUnit.test('should not close modal when escape key is pressed via keyup', function (assert) {
assert.expect(3)
var done = assert.async() var done = assert.async()
var div = $('<div id="modal-test"/>') var div = $('<div id="modal-test"/>')
...@@ -215,6 +231,7 @@ $(function () { ...@@ -215,6 +231,7 @@ $(function () {
}) })
QUnit.test('should trigger hide event once when clicking outside of modal-content', function (assert) { QUnit.test('should trigger hide event once when clicking outside of modal-content', function (assert) {
assert.expect(1)
var done = assert.async() var done = assert.async()
var triggered var triggered
...@@ -233,6 +250,7 @@ $(function () { ...@@ -233,6 +250,7 @@ $(function () {
}) })
QUnit.test('should close reopened modal with [data-dismiss="modal"] click', function (assert) { QUnit.test('should close reopened modal with [data-dismiss="modal"] click', function (assert) {
assert.expect(2)
var done = assert.async() var done = assert.async()
$('<div id="modal-test"><div class="contents"><div id="close" data-dismiss="modal"/></div></div>') $('<div id="modal-test"><div class="contents"><div id="close" data-dismiss="modal"/></div></div>')
...@@ -256,6 +274,7 @@ $(function () { ...@@ -256,6 +274,7 @@ $(function () {
}) })
QUnit.test('should restore focus to toggling element when modal is hidden after having been opened via data-api', function (assert) { QUnit.test('should restore focus to toggling element when modal is hidden after having been opened via data-api', function (assert) {
assert.expect(1)
var done = assert.async() var done = assert.async()
var $toggleBtn = $('<button data-toggle="modal" data-target="#modal-test"/>').appendTo('#qunit-fixture') var $toggleBtn = $('<button data-toggle="modal" data-target="#modal-test"/>').appendTo('#qunit-fixture')
...@@ -276,6 +295,7 @@ $(function () { ...@@ -276,6 +295,7 @@ $(function () {
}) })
QUnit.test('should not restore focus to toggling element if the associated show event gets prevented', function (assert) { QUnit.test('should not restore focus to toggling element if the associated show event gets prevented', function (assert) {
assert.expect(1)
var done = assert.async() var done = assert.async()
var $toggleBtn = $('<button data-toggle="modal" data-target="#modal-test"/>').appendTo('#qunit-fixture') var $toggleBtn = $('<button data-toggle="modal" data-target="#modal-test"/>').appendTo('#qunit-fixture')
var $otherBtn = $('<button id="other-btn"/>').appendTo('#qunit-fixture') var $otherBtn = $('<button id="other-btn"/>').appendTo('#qunit-fixture')
...@@ -303,6 +323,7 @@ $(function () { ...@@ -303,6 +323,7 @@ $(function () {
}) })
QUnit.test('should restore inline body padding after closing', function (assert) { QUnit.test('should restore inline body padding after closing', function (assert) {
assert.expect(2)
var done = assert.async() var done = assert.async()
var originalBodyPad = 0 var originalBodyPad = 0
var $body = $(document.body) var $body = $(document.body)
...@@ -324,6 +345,7 @@ $(function () { ...@@ -324,6 +345,7 @@ $(function () {
}) })
QUnit.test('should ignore values set via CSS when trying to restore body padding after closing', function (assert) { QUnit.test('should ignore values set via CSS when trying to restore body padding after closing', function (assert) {
assert.expect(1)
var done = assert.async() var done = assert.async()
var $body = $(document.body) var $body = $(document.body)
var $style = $('<style>body { padding-right: 42px; }</style>').appendTo('head') var $style = $('<style>body { padding-right: 42px; }</style>').appendTo('head')
...@@ -341,6 +363,7 @@ $(function () { ...@@ -341,6 +363,7 @@ $(function () {
}) })
QUnit.test('should ignore other inline styles when trying to restore body padding after closing', function (assert) { QUnit.test('should ignore other inline styles when trying to restore body padding after closing', function (assert) {
assert.expect(2)
var done = assert.async() var done = assert.async()
var $body = $(document.body) var $body = $(document.body)
var $style = $('<style>body { padding-right: 42px; }</style>').appendTo('head') var $style = $('<style>body { padding-right: 42px; }</style>').appendTo('head')
...@@ -362,6 +385,7 @@ $(function () { ...@@ -362,6 +385,7 @@ $(function () {
}) })
QUnit.test('should properly restore non-pixel inline body padding after closing', function (assert) { QUnit.test('should properly restore non-pixel inline body padding after closing', function (assert) {
assert.expect(1)
var done = assert.async() var done = assert.async()
var $body = $(document.body) var $body = $(document.body)
......
...@@ -4,6 +4,7 @@ $(function () { ...@@ -4,6 +4,7 @@ $(function () {
QUnit.module('popover plugin') QUnit.module('popover plugin')
QUnit.test('should be defined on jquery object', function (assert) { QUnit.test('should be defined on jquery object', function (assert) {
assert.expect(1)
assert.ok($(document.body).popover, 'popover method is defined') assert.ok($(document.body).popover, 'popover method is defined')
}) })
...@@ -19,10 +20,12 @@ $(function () { ...@@ -19,10 +20,12 @@ $(function () {
}) })
QUnit.test('should provide no conflict', function (assert) { QUnit.test('should provide no conflict', function (assert) {
assert.expect(1)
assert.strictEqual($.fn.popover, undefined, 'popover was set back to undefined (org value)') assert.strictEqual($.fn.popover, undefined, 'popover was set back to undefined (org value)')
}) })
QUnit.test('should return jquery collection containing the element', function (assert) { QUnit.test('should return jquery collection containing the element', function (assert) {
assert.expect(2)
var $el = $('<div/>') var $el = $('<div/>')
var $popover = $el.bootstrapPopover() var $popover = $el.bootstrapPopover()
assert.ok($popover instanceof $, 'returns jquery collection') assert.ok($popover instanceof $, 'returns jquery collection')
...@@ -30,6 +33,7 @@ $(function () { ...@@ -30,6 +33,7 @@ $(function () {
}) })
QUnit.test('should render popover element', function (assert) { QUnit.test('should render popover element', function (assert) {
assert.expect(2)
var $popover = $('<a href="#" title="mdo" data-content="https://twitter.com/mdo">@mdo</a>') var $popover = $('<a href="#" title="mdo" data-content="https://twitter.com/mdo">@mdo</a>')
.appendTo('#qunit-fixture') .appendTo('#qunit-fixture')
.bootstrapPopover('show') .bootstrapPopover('show')
...@@ -40,12 +44,14 @@ $(function () { ...@@ -40,12 +44,14 @@ $(function () {
}) })
QUnit.test('should store popover instance in popover data object', function (assert) { QUnit.test('should store popover instance in popover data object', function (assert) {
assert.expect(1)
var $popover = $('<a href="#" title="mdo" data-content="https://twitter.com/mdo">@mdo</a>').bootstrapPopover() var $popover = $('<a href="#" title="mdo" data-content="https://twitter.com/mdo">@mdo</a>').bootstrapPopover()
assert.ok($popover.data('bs.popover'), 'popover instance exists') assert.ok($popover.data('bs.popover'), 'popover instance exists')
}) })
QUnit.test('should store popover trigger in popover instance data object', function (assert) { QUnit.test('should store popover trigger in popover instance data object', function (assert) {
assert.expect(1)
var $popover = $('<a href="#" title="ResentedHook">@ResentedHook</a>') var $popover = $('<a href="#" title="ResentedHook">@ResentedHook</a>')
.appendTo('#qunit-fixture') .appendTo('#qunit-fixture')
.bootstrapPopover() .bootstrapPopover()
...@@ -56,6 +62,7 @@ $(function () { ...@@ -56,6 +62,7 @@ $(function () {
}) })
QUnit.test('should get title and content from options', function (assert) { QUnit.test('should get title and content from options', function (assert) {
assert.expect(4)
var $popover = $('<a href="#">@fat</a>') var $popover = $('<a href="#">@fat</a>')
.appendTo('#qunit-fixture') .appendTo('#qunit-fixture')
.bootstrapPopover({ .bootstrapPopover({
...@@ -78,6 +85,7 @@ $(function () { ...@@ -78,6 +85,7 @@ $(function () {
}) })
QUnit.test('should not duplicate HTML object', function (assert) { QUnit.test('should not duplicate HTML object', function (assert) {
assert.expect(6)
var $div = $('<div/>').html('loves writing tests (╯°□°)╯︵ ┻━┻') var $div = $('<div/>').html('loves writing tests (╯°□°)╯︵ ┻━┻')
var $popover = $('<a href="#">@fat</a>') var $popover = $('<a href="#">@fat</a>')
...@@ -104,6 +112,7 @@ $(function () { ...@@ -104,6 +112,7 @@ $(function () {
}) })
QUnit.test('should get title and content from attributes', function (assert) { QUnit.test('should get title and content from attributes', function (assert) {
assert.expect(4)
var $popover = $('<a href="#" title="@mdo" data-content="loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻" >@mdo</a>') var $popover = $('<a href="#" title="@mdo" data-content="loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻" >@mdo</a>')
.appendTo('#qunit-fixture') .appendTo('#qunit-fixture')
.bootstrapPopover() .bootstrapPopover()
...@@ -119,6 +128,7 @@ $(function () { ...@@ -119,6 +128,7 @@ $(function () {
QUnit.test('should get title and content from attributes ignoring options passed via js', function (assert) { QUnit.test('should get title and content from attributes ignoring options passed via js', function (assert) {
assert.expect(4)
var $popover = $('<a href="#" title="@mdo" data-content="loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻" >@mdo</a>') var $popover = $('<a href="#" title="@mdo" data-content="loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻" >@mdo</a>')
.appendTo('#qunit-fixture') .appendTo('#qunit-fixture')
.bootstrapPopover({ .bootstrapPopover({
...@@ -136,6 +146,7 @@ $(function () { ...@@ -136,6 +146,7 @@ $(function () {
}) })
QUnit.test('should respect custom template', function (assert) { QUnit.test('should respect custom template', function (assert) {
assert.expect(3)
var $popover = $('<a href="#">@fat</a>') var $popover = $('<a href="#">@fat</a>')
.appendTo('#qunit-fixture') .appendTo('#qunit-fixture')
.bootstrapPopover({ .bootstrapPopover({
...@@ -154,6 +165,7 @@ $(function () { ...@@ -154,6 +165,7 @@ $(function () {
}) })
QUnit.test('should destroy popover', function (assert) { QUnit.test('should destroy popover', function (assert) {
assert.expect(7)
var $popover = $('<div/>') var $popover = $('<div/>')
.bootstrapPopover({ .bootstrapPopover({
trigger: 'hover' trigger: 'hover'
...@@ -174,6 +186,7 @@ $(function () { ...@@ -174,6 +186,7 @@ $(function () {
}) })
QUnit.test('should render popover element using delegated selector', function (assert) { QUnit.test('should render popover element using delegated selector', function (assert) {
assert.expect(2)
var $div = $('<div><a href="#" title="mdo" data-content="http://twitter.com/mdo">@mdo</a></div>') var $div = $('<div><a href="#" title="mdo" data-content="http://twitter.com/mdo">@mdo</a></div>')
.appendTo('#qunit-fixture') .appendTo('#qunit-fixture')
.bootstrapPopover({ .bootstrapPopover({
...@@ -189,6 +202,7 @@ $(function () { ...@@ -189,6 +202,7 @@ $(function () {
}) })
QUnit.test('should detach popover content rather than removing it so that event handlers are left intact', function (assert) { QUnit.test('should detach popover content rather than removing it so that event handlers are left intact', function (assert) {
assert.expect(1)
var $content = $('<div class="content-with-handler"><a class="btn btn-warning">Button with event handler</a></div>').appendTo('#qunit-fixture') var $content = $('<div class="content-with-handler"><a class="btn btn-warning">Button with event handler</a></div>').appendTo('#qunit-fixture')
var handlerCalled = false var handlerCalled = false
...@@ -227,6 +241,7 @@ $(function () { ...@@ -227,6 +241,7 @@ $(function () {
}) })
QUnit.test('should throw an error when initializing popover on the document object without specifying a delegation selector', function (assert) { QUnit.test('should throw an error when initializing popover on the document object without specifying a delegation selector', function (assert) {
assert.expect(1)
assert.throws(function () { assert.throws(function () {
$(document).bootstrapPopover({ title: 'What am I on?', content: 'My selector is missing' }) $(document).bootstrapPopover({ title: 'What am I on?', content: 'My selector is missing' })
}, new Error('`selector` option must be specified when initializing popover on the window.document object!')) }, new Error('`selector` option must be specified when initializing popover on the window.document object!'))
......
...@@ -4,6 +4,7 @@ $(function () { ...@@ -4,6 +4,7 @@ $(function () {
QUnit.module('scrollspy plugin') QUnit.module('scrollspy plugin')
QUnit.test('should be defined on jquery object', function (assert) { QUnit.test('should be defined on jquery object', function (assert) {
assert.expect(1)
assert.ok($(document.body).scrollspy, 'scrollspy method is defined') assert.ok($(document.body).scrollspy, 'scrollspy method is defined')
}) })
...@@ -19,10 +20,12 @@ $(function () { ...@@ -19,10 +20,12 @@ $(function () {
}) })
QUnit.test('should provide no conflict', function (assert) { QUnit.test('should provide no conflict', function (assert) {
assert.expect(1)
assert.strictEqual($.fn.scrollspy, undefined, 'scrollspy was set back to undefined (org value)') assert.strictEqual($.fn.scrollspy, undefined, 'scrollspy was set back to undefined (org value)')
}) })
QUnit.test('should return jquery collection containing the element', function (assert) { QUnit.test('should return jquery collection containing the element', function (assert) {
assert.expect(2)
var $el = $('<div/>') var $el = $('<div/>')
var $scrollspy = $el.bootstrapScrollspy() var $scrollspy = $el.bootstrapScrollspy()
assert.ok($scrollspy instanceof $, 'returns jquery collection') assert.ok($scrollspy instanceof $, 'returns jquery collection')
...@@ -30,6 +33,7 @@ $(function () { ...@@ -30,6 +33,7 @@ $(function () {
}) })
QUnit.test('should only switch "active" class on current target', function (assert) { QUnit.test('should only switch "active" class on current target', function (assert) {
assert.expect(1)
var done = assert.async() var done = assert.async()
var sectionHTML = '<div id="root" class="active">' var sectionHTML = '<div id="root" class="active">'
...@@ -74,6 +78,7 @@ $(function () { ...@@ -74,6 +78,7 @@ $(function () {
}) })
QUnit.test('should correctly select middle navigation option when large offset is used', function (assert) { QUnit.test('should correctly select middle navigation option when large offset is used', function (assert) {
assert.expect(3)
var done = assert.async() var done = assert.async()
var sectionHTML = '<div id="header" style="height: 500px;"></div>' var sectionHTML = '<div id="header" style="height: 500px;"></div>'
...@@ -107,6 +112,7 @@ $(function () { ...@@ -107,6 +112,7 @@ $(function () {
}) })
QUnit.test('should add the active class to the correct element', function (assert) { QUnit.test('should add the active class to the correct element', function (assert) {
assert.expect(2)
var navbarHtml = var navbarHtml =
'<nav class="navbar">' '<nav class="navbar">'
+ '<ul class="nav">' + '<ul class="nav">'
...@@ -143,6 +149,7 @@ $(function () { ...@@ -143,6 +149,7 @@ $(function () {
}) })
QUnit.test('should add the active class correctly when there are nested elements at 0 scroll offset', function (assert) { QUnit.test('should add the active class correctly when there are nested elements at 0 scroll offset', function (assert) {
assert.expect(6)
var times = 0 var times = 0
var done = assert.async() var done = assert.async()
var navbarHtml = '<nav id="navigation" class="navbar">' var navbarHtml = '<nav id="navigation" class="navbar">'
...@@ -181,6 +188,7 @@ $(function () { ...@@ -181,6 +188,7 @@ $(function () {
}) })
QUnit.test('should clear selection if above the first section', function (assert) { QUnit.test('should clear selection if above the first section', function (assert) {
assert.expect(3)
var done = assert.async() var done = assert.async()
var sectionHTML = '<div id="header" style="height: 500px;"></div>' var sectionHTML = '<div id="header" style="height: 500px;"></div>'
......
...@@ -4,6 +4,7 @@ $(function () { ...@@ -4,6 +4,7 @@ $(function () {
QUnit.module('tabs plugin') QUnit.module('tabs plugin')
QUnit.test('should be defined on jquery object', function (assert) { QUnit.test('should be defined on jquery object', function (assert) {
assert.expect(1)
assert.ok($(document.body).tab, 'tabs method is defined') assert.ok($(document.body).tab, 'tabs method is defined')
}) })
...@@ -19,10 +20,12 @@ $(function () { ...@@ -19,10 +20,12 @@ $(function () {
}) })
QUnit.test('should provide no conflict', function (assert) { QUnit.test('should provide no conflict', function (assert) {
assert.expect(1)
assert.strictEqual($.fn.tab, undefined, 'tab was set back to undefined (org value)') assert.strictEqual($.fn.tab, undefined, 'tab was set back to undefined (org value)')
}) })
QUnit.test('should return jquery collection containing the element', function (assert) { QUnit.test('should return jquery collection containing the element', function (assert) {
assert.expect(2)
var $el = $('<div/>') var $el = $('<div/>')
var $tab = $el.bootstrapTab() var $tab = $el.bootstrapTab()
assert.ok($tab instanceof $, 'returns jquery collection') assert.ok($tab instanceof $, 'returns jquery collection')
...@@ -30,6 +33,7 @@ $(function () { ...@@ -30,6 +33,7 @@ $(function () {
}) })
QUnit.test('should activate element by tab id', function (assert) { QUnit.test('should activate element by tab id', function (assert) {
assert.expect(2)
var tabsHTML = '<ul class="tabs">' var tabsHTML = '<ul class="tabs">'
+ '<li><a href="#home">Home</a></li>' + '<li><a href="#home">Home</a></li>'
+ '<li><a href="#profile">Profile</a></li>' + '<li><a href="#profile">Profile</a></li>'
...@@ -45,6 +49,7 @@ $(function () { ...@@ -45,6 +49,7 @@ $(function () {
}) })
QUnit.test('should activate element by tab id', function (assert) { QUnit.test('should activate element by tab id', function (assert) {
assert.expect(2)
var pillsHTML = '<ul class="pills">' var pillsHTML = '<ul class="pills">'
+ '<li><a href="#home">Home</a></li>' + '<li><a href="#home">Home</a></li>'
+ '<li><a href="#profile">Profile</a></li>' + '<li><a href="#profile">Profile</a></li>'
...@@ -60,6 +65,7 @@ $(function () { ...@@ -60,6 +65,7 @@ $(function () {
}) })
QUnit.test('should not fire shown when show is prevented', function (assert) { QUnit.test('should not fire shown when show is prevented', function (assert) {
assert.expect(1)
var done = assert.async() var done = assert.async()
$('<div class="tab"/>') $('<div class="tab"/>')
...@@ -75,6 +81,7 @@ $(function () { ...@@ -75,6 +81,7 @@ $(function () {
}) })
QUnit.test('show and shown events should reference correct relatedTarget', function (assert) { QUnit.test('show and shown events should reference correct relatedTarget', function (assert) {
assert.expect(2)
var done = assert.async() var done = assert.async()
var dropHTML = '<ul class="drop">' var dropHTML = '<ul class="drop">'
...@@ -102,6 +109,7 @@ $(function () { ...@@ -102,6 +109,7 @@ $(function () {
}) })
QUnit.test('should fire hide and hidden events', function (assert) { QUnit.test('should fire hide and hidden events', function (assert) {
assert.expect(2)
var done = assert.async() var done = assert.async()
var tabsHTML = '<ul class="tabs">' var tabsHTML = '<ul class="tabs">'
...@@ -132,6 +140,7 @@ $(function () { ...@@ -132,6 +140,7 @@ $(function () {
}) })
QUnit.test('should not fire hidden when hide is prevented', function (assert) { QUnit.test('should not fire hidden when hide is prevented', function (assert) {
assert.expect(1)
var done = assert.async() var done = assert.async()
var tabsHTML = '<ul class="tabs">' var tabsHTML = '<ul class="tabs">'
...@@ -156,6 +165,7 @@ $(function () { ...@@ -156,6 +165,7 @@ $(function () {
}) })
QUnit.test('hide and hidden events contain correct relatedTarget', function (assert) { QUnit.test('hide and hidden events contain correct relatedTarget', function (assert) {
assert.expect(2)
var done = assert.async() var done = assert.async()
var tabsHTML = '<ul class="tabs">' var tabsHTML = '<ul class="tabs">'
...@@ -179,6 +189,7 @@ $(function () { ...@@ -179,6 +189,7 @@ $(function () {
}) })
QUnit.test('selected tab should have aria-expanded', function (assert) { QUnit.test('selected tab should have aria-expanded', function (assert) {
assert.expect(8)
var tabsHTML = '<ul class="nav nav-tabs">' var tabsHTML = '<ul class="nav nav-tabs">'
+ '<li class="active"><a href="#home" toggle="tab" aria-expanded="true">Home</a></li>' + '<li class="active"><a href="#home" toggle="tab" aria-expanded="true">Home</a></li>'
+ '<li><a href="#profile" toggle="tab" aria-expanded="false">Profile</a></li>' + '<li><a href="#profile" toggle="tab" aria-expanded="false">Profile</a></li>'
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment