2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-11 18:02:28 +03:00

allow to pass popper.js configuration for tooltip/popover and dropdown

This commit is contained in:
Johann-S
2019-08-14 17:27:58 +02:00
committed by XhmikosR
parent b3cf60018c
commit f03c10a189
7 changed files with 107 additions and 31 deletions
+15
View File
@@ -108,6 +108,21 @@ describe('Tooltip', () => {
tooltipInContainerEl.click()
})
it('should allow to pass config to popper.js thanks to popperConfig', () => {
fixtureEl.innerHTML = '<a href="#" rel="tooltip"/>'
const tooltipEl = fixtureEl.querySelector('a')
const tooltip = new Tooltip(tooltipEl, {
popperConfig: {
placement: 'left'
}
})
const popperConfig = tooltip._getPopperConfig('top')
expect(popperConfig.placement).toEqual('left')
})
})
describe('enable', () => {