1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-30 00:29:52 +02: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
11 changed files with 23 additions and 86 deletions

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()
}
})