From eb6c27a65c1990757323836fe0dc0df807f4b835 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Thu, 27 Jul 2023 09:43:36 +0100 Subject: [PATCH] Remove unnecessary test coverage --- .../src/components/link-control/test/index.js | 42 ------------------- 1 file changed, 42 deletions(-) diff --git a/packages/block-editor/src/components/link-control/test/index.js b/packages/block-editor/src/components/link-control/test/index.js index d861938c878735..208ba0324231dd 100644 --- a/packages/block-editor/src/components/link-control/test/index.js +++ b/packages/block-editor/src/components/link-control/test/index.js @@ -2366,48 +2366,6 @@ describe( 'Controlling link title text', () => { screen.queryByRole( 'textbox', { name: 'Text' } ) ).not.toBeInTheDocument(); } ); - - it( 'should reset state upon controlled value change', async () => { - const user = userEvent.setup(); - const textValue = 'My new text value'; - const mockOnChange = jest.fn(); - - const { rerender } = render( - - ); - - await toggleSettingsDrawer( user ); - - const textInput = screen.queryByRole( 'textbox', { name: 'Text' } ); - - expect( textInput ).toBeVisible(); - - await user.clear( textInput ); - await user.keyboard( textValue ); - - // Was originally title: 'Hello Page', but we've changed it. - rerender( - - ); - - // The text input should not be showing as the form is submitted. - expect( screen.queryByRole( 'textbox', { name: 'Text' } ) ).toHaveValue( - 'Something else' - ); - } ); } ); function getSettingsDrawerToggle() {