@@ -705,7 +705,7 @@ describe('Carousel', () => {
705705 carousel = fixture . componentInstance . carousel ;
706706 } ) ;
707707
708- it ( 'should stop/play on tap ' , async ( ) => {
708+ it ( 'should stop/play on tap ' , ( ) => {
709709 carousel . interval = 1000 ;
710710 carousel . play ( ) ;
711711 fixture . detectChanges ( ) ;
@@ -715,15 +715,13 @@ describe('Carousel', () => {
715715
716716 expect ( carousel . isPlaying ) . toBeTruthy ( ) ;
717717
718- HelperTestFunctions . simulateTap ( carousel ) ;
718+ HelperTestFunctions . simulateTap ( fixture , carousel ) ;
719719 fixture . detectChanges ( ) ;
720- await wait ( 200 ) ;
721720
722721 expect ( carousel . isPlaying ) . toBeFalsy ( ) ;
723722
724- HelperTestFunctions . simulateTap ( carousel ) ;
723+ HelperTestFunctions . simulateTap ( fixture , carousel ) ;
725724 fixture . detectChanges ( ) ;
726- await wait ( 200 ) ;
727725
728726 expect ( carousel . isPlaying ) . toBeTruthy ( ) ;
729727
@@ -733,15 +731,13 @@ describe('Carousel', () => {
733731
734732 expect ( carousel . isPlaying ) . toBeFalsy ( ) ;
735733
736- HelperTestFunctions . simulateTap ( carousel ) ;
734+ HelperTestFunctions . simulateTap ( fixture , carousel ) ;
737735 fixture . detectChanges ( ) ;
738- await wait ( 200 ) ;
739736
740737 expect ( carousel . isPlaying ) . toBeFalsy ( ) ;
741738
742- HelperTestFunctions . simulateTap ( carousel ) ;
739+ HelperTestFunctions . simulateTap ( fixture , carousel ) ;
743740 fixture . detectChanges ( ) ;
744- await wait ( 200 ) ;
745741
746742 expect ( carousel . isPlaying ) . toBeFalsy ( ) ;
747743 } ) ;
@@ -881,9 +877,11 @@ class HelperTestFunctions {
881877 expect ( carousel . slides . find ( ( slide ) => slide . active && slide . index !== index ) ) . toBeUndefined ( ) ;
882878 }
883879
884- public static simulateTap ( carousel ) {
880+ public static simulateTap ( fixture , carousel ) {
885881 const activeSlide = carousel . get ( carousel . current ) . nativeElement ;
886- Simulator . gestures . press ( activeSlide , { duration : 180 } ) ;
882+ const carouselElement = fixture . debugElement . query ( By . css ( 'igx-carousel' ) ) ;
883+ carouselElement . triggerEventHandler ( 'tap' , { target : activeSlide } ) ;
884+ // Simulator.gestures.press(activeSlide, { duration: 180 });
887885 }
888886
889887 public static simulatePan ( fixture , carousel , deltaXOffset , velocity ) {
0 commit comments