1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-12 00:24:03 +02:00

Fix active class toggling of tabs within dropdown (#37151)

* Close #36947: fix active class toggling tabs within dropdown
This commit is contained in:
Carson Sievert
2022-09-21 18:29:58 -05:00
committed by GitHub
parent 27f20257eb
commit 2b46842af9
2 changed files with 4 additions and 5 deletions

View File

@@ -840,10 +840,11 @@ describe('Tab', () => {
'</ul>'
].join('')
const firstDropItem = fixtureEl.querySelector('.dropdown-item')
const dropItems = fixtureEl.querySelectorAll('.dropdown-item')
firstDropItem.click()
expect(firstDropItem).toHaveClass('active')
dropItems[1].click()
expect(dropItems[0]).not.toHaveClass('active')
expect(dropItems[1]).toHaveClass('active')
expect(fixtureEl.querySelector('.nav-link')).not.toHaveClass('active')
})