@@ -20,12 +20,12 @@ context('Core', () => {
20
20
autoHeight : true ,
21
21
} ) ;
22
22
cy . injectStyles ( `
23
- .swiper-container .swiper-slide {
23
+ .swiper .swiper-slide {
24
24
height: 300px;
25
25
line-height: 300px;
26
26
}
27
27
28
- .swiper-container .swiper-slide:nth-child(2n) {
28
+ .swiper .swiper-slide:nth-child(2n) {
29
29
height: 500px;
30
30
line-height: 500px;
31
31
}` ) ;
@@ -103,7 +103,7 @@ context('Core', () => {
103
103
104
104
it ( 'slidesPerView auto' , ( ) => {
105
105
cy . injectStyles ( `
106
- .swiper-container {
106
+ .swiper {
107
107
width: 100%;
108
108
height: 100%;
109
109
}
@@ -194,7 +194,7 @@ context('Core', () => {
194
194
containerModifierClass : 'unique-test-' ,
195
195
} ) ;
196
196
cy . get ( '.unique-test-horizontal' ) . should ( 'exist' ) ;
197
- cy . get ( '.swiper-container- horizontal' ) . should ( 'not.exist' ) ;
197
+ cy . get ( '.swiper-horizontal' ) . should ( 'not.exist' ) ;
198
198
} ) ;
199
199
200
200
it ( 'slideActiveClass' , ( ) => {
@@ -314,13 +314,13 @@ context('Core', () => {
314
314
315
315
it ( 'direction horizontal' , ( ) => {
316
316
cy . initSwiper ( ) ; // check default
317
- cy . get ( '.swiper-container- horizontal' ) . should ( 'exist' ) ;
318
- cy . get ( '.swiper-container- vertical' ) . should ( 'not.exist' ) ;
317
+ cy . get ( '.swiper-horizontal' ) . should ( 'exist' ) ;
318
+ cy . get ( '.swiper-vertical' ) . should ( 'not.exist' ) ;
319
319
cy . reinitSwiper ( {
320
320
direction : 'horizontal' ,
321
321
} ) ;
322
- cy . get ( '.swiper-container- horizontal' ) . should ( 'exist' ) ;
323
- cy . get ( '.swiper-container- vertical' ) . should ( 'not.exist' ) ;
322
+ cy . get ( '.swiper-horizontal' ) . should ( 'exist' ) ;
323
+ cy . get ( '.swiper-vertical' ) . should ( 'not.exist' ) ;
324
324
cy . getSlide ( 2 ) . should ( ( $el ) => {
325
325
expect ( $el [ 0 ] . getBoundingClientRect ( ) . x ) . to . be . greaterThan ( 100 ) ;
326
326
} ) ;
@@ -333,8 +333,8 @@ context('Core', () => {
333
333
cy . initSwiper ( {
334
334
direction : 'vertical' ,
335
335
} ) ;
336
- cy . get ( '.swiper-container- vertical' ) . should ( 'exist' ) ;
337
- cy . get ( '.swiper-container- horizontal' ) . should ( 'not.exist' ) ;
336
+ cy . get ( '.swiper-vertical' ) . should ( 'exist' ) ;
337
+ cy . get ( '.swiper-horizontal' ) . should ( 'not.exist' ) ;
338
338
cy . getSlide ( 2 ) . should ( ( $el ) => {
339
339
expect ( $el [ 0 ] . getBoundingClientRect ( ) . y ) . to . be . greaterThan ( 100 ) ;
340
340
} ) ;
@@ -408,7 +408,7 @@ context('Core', () => {
408
408
it ( 'should not work as createElements false' , ( ) => {
409
409
cy . window ( ) . then ( ( _window ) => {
410
410
_window . document . body . innerHTML = `
411
- <div class="swiper-container ">
411
+ <div class="swiper">
412
412
<div class="swiper-slide">Slide 1</div>
413
413
<div class="swiper-slide">Slide 2</div>
414
414
<div class="swiper-slide">Slide 3</div>
@@ -421,7 +421,7 @@ context('Core', () => {
421
421
<div class="swiper-slide">Slide 10</div>
422
422
</div>
423
423
` ;
424
- _window . swiperRef = new _window . Swiper ( '.swiper-container ' , {
424
+ _window . swiperRef = new _window . Swiper ( '.swiper' , {
425
425
slidesPerView : 2 ,
426
426
scrollbar : true ,
427
427
createElements : false ,
@@ -440,7 +440,7 @@ context('Core', () => {
440
440
it ( 'should not work as createElements false' , ( ) => {
441
441
cy . window ( ) . then ( ( _window ) => {
442
442
_window . document . body . innerHTML = `
443
- <div class="swiper-container ">
443
+ <div class="swiper">
444
444
<div class="swiper-slide">Slide 1</div>
445
445
<div class="swiper-slide">Slide 2</div>
446
446
<div class="swiper-slide">Slide 3</div>
@@ -453,7 +453,7 @@ context('Core', () => {
453
453
<div class="swiper-slide">Slide 10</div>
454
454
</div>
455
455
` ;
456
- _window . swiperRef = new _window . Swiper ( '.swiper-container ' , {
456
+ _window . swiperRef = new _window . Swiper ( '.swiper' , {
457
457
slidesPerView : 2 ,
458
458
scrollbar : true ,
459
459
createElements : true ,
0 commit comments