From c103c1129b4deedd97d7ca1f7980655a8ffef3b4 Mon Sep 17 00:00:00 2001 From: Patricia Hillebrandt Date: Fri, 15 Mar 2024 11:20:16 +0100 Subject: [PATCH] Update e2e tests to account for the changes made to the transitional page. --- .../customize-store/transitional/test/index.test.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/woocommerce-admin/client/customize-store/transitional/test/index.test.tsx b/plugins/woocommerce-admin/client/customize-store/transitional/test/index.test.tsx index 8c8859c1f442..6d82ba2edf57 100644 --- a/plugins/woocommerce-admin/client/customize-store/transitional/test/index.test.tsx +++ b/plugins/woocommerce-admin/client/customize-store/transitional/test/index.test.tsx @@ -48,10 +48,15 @@ describe( 'Transitional', () => { expect( screen.getByRole( 'button', { - name: /Preview store/i, + name: /View store/i, } ) ).toBeInTheDocument(); + expect( + screen.getByRole( 'button', { + name: /Go to Products/i, + } ) + ).toBeInTheDocument(); expect( screen.getByRole( 'button', { name: /Go to the Editor/i, @@ -65,14 +70,14 @@ describe( 'Transitional', () => { ).toBeInTheDocument(); } ); - it( 'should record an event when clicking on "Preview store" button', () => { + it( 'should record an event when clicking on "View store" button', () => { window.open = jest.fn(); // @ts-ignore render( ); screen .getByRole( 'button', { - name: /Preview store/i, + name: /View store/i, } ) .click();