mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-16 18:44:01 +02:00
Add bs
in data attributes
- Add `bs` in data APIs everywhere - Update unit tests
This commit is contained in:
@@ -43,10 +43,10 @@ describe('Toast', () => {
|
||||
toast.show()
|
||||
})
|
||||
|
||||
it('should close toast when close element with data-dismiss attribute is set', done => {
|
||||
it('should close toast when close element with data-bs-dismiss attribute is set', done => {
|
||||
fixtureEl.innerHTML = [
|
||||
'<div class="toast" data-delay="1" data-autohide="false" data-animation="false">',
|
||||
' <button type="button" class="ml-2 mb-1 close" data-dismiss="toast">',
|
||||
'<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>',
|
||||
'</div>'
|
||||
@@ -79,8 +79,8 @@ describe('Toast', () => {
|
||||
Toast.Default.delay = defaultDelay
|
||||
|
||||
fixtureEl.innerHTML = [
|
||||
'<div class="toast" data-autohide="false" data-animation="false">',
|
||||
' <button type="button" class="ml-2 mb-1 close" data-dismiss="toast">',
|
||||
'<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>',
|
||||
'</div>'
|
||||
@@ -102,7 +102,7 @@ describe('Toast', () => {
|
||||
describe('show', () => {
|
||||
it('should auto hide', done => {
|
||||
fixtureEl.innerHTML = [
|
||||
'<div class="toast" data-delay="1">',
|
||||
'<div class="toast" data-bs-delay="1">',
|
||||
' <div class="toast-body">',
|
||||
' a simple toast',
|
||||
' </div>',
|
||||
@@ -122,7 +122,7 @@ describe('Toast', () => {
|
||||
|
||||
it('should not add fade class', done => {
|
||||
fixtureEl.innerHTML = [
|
||||
'<div class="toast" data-delay="1" data-animation="false">',
|
||||
'<div class="toast" data-bs-delay="1" data-bs-animation="false">',
|
||||
' <div class="toast-body">',
|
||||
' a simple toast',
|
||||
' </div>',
|
||||
@@ -142,7 +142,7 @@ describe('Toast', () => {
|
||||
|
||||
it('should not trigger shown if show is prevented', done => {
|
||||
fixtureEl.innerHTML = [
|
||||
'<div class="toast" data-delay="1" data-animation="false">',
|
||||
'<div class="toast" data-bs-delay="1" data-bs-animation="false">',
|
||||
' <div class="toast-body">',
|
||||
' a simple toast',
|
||||
' </div>',
|
||||
@@ -202,7 +202,7 @@ describe('Toast', () => {
|
||||
describe('hide', () => {
|
||||
it('should allow to hide toast manually', done => {
|
||||
fixtureEl.innerHTML = [
|
||||
'<div class="toast" data-delay="1" data-autohide="false">',
|
||||
'<div class="toast" data-bs-delay="1" data-bs-autohide="false">',
|
||||
' <div class="toast-body">',
|
||||
' a simple toast',
|
||||
' </div>',
|
||||
@@ -239,7 +239,7 @@ describe('Toast', () => {
|
||||
|
||||
it('should not trigger hidden if hide is prevented', done => {
|
||||
fixtureEl.innerHTML = [
|
||||
'<div class="toast" data-delay="1" data-animation="false">',
|
||||
'<div class="toast" data-bs-delay="1" data-bs-animation="false">',
|
||||
' <div class="toast-body">',
|
||||
' a simple toast',
|
||||
' </div>',
|
||||
@@ -289,7 +289,7 @@ describe('Toast', () => {
|
||||
|
||||
it('should allow to destroy toast and hide it before that', done => {
|
||||
fixtureEl.innerHTML = [
|
||||
'<div class="toast" data-delay="0" data-autohide="false">',
|
||||
'<div class="toast" data-bs-delay="0" data-bs-autohide="false">',
|
||||
' <div class="toast-body">',
|
||||
' a simple toast',
|
||||
' </div>',
|
||||
|
Reference in New Issue
Block a user