mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-14 01:24:19 +02:00
Force tooltip and popover to recreate content every time it opens (#35679)
This commit is contained in:
@@ -185,7 +185,7 @@ describe('Tooltip', () => {
|
||||
const tooltipEl = fixtureEl.querySelector('a')
|
||||
const tooltip = new Tooltip(tooltipEl)
|
||||
|
||||
expect(tooltip._config.title).toEqual('Another tooltip')
|
||||
expect(tooltip._getTitle()).toEqual('Another tooltip')
|
||||
})
|
||||
})
|
||||
|
||||
@@ -848,7 +848,7 @@ describe('Tooltip', () => {
|
||||
}, 100)
|
||||
|
||||
setTimeout(() => {
|
||||
expect(insertedFunc).toHaveBeenCalledTimes(1)
|
||||
expect(insertedFunc).toHaveBeenCalledTimes(2)
|
||||
resolve()
|
||||
}, 200)
|
||||
}, 0)
|
||||
@@ -1166,6 +1166,7 @@ describe('Tooltip', () => {
|
||||
tooltip.setContent({ '.tooltip-inner': 'foo' })
|
||||
|
||||
expect(tip()).not.toHaveClass('show')
|
||||
tooltip.show()
|
||||
expect(tip().querySelector('.tooltip-inner').textContent).toEqual('foo')
|
||||
})
|
||||
|
||||
@@ -1229,6 +1230,7 @@ describe('Tooltip', () => {
|
||||
})
|
||||
|
||||
tooltip.setContent({ '.tooltip': { 0: childContent, jquery: 'jQuery' } })
|
||||
tooltip.show()
|
||||
|
||||
expect(childContent.parentNode).toEqual(tooltip._getTipElement())
|
||||
})
|
||||
|
Reference in New Issue
Block a user