1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-13 00:54:04 +02:00

Fix .close instances (#32152)

This commit is contained in:
XhmikosR
2020-11-14 08:16:30 +02:00
committed by GitHub
parent f39666b61c
commit 4f8b243ac1
5 changed files with 15 additions and 35 deletions

View File

@@ -46,9 +46,7 @@ describe('Toast', () => {
it('should close toast when close element with data-bs-dismiss attribute is set', done => {
fixtureEl.innerHTML = [
'<div class="toast" data-bs-delay="1" data-bs-autohide="false" data-bs-animation="false">',
' <button type="button" class="ml-2 mb-1 close" data-bs-dismiss="toast">',
' close',
' </button>',
' <button type="button" class="ml-2 mb-1 btn-close" data-bs-dismiss="toast" aria-label="Close"></button>',
'</div>'
].join('')
@@ -58,7 +56,7 @@ describe('Toast', () => {
toastEl.addEventListener('shown.bs.toast', () => {
expect(toastEl.classList.contains('show')).toEqual(true)
const button = toastEl.querySelector('.close')
const button = toastEl.querySelector('.btn-close')
button.click()
})
@@ -80,9 +78,7 @@ describe('Toast', () => {
fixtureEl.innerHTML = [
'<div class="toast" data-bs-autohide="false" data-bs-animation="false">',
' <button type="button" class="ml-2 mb-1 close" data-bs-dismiss="toast">',
' close',
' </button>',
' <button type="button" class="ml-2 mb-1 btn-close" data-bs-dismiss="toast" aria-label="Close"></button>',
'</div>'
].join('')