diff options
author | GeoSot <geo.sotis@gmail.com> | 2022-06-27 12:58:27 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-27 12:58:27 +0300 |
commit | 4f4b42dd14dd9a59df6536585142864eea4383b9 (patch) | |
tree | ad8871b69a22414ec0e935c70c7f2446f425fddf /js/tests | |
parent | f14c58f49471e7880cb8a13c74d88febc1c0c21d (diff) |
Force tooltip and popover to recreate content every time it opens (#35679)
Diffstat (limited to 'js/tests')
-rw-r--r-- | js/tests/unit/tooltip.spec.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/js/tests/unit/tooltip.spec.js b/js/tests/unit/tooltip.spec.js index 757ee9baf7..1431d837dd 100644 --- a/js/tests/unit/tooltip.spec.js +++ b/js/tests/unit/tooltip.spec.js @@ -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()) }) |