From 80f8342871026c1fa3d7b78f7c9f3a9331ac09b5 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 b08be26cae0f24..273e55e7155075 100644 --- a/packages/block-editor/src/components/link-control/test/index.js +++ b/packages/block-editor/src/components/link-control/test/index.js @@ -2367,48 +2367,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() {