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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user