1
0
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:
GeoSot
2022-06-27 12:58:27 +03:00
committed by GitHub
parent f14c58f494
commit 4f4b42dd14
2 changed files with 18 additions and 16 deletions

View File

@@ -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())
})