File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ import sinon from 'sinon';
6
6
import sinonChai from 'sinon-chai' ;
7
7
import Carousel from '../../src/index' ;
8
8
9
-
10
9
chai . use ( sinonChai ) ;
11
10
let imagesFetched ;
12
11
@@ -447,6 +446,28 @@ describe('Carousel', () => {
447
446
expect ( selectedSlide . prop ( 'style' ) . opacity ) . to . equal ( 1 ) ;
448
447
} ) ;
449
448
449
+ it ( 'should render vertical carousal with default arrows.' , ( ) => {
450
+ renderToJsdom (
451
+ < Carousel slideWidth = '300px'
452
+ viewportWidth = '300px'
453
+ lazyLoad = { false }
454
+ infinite = { false }
455
+ isVertical = { true } >
456
+ < div id = 'slide1' />
457
+ < div id = 'slide2' />
458
+ < div id = 'slide3' />
459
+ </ Carousel > ) ;
460
+ const topArrow = tree . find ( '.carousel-top-arrow' ) ;
461
+ const bottomArrow = tree . find ( '.carousel-bottom-arrow' ) ;
462
+ const carousalDiv = tree . find ( '.carousel-container-inner' ) ;
463
+
464
+ expect ( carousalDiv . prop ( 'style' ) . display ) . to . eql ( 'flex' ) ;
465
+ expect ( topArrow . length ) . to . eql ( 1 ) ;
466
+ expect ( topArrow . children ( ) . html ( ) ) . to . eql ( '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="m0 16.67 2.829 2.83 9.175-9.339 9.167 9.339L24 16.67 12.004 4.5z"></path></svg>' ) ;
467
+ expect ( bottomArrow . length ) . to . eql ( 1 ) ;
468
+ expect ( bottomArrow . children ( ) . html ( ) ) . to . eql ( '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M0 7.33 2.829 4.5l9.175 9.339L21.171 4.5 24 7.33 12.004 19.5z"></path></svg>' ) ;
469
+ } ) ;
470
+
450
471
it ( 'should have transitions with the given duration and easing' , done => {
451
472
let slidingCarousel ;
452
473
You can’t perform that action at this time.
0 commit comments