diff --git a/packages/edit-post/src/components/preferences-modal/test/index.js b/packages/edit-post/src/components/preferences-modal/test/index.js index 9a2056f140c23c..cc88386ff0d520 100644 --- a/packages/edit-post/src/components/preferences-modal/test/index.js +++ b/packages/edit-post/src/components/preferences-modal/test/index.js @@ -24,16 +24,20 @@ describe( 'EditPostPreferencesModal', () => { useSelect.mockImplementation( () => [ true, true, false ] ); useViewportMatch.mockImplementation( () => true ); render( ); + await screen.findByRole( 'tab', { + name: 'General', + selected: true, + } ); expect( - await screen.findByRole( 'dialog', { name: 'Preferences' } ) + screen.getByRole( 'dialog', { name: 'Preferences' } ) ).toMatchSnapshot(); } ); - it( 'small viewports', async () => { + it( 'small viewports', () => { useSelect.mockImplementation( () => [ true, true, false ] ); useViewportMatch.mockImplementation( () => false ); render( ); expect( - await screen.findByRole( 'dialog', { name: 'Preferences' } ) + screen.getByRole( 'dialog', { name: 'Preferences' } ) ).toMatchSnapshot(); } ); } );