mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-18 03:11:19 +02:00
Allow use of dispose/hide
methods on Tooltip & Popover from jQueryInterface, when component does not exists. (#33371)
This commit is contained in:
@@ -266,21 +266,6 @@ describe('Popover', () => {
|
||||
|
||||
expect(popover.show).toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('should do nothing if dipose is called when a popover do not exist', () => {
|
||||
fixtureEl.innerHTML = '<a href="#" title="Popover" data-bs-content="https://twitter.com/getbootstrap">BS twitter</a>'
|
||||
|
||||
const popoverEl = fixtureEl.querySelector('a')
|
||||
|
||||
jQueryMock.fn.popover = Popover.jQueryInterface
|
||||
jQueryMock.elements = [popoverEl]
|
||||
|
||||
spyOn(Popover.prototype, 'dispose')
|
||||
|
||||
jQueryMock.fn.popover.call(jQueryMock, 'dispose')
|
||||
|
||||
expect(Popover.prototype.dispose).not.toHaveBeenCalled()
|
||||
})
|
||||
})
|
||||
|
||||
describe('getInstance', () => {
|
||||
|
Reference in New Issue
Block a user