mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-30 22:52:24 +01:00
Fix Popover test that randomly fails on BrowserStack (#35757)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
parent
c44d99f55c
commit
3f7b31e0e0
@ -166,21 +166,16 @@ describe('Popover', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('should NOT show a popover without `title` and `content`', () => {
|
it('should NOT show a popover without `title` and `content`', () => {
|
||||||
return new Promise(resolve => {
|
fixtureEl.innerHTML = '<a href="#" data-bs-content="" title="">Nice link</a>'
|
||||||
fixtureEl.innerHTML = '<a href="#" data-bs-content="" title="">Nice link</a>'
|
|
||||||
|
|
||||||
const popoverEl = fixtureEl.querySelector('a')
|
const popoverEl = fixtureEl.querySelector('a')
|
||||||
const popover = new Popover(popoverEl, { animation: false })
|
const popover = new Popover(popoverEl, { animation: false })
|
||||||
spyOn(EventHandler, 'trigger').and.callThrough()
|
spyOn(EventHandler, 'trigger').and.callThrough()
|
||||||
|
|
||||||
setTimeout(() => {
|
popover.show()
|
||||||
expect(EventHandler.trigger).not.toHaveBeenCalled()
|
|
||||||
expect(document.querySelector('.popover')).toBeNull()
|
|
||||||
resolve()
|
|
||||||
})
|
|
||||||
|
|
||||||
popover.show()
|
expect(EventHandler.trigger).not.toHaveBeenCalledWith(popoverEl, Popover.Event.SHOW)
|
||||||
})
|
expect(document.querySelector('.popover')).toBeNull()
|
||||||
})
|
})
|
||||||
|
|
||||||
it('"setContent" should keep the initial template', () => {
|
it('"setContent" should keep the initial template', () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user