-
-
Notifications
You must be signed in to change notification settings - Fork 79k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add support for ol in tab plugin #20467
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,6 +76,22 @@ $(function () { | |
assert.strictEqual($('#qunit-fixture').find('.active').attr('id'), 'home') | ||
}) | ||
|
||
QUnit.test('should activate element by tab id in ordered list', function (assert) { | ||
assert.expect(2) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No magic number: 2 no-magic-numbers |
||
var pillsHTML = '<ol class="pills">' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unexpected var, use let or const instead no-var |
||
+ '<li><a href="#home">Home</a></li>' | ||
+ '<li><a href="#profile">Profile</a></li>' | ||
+ '</ol>' | ||
|
||
$('<ol><li id="home"/><li id="profile"/></ol>').appendTo('#qunit-fixture') | ||
|
||
$(pillsHTML).find('li:last a').bootstrapTab('show') | ||
assert.strictEqual($('#qunit-fixture').find('.active').attr('id'), 'profile') | ||
|
||
$(pillsHTML).find('li:first a').bootstrapTab('show') | ||
assert.strictEqual($('#qunit-fixture').find('.active').attr('id'), 'home') | ||
}) | ||
|
||
QUnit.test('should not fire shown when show is prevented', function (assert) { | ||
assert.expect(1) | ||
var done = assert.async() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'QUnit' is not defined no-undef
Unexpected function expression prefer-arrow-callback