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:
@@ -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')
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user