diff options
| author | GeoSot <[email protected]> | 2022-03-10 02:12:19 +0200 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2022-03-10 15:22:14 +0200 |
| commit | 6e904341c9a4a07ea0232850a2dcd4ddc7dfa00a (patch) | |
| tree | 2e16a9a3b45722506cb6ec1329d262a600ae74e6 /js/tests/unit/carousel.spec.js | |
| parent | 3673933fe74b4323267b0b0a7871a393ce2ff5cb (diff) | |
| download | bootstrap-6e904341c9a4a07ea0232850a2dcd4ddc7dfa00a.tar.xz bootstrap-6e904341c9a4a07ea0232850a2dcd4ddc7dfa00a.zip | |
Carousel: change class check as it can only exist if carousel is sliding
Also, fix the corresponding test
Diffstat (limited to 'js/tests/unit/carousel.spec.js')
| -rw-r--r-- | js/tests/unit/carousel.spec.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/js/tests/unit/carousel.spec.js b/js/tests/unit/carousel.spec.js index 9817b83f1..8875f3f00 100644 --- a/js/tests/unit/carousel.spec.js +++ b/js/tests/unit/carousel.spec.js @@ -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) |
