Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohann-S <johann.servoire@gmail.com>2019-08-18 22:15:21 +0300
committerXhmikosR <xhmikosr@gmail.com>2019-08-27 16:32:25 +0300
commit7652d326e42b471bd3c934debfaf956fa4c67465 (patch)
tree3d1d841179739e3035afcafaee1f63112d6b798c /js/tests/unit/tooltip.js
parent6381c63fb1c81d87b38327a56c0d471d20cbd1aa (diff)
Backport #29251
allow to pass popper.js configuration for tooltip/popover and dropdown
Diffstat (limited to 'js/tests/unit/tooltip.js')
-rw-r--r--js/tests/unit/tooltip.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js
index e66450fb85..2149a68916 100644
--- a/js/tests/unit/tooltip.js
+++ b/js/tests/unit/tooltip.js
@@ -1266,4 +1266,21 @@ $(function () {
assert.strictEqual(tooltip.config.sanitize, true)
})
+
+ QUnit.test('should allow to pass config to popper.js with `popperConfig`', function (assert) {
+ assert.expect(1)
+
+ var $trigger = $('<a href="#" rel="tooltip" data-trigger="click" title="Another tooltip"/>')
+ .appendTo('#qunit-fixture')
+ .bootstrapTooltip({
+ popperConfig: {
+ placement: 'left'
+ }
+ })
+
+ var tooltip = $trigger.data('bs.tooltip')
+ var popperConfig = tooltip._getPopperConfig('top')
+
+ assert.strictEqual(popperConfig.placement, 'left')
+ })
})