1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00

bump to 4.2.1

This commit is contained in:
Johann-S 2019-01-04 16:09:52 +02:00 committed by XhmikosR
parent 709dcb98dd
commit c096e0e0da
6 changed files with 25 additions and 22 deletions

View file

@ -1,8 +1,9 @@
import 'popper.js'
import $ from 'jquery'
import bootstrap from '../../../dist/js/bootstrap'
$(() => {
$('#resultUID').text(bootstrap.Util.getUID('bs'))
$('[data-toggle="tooltip"]').tooltip()
window.addEventListener('load', () => {
document.getElementById('resultUID').innerHTML = bootstrap.Util.getUID('bs')
bootstrap.Util.makeArray(document.querySelectorAll('[data-toggle="tooltip"]'))
.map((tooltipNode) => new bootstrap.Tooltip(tooltipNode))
})

View file

@ -1335,13 +1335,13 @@ $(function () {
assert.expect(1)
var done = assert.async()
var spy = sinon.spy(Carousel, '_jQueryInterface')
var spy = sinon.spy(Carousel, '_carouselInterface')
var carouselHTML = '<div class="carousel" data-ride="carousel"></div>'
var $carousel = $(carouselHTML)
$carousel.appendTo('#qunit-fixture')
$(window).trigger($.Event('load'))
window.dispatchEvent(new Event('load'))
setTimeout(function () {
assert.strictEqual(spy.called, true)

View file

@ -1391,7 +1391,7 @@ $(function () {
offset: getOffset
})
var dropdown = $dropdown.data('bs.dropdown')
var dropdown = Dropdown._getInstance($dropdown[0])
var offset = dropdown._getOffset()
assert.ok(typeof offset.offset === 'undefined')
@ -1417,7 +1417,7 @@ $(function () {
offset: myOffset
})
var dropdown = $dropdown.data('bs.dropdown')
var dropdown = Dropdown._getInstance($dropdown[0])
var offset = dropdown._getOffset()
assert.strictEqual(offset.offset, myOffset)

View file

@ -488,7 +488,8 @@ $(function () {
assert.strictEqual($('.show').length, 0)
done()
})
.trigger($.Event('click'))
$('#secondNav')[0].click()
})
QUnit.test('should add show class to tab panes if there is a `.fade` class', function (assert) {
@ -516,6 +517,7 @@ $(function () {
assert.strictEqual($('.show').length, 1)
done()
})
.trigger($.Event('click'))
$('#secondNav')[0].click()
})
})

View file

@ -253,7 +253,7 @@ $(function () {
var $toast = $(toastHtml)
.bootstrapToast()
var toast = $toast.data('bs.toast')
var toast = Toast._getInstance($toast[0])
assert.strictEqual(toast._config.delay, defaultDelay)
})
})

View file

@ -1080,7 +1080,7 @@ $(function () {
offset: getOffset
})
var tooltip = $trigger.data('bs.tooltip')
var tooltip = Tooltip._getInstance($trigger[0])
var offset = tooltip._getOffset()
assert.ok(typeof offset.offset === 'undefined')
@ -1097,7 +1097,7 @@ $(function () {
offset: myOffset
})
var tooltip = $trigger.data('bs.tooltip')
var tooltip = Tooltip._getInstance($trigger[0])
var offset = tooltip._getOffset()
assert.strictEqual(offset.offset, myOffset)
@ -1113,7 +1113,7 @@ $(function () {
sanitize: false
})
var tooltip = $trigger.data('bs.tooltip')
var tooltip = Tooltip._getInstance($trigger[0])
assert.strictEqual(tooltip.config.sanitize, false)
})
@ -1131,7 +1131,7 @@ $(function () {
].join('')
})
var tooltip = $trigger.data('bs.tooltip')
var tooltip = Tooltip._getInstance($trigger[0])
assert.strictEqual(tooltip.config.template.indexOf('script'), -1)
})
@ -1148,7 +1148,7 @@ $(function () {
].join('')
})
var tooltip = $trigger.data('bs.tooltip')
var tooltip = Tooltip._getInstance($trigger[0])
assert.strictEqual(tooltip.config.template.indexOf('onError'), -1)
})
@ -1166,7 +1166,7 @@ $(function () {
].join('')
})
var tooltip = $trigger.data('bs.tooltip')
var tooltip = Tooltip._getInstance($trigger[0])
assert.strictEqual(tooltip.config.template.indexOf('script'), -1)
})
@ -1185,7 +1185,7 @@ $(function () {
}
})
var tooltip = $trigger.data('bs.tooltip')
var tooltip = Tooltip._getInstance($trigger[0])
assert.strictEqual(tooltip.config.template.indexOf('<a'), -1)
assert.ok(tooltip.config.template.indexOf('span') !== -1)
@ -1205,7 +1205,7 @@ $(function () {
}
})
var tooltip = $trigger.data('bs.tooltip')
var tooltip = Tooltip._getInstance($trigger[0])
assert.ok(tooltip.config.template.indexOf('span') !== -1)
})
@ -1221,7 +1221,7 @@ $(function () {
].join('')
})
var tooltip = $trigger.data('bs.tooltip')
var tooltip = Tooltip._getInstance($trigger[0])
assert.ok(tooltip.config.template.indexOf('aria-pressed') !== -1)
})
@ -1242,7 +1242,7 @@ $(function () {
sanitize: false
})
var tooltip = $trigger.data('bs.tooltip')
var tooltip = Tooltip._getInstance($trigger[0])
tooltip.setElementContent($element, content)
assert.strictEqual($element[0].innerHTML, content)
@ -1259,7 +1259,7 @@ $(function () {
].join('')
})
var tooltip = $trigger.data('bs.tooltip')
var tooltip = Tooltip._getInstance($trigger[0])
assert.strictEqual(tooltip.config.sanitize, true)
})