From f84568c9c229a244fa80cbc944f2937ca7ccfdf5 Mon Sep 17 00:00:00 2001 From: Marco Ciampini Date: Wed, 13 Dec 2023 07:50:43 +0100 Subject: [PATCH] Remove animation-specific tests (as they can't be tested in jsdom) --- .../components/src/navigator/test/index.tsx | 64 ------------------- 1 file changed, 64 deletions(-) diff --git a/packages/components/src/navigator/test/index.tsx b/packages/components/src/navigator/test/index.tsx index 5a711b8730224a..b83bd70d9d7444 100644 --- a/packages/components/src/navigator/test/index.tsx +++ b/packages/components/src/navigator/test/index.tsx @@ -769,68 +769,4 @@ describe( 'Navigator', () => { ).toHaveFocus(); } ); } ); - - describe( 'animation', () => { - it( 'should not animate the initial screen', async () => { - const onHomeAnimationStartSpy = jest.fn(); - - render( - - - - To child - - - - ); - - expect( onHomeAnimationStartSpy ).not.toHaveBeenCalled(); - } ); - - it( 'should animate all other screens (including the initial screen when navigating back)', async () => { - const user = userEvent.setup(); - - const onHomeAnimationStartSpy = jest.fn(); - const onChildAnimationStartSpy = jest.fn(); - - render( - - - - To child - - - - - Back to home - - - - ); - - expect( onHomeAnimationStartSpy ).not.toHaveBeenCalled(); - expect( onChildAnimationStartSpy ).not.toHaveBeenCalled(); - - await user.click( - screen.getByRole( 'button', { name: 'To child' } ) - ); - expect( onChildAnimationStartSpy ).toHaveBeenCalledTimes( 1 ); - expect( onHomeAnimationStartSpy ).not.toHaveBeenCalled(); - - await user.click( - screen.getByRole( 'button', { name: 'Back to home' } ) - ); - expect( onChildAnimationStartSpy ).toHaveBeenCalledTimes( 1 ); - expect( onHomeAnimationStartSpy ).toHaveBeenCalledTimes( 1 ); - } ); - } ); } );