1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-16 10:34:07 +02:00

Carousel: change class check as it can only exist if carousel is sliding

Also, fix the corresponding test
This commit is contained in:
GeoSot
2022-03-10 02:12:19 +02:00
committed by XhmikosR
parent 3673933fe7
commit 6e904341c9
2 changed files with 3 additions and 3 deletions

View File

@@ -868,7 +868,7 @@ describe('Carousel', () => {
})
describe('pause', () => {
it('should call cycle if the carousel have carousel-item-next and carousel-item-prev class', () => {
it('should call cycle if the carousel have carousel-item-next or carousel-item-prev class, cause is sliding', () => {
fixtureEl.innerHTML = [
'<div id="myCarousel" class="carousel slide">',
' <div class="carousel-inner">',
@@ -887,6 +887,7 @@ describe('Carousel', () => {
spyOn(carousel, 'cycle')
spyOn(carousel, '_clearInterval')
carousel._slide('next')
carousel.pause()
expect(carousel.cycle).toHaveBeenCalledWith(true)