Skip to content

Commit

Permalink
test: fix broken test cases for tab.js
Browse files Browse the repository at this point in the history
  • Loading branch information
alpadev authored and XhmikosR committed Oct 8, 2021
1 parent f926077 commit be6a61a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/tests/unit/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ $(function () {
'</div>'

$(tabsHTML)
.find('ul > li:last-child button')
.find('li:last-child button')
.on('show.bs.tab', function (e) {
assert.strictEqual(e.relatedTarget.getAttribute('data-target'), '#home', 'references correct element as relatedTarget')
})
Expand Down Expand Up @@ -328,8 +328,8 @@ $(function () {
QUnit.test('selected tab should deactivate previous selected tab', function (assert) {
assert.expect(2)
var tabsHTML = '<ul class="nav nav-tabs" role="tablist">' +
'<li class="nav-item"><button type="button" data-target="#home" role="tab">Home</button></li>' +
'<li class="nav-item"><button type="button" data-target="#profile" role="tab">Profile</button></li>' +
'<li class="nav-item"><button type="button" data-target="#home" role="tab" data-toggle="tab">Home</button></li>' +
'<li class="nav-item"><button type="button" data-target="#profile" role="tab" data-toggle="tab">Profile</button></li>' +
'</ul>'
var $tabs = $(tabsHTML).appendTo('#qunit-fixture')

Expand Down

0 comments on commit be6a61a

Please sign in to comment.