0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-28 10:24:19 +01:00

Fixing tabs' tests (#36485)

This commit is contained in:
Louis-Maxime Piton 2022-06-02 11:58:43 +02:00 committed by GitHub
parent 4444f090b6
commit 8274bf25d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View File

@ -78,7 +78,7 @@ $(function () {
QUnit.test('should activate element by tab id (.nav-pills)', function (assert) {
assert.expect(2)
var pillsHTML = '<ul class="nav nav-pills">' +
var pillsHTML = '<ul class="nav nav-pills" role="tablist">' +
'<li><a href="#home">Home</a></li>' +
'<li><a href="#profile">Profile</a></li>' +
'</ul>'
@ -94,9 +94,9 @@ $(function () {
QUnit.test('should activate element by tab id in ordered list', function (assert) {
assert.expect(2)
var pillsHTML = '<ol class="nav nav-pills">' +
var pillsHTML = '<ol class="nav nav-pills" role="tablist">' +
'<li><button type="button" data-target="#home" role="tab">Home</button></li>' +
'<li><button type="button" href="#profile" role="tab">Profile</button></li>' +
'<li><button type="button" data-target="#profile" role="tab">Profile</button></li>' +
'</ol>'
$('<ol><li id="home" role="tabpanel"/><li id="profile" role="tabpanel"/></ol>').appendTo('#qunit-fixture')
@ -112,7 +112,7 @@ $(function () {
assert.expect(2)
var tabsHTML = '<nav class="nav">' +
'<button type="button" data-target="#home" role="tab">Home</button>' +
'<button type="button" data-target="#profile" role="tab">Profile</a>' +
'<button type="button" data-target="#profile" role="tab">Profile</button>' +
'</nav>'
$('<div><div id="home" role="tabpanel"/><div id="profile" role="tabpanel"/></div>').appendTo('#qunit-fixture')
@ -226,7 +226,7 @@ $(function () {
var tabsHTML = '<ul class="nav" role="tablist">' +
'<li><button type="button" data-target="#home" role="tab">Home</button></li>' +
'<li><button type="button" data-target="#profile">Profile</button></li>' +
'<li><button type="button" data-target="#profile" role="tab">Profile</button></li>' +
'</ul>'
$(tabsHTML)
@ -341,7 +341,7 @@ $(function () {
QUnit.test('should support li > .dropdown-item', function (assert) {
assert.expect(2)
var tabsHTML = [
'<ul class="nav nav-tabs">',
'<ul class="nav nav-tabs" role="tablist">',
' <li class="nav-item"><a class="nav-link active" href="#home" data-toggle="tab">Home</a></li>',
' <li class="nav-item"><a class="nav-link" href="#profile" data-toggle="tab">Profile</a></li>',
' <li class="nav-item dropdown">',