2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-05 16:42:29 +03:00

tooltip/popover: add a customClass option (#31834)

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
James Remeika
2020-11-20 04:56:16 -05:00
committed by GitHub
parent ffa88deb85
commit 2d8c02eb10
5 changed files with 88 additions and 0 deletions
+13
View File
@@ -61,6 +61,19 @@ $(function () {
.bootstrapPopover('show')
})
QUnit.test('should render popover element with additional classes', function (assert) {
assert.expect(2)
var done = assert.async()
$('<a href="#" title="mdo" data-content="https://twitter.com/mdo" data-custom-class="a b">@mdo</a>')
.appendTo('#qunit-fixture')
.on('shown.bs.popover', function () {
assert.strictEqual($('.popover').hasClass('popover fade bs-popover-right show'), true, 'has default classes')
assert.strictEqual($('.popover').hasClass('a b'), true, 'has custom classes')
done()
})
.bootstrapPopover('show')
})
QUnit.test('should store popover instance in popover data object', function (assert) {
assert.expect(1)
var $popover = $('<a href="#" title="mdo" data-content="https://twitter.com/mdo">@mdo</a>').bootstrapPopover()