0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-18 10:52:19 +01:00

Fix visual tests (#35585)

* Fix visual tests

They broke in #34509

* load bundle.js in visual tests

Co-authored-by: GeoSot <geo.sotis@gmail.com>
This commit is contained in:
XhmikosR 2022-01-30 16:12:24 +02:00 committed by GitHub
parent f77a58b381
commit 89f88762c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 23 additions and 86 deletions

View File

@ -43,10 +43,6 @@
</div>
</div>
<script src="../../dist/dom/event-handler.js"></script>
<script src="../../dist/dom/selector-engine.js"></script>
<script src="../../dist/dom/data.js"></script>
<script src="../../dist/base-component.js"></script>
<script src="../../dist/alert.js"></script>
<script src="../../../dist/js/bootstrap.bundle.js"></script>
</body>
</html>

View File

@ -44,10 +44,6 @@
</div>
</div>
<script src="../../dist/dom/event-handler.js"></script>
<script src="../../dist/dom/selector-engine.js"></script>
<script src="../../dist/dom/data.js"></script>
<script src="../../dist/base-component.js"></script>
<script src="../../dist/button.js"></script>
<script src="../../../dist/js/bootstrap.bundle.js"></script>
</body>
</html>

View File

@ -45,12 +45,7 @@
</div>
</div>
<script src="../../dist/dom/event-handler.js"></script>
<script src="../../dist/dom/selector-engine.js"></script>
<script src="../../dist/dom/manipulator.js"></script>
<script src="../../dist/dom/data.js"></script>
<script src="../../dist/base-component.js"></script>
<script src="../../dist/carousel.js"></script>
<script src="../../../dist/js/bootstrap.bundle.js"></script>
<script>
var t0
var t1

View File

@ -71,11 +71,6 @@
</div>
</div>
<script src="../../dist/dom/event-handler.js"></script>
<script src="../../dist/dom/selector-engine.js"></script>
<script src="../../dist/dom/manipulator.js"></script>
<script src="../../dist/dom/data.js"></script>
<script src="../../dist/base-component.js"></script>
<script src="../../dist/collapse.js"></script>
<script src="../../../dist/js/bootstrap.bundle.js"></script>
</body>
</html>

View File

@ -200,13 +200,6 @@
</div>
</div>
<script src="../../../node_modules/@popperjs/core/dist/umd/popper.min.js"></script>
<script src="../../dist/dom/event-handler.js"></script>
<script src="../../dist/dom/selector-engine.js"></script>
<script src="../../dist/dom/data.js"></script>
<script src="../../dist/dom/manipulator.js"></script>
<script src="../../dist/base-component.js"></script>
<script src="../../dist/dropdown.js"></script>
<script src="../../dist/collapse.js"></script>
<script src="../../../dist/js/bootstrap.bundle.js"></script>
</body>
</html>

View File

@ -199,16 +199,7 @@
</button>
</div>
<script src="../../../node_modules/@popperjs/core/dist/umd/popper.min.js"></script>
<script src="../../dist/dom/event-handler.js"></script>
<script src="../../dist/dom/selector-engine.js"></script>
<script src="../../dist/dom/data.js"></script>
<script src="../../dist/dom/manipulator.js"></script>
<script src="../../dist/base-component.js"></script>
<script src="../../dist/modal.js"></script>
<script src="../../dist/collapse.js"></script>
<script src="../../dist/tooltip.js"></script>
<script src="../../dist/popover.js"></script>
<script src="../../../dist/js/bootstrap.bundle.js"></script>
<script>
var ffBugTestResult = document.getElementById('ff-bug-test-result')
var firefoxTestDone = false
@ -222,11 +213,11 @@
var popoverElements = document.querySelectorAll('[data-bs-toggle="popover"]')
for (const popoverEl of popoverElements) {
new Popover(popoverEl)
new bootstrap.Popover(popoverEl)
}
var tooltipElements = document.querySelectorAll('[data-bs-toggle="tooltip"]')
for (const tooltipEl of tooltipElements) {
new Tooltip(tooltipEl)
new bootstrap.Tooltip(tooltipEl)
}
var tallToggle = document.getElementById('tall-toggle')
@ -249,7 +240,7 @@
ffBugInput.addEventListener('focus', handlerClickFfBugInput)
var btnPreventModal = document.getElementById('btnPreventModal')
var modalFf = new Modal(firefoxModal)
var modalFf = new bootstrap.Modal(firefoxModal)
btnPreventModal.addEventListener('click', function () {
function shownFirefoxModal() {

View File

@ -31,18 +31,11 @@
</button>
</div>
<script src="../../../node_modules/@popperjs/core/dist/umd/popper.min.js"></script>
<script src="../../dist/dom/event-handler.js"></script>
<script src="../../dist/dom/selector-engine.js"></script>
<script src="../../dist/dom/manipulator.js"></script>
<script src="../../dist/dom/data.js"></script>
<script src="../../dist/base-component.js"></script>
<script src="../../dist/tooltip.js"></script>
<script src="../../dist/popover.js"></script>
<script src="../../../dist/js/bootstrap.bundle.js"></script>
<script>
var popoverElements = document.querySelectorAll('[data-bs-toggle="popover"]')
for (const popoverEl of popoverElements) {
new Popover(popoverEl)
new bootstrap.Popover(popoverEl)
}
</script>
</body>

View File

@ -86,13 +86,6 @@
<p>Ad leggings keytar, brunch id art party dolor labore.</p>
</div>
<script src="../../dist/dom/data.js"></script>
<script src="../../dist/dom/event-handler.js"></script>
<script src="../../dist/dom/selector-engine.js"></script>
<script src="../../dist/dom/manipulator.js"></script>
<script src="../../dist/base-component.js"></script>
<script src="../../dist/scrollspy.js"></script>
<script src="../../dist/dropdown.js"></script>
<script src="../../dist/collapse.js"></script>
<script src="../../../dist/js/bootstrap.bundle.js"></script>
</body>
</html>

View File

@ -218,11 +218,6 @@
</div>
</div>
<script src="../../dist/dom/event-handler.js"></script>
<script src="../../dist/dom/selector-engine.js"></script>
<script src="../../dist/dom/data.js"></script>
<script src="../../dist/dom/manipulator.js"></script>
<script src="../../dist/base-component.js"></script>
<script src="../../dist/tab.js"></script>
<script src="../../../dist/js/bootstrap.bundle.js"></script>
</body>
</html>

View File

@ -50,22 +50,18 @@
</div>
</div>
<script src="../../dist/dom/event-handler.js"></script>
<script src="../../dist/dom/manipulator.js"></script>
<script src="../../dist/dom/data.js"></script>
<script src="../../dist/base-component.js"></script>
<script src="../../dist/toast.js"></script>
<script src="../../../dist/js/bootstrap.bundle.js"></script>
<script>
window.addEventListener('load', function () {
var toastElements = document.querySelectorAll('.toast')
for (const toastEl of toastElements) {
new Toast(toastEl)
new bootstrap.Toast(toastEl)
}
document.getElementById('btnShowToast').addEventListener('click', function () {
var toastElements = document.querySelectorAll('.toast')
for (const toastEl of toastElements) {
var toast = Toast.getInstance(toastEl)
var toast = bootstrap.Toast.getInstance(toastEl)
toast.show()
}
})
@ -73,7 +69,7 @@
document.getElementById('btnHideToast').addEventListener('click', function () {
var toastElements = document.querySelectorAll('.toast')
for (const toastEl of toastElements) {
var toast = Toast.getInstance(toastEl)
var toast = bootstrap.Toast.getInstance(toastEl)
toast.hide()
}
})

View File

@ -68,13 +68,7 @@
<div id="customContainer"></div>
</div>
<script src="../../../node_modules/@popperjs/core/dist/umd/popper.min.js"></script>
<script src="../../dist/dom/selector-engine.js"></script>
<script src="../../dist/dom/event-handler.js"></script>
<script src="../../dist/dom/manipulator.js"></script>
<script src="../../dist/dom/data.js"></script>
<script src="../../dist/base-component.js"></script>
<script src="../../dist/tooltip.js"></script>
<script src="../../../dist/js/bootstrap.bundle.js"></script>
<script>
if (typeof document.body.attachShadow === 'function') {
var shadowRoot = document.getElementById('shadow').attachShadow({ mode: 'open' })
@ -86,24 +80,24 @@
' Tooltip on top in a shadow dom' +
'</button>'
var firstChildTooltip = new Tooltip(shadowRoot.firstChild)
var secondChildTooltip = new Tooltip(shadowRoot.getElementById('secondTooltip'), {
var firstChildTooltip = new bootstrap.Tooltip(shadowRoot.firstChild)
var secondChildTooltip = new bootstrap.Tooltip(shadowRoot.getElementById('secondTooltip'), {
container: shadowRoot
})
}
var tooltipElements = document.querySelectorAll('[data-bs-toggle="tooltip"]')
for (const tooltipEl of tooltipElements) {
new Tooltip(tooltipEl)
new bootstrap.Tooltip(tooltipEl)
}
var tooltipElement = document.getElementById('tooltipElement')
var tooltipElementInstance = new Tooltip(tooltipElement, {
var tooltipElementInstance = new bootstrap.Tooltip(tooltipElement, {
container: document.getElementById('customContainer')
})
var target = document.getElementById('target')
var targetTooltip = new Tooltip(target, {
var targetTooltip = new bootstrap.Tooltip(target, {
placement : 'top',
trigger : 'manual'
})