@@ -698,7 +698,7 @@ describe('Carousel', () => {
698698
699699 it ( 'should pause/play on pointerenter/pointerleave' , async ( ) => {
700700 const spy = vi . spyOn ( carousel , 'emitEvent' ) ;
701- const divContainer = carousel . shadowRoot ? .querySelector (
701+ const divContainer = carousel . renderRoot . querySelector (
702702 'div[aria-live]'
703703 ) as HTMLDivElement ;
704704
@@ -732,7 +732,7 @@ describe('Carousel', () => {
732732
733733 it ( 'should pause/play on keyboard interaction' , async ( ) => {
734734 const spy = vi . spyOn ( carousel , 'emitEvent' ) ;
735- const divContainer = carousel . shadowRoot ? .querySelector (
735+ const divContainer = carousel . renderRoot . querySelector (
736736 'div[aria-live]'
737737 ) as HTMLDivElement ;
738738
@@ -794,6 +794,8 @@ describe('Carousel', () => {
794794 await elementUpdated ( carousel ) ;
795795
796796 await vi . advanceTimersByTimeAsync ( 199 ) ;
797+ vi . runAllTicks ( ) ;
798+ await nextFrame ( ) ;
797799
798800 expect ( carousel . isPlaying ) . to . be . true ;
799801 expect ( carousel . isPaused ) . to . be . false ;
@@ -804,6 +806,8 @@ describe('Carousel', () => {
804806 await elementUpdated ( carousel ) ;
805807
806808 await vi . advanceTimersByTimeAsync ( 1 ) ;
809+ vi . runAllTicks ( ) ;
810+ await nextFrame ( ) ;
807811
808812 expect ( carousel . isPlaying ) . to . be . false ;
809813 expect ( carousel . isPaused ) . to . be . true ;
@@ -818,6 +822,8 @@ describe('Carousel', () => {
818822 await elementUpdated ( carousel ) ;
819823
820824 await vi . advanceTimersByTimeAsync ( 200 ) ;
825+ vi . runAllTicks ( ) ;
826+ await nextFrame ( ) ;
821827
822828 // an interactive element is focused
823829 // -> should not start rotation on pointerleave
0 commit comments