From 2afb5a6313d1ed54fd1982c8afe23808601423e8 Mon Sep 17 00:00:00 2001 From: Saad Tarhi Date: Tue, 7 Nov 2023 01:42:07 +0100 Subject: [PATCH] Fix failing E2E test: Cart title not found --- .../e2e/tests/templates/cart-template.block_theme.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/e2e/tests/templates/cart-template.block_theme.spec.ts b/tests/e2e/tests/templates/cart-template.block_theme.spec.ts index 8b3ed309eb1..0a04c042ce5 100644 --- a/tests/e2e/tests/templates/cart-template.block_theme.spec.ts +++ b/tests/e2e/tests/templates/cart-template.block_theme.spec.ts @@ -12,17 +12,17 @@ test.describe( 'Test the cart template', async () => { admin, page, editorUtils, + editor, } ) => { await admin.visitAdminPage( 'site-editor.php' ); await editorUtils.waitForSiteEditorFinishLoading(); await page.getByRole( 'button', { name: /Templates/i } ).click(); await page.getByRole( 'button', { name: /Page: Cart/i } ).click(); await editorUtils.enterEditMode(); + await editorUtils.closeWelcomeGuideModal(); + await editor.canvas.waitForSelector( 'h1:has-text("Cart block")' ); await expect( - page - .frameLocator( 'iframe[title="Editor canvas"i]' ) - .locator( 'h1:has-text("Cart")' ) - .first() + editor.canvas.locator( 'h1:has-text("Cart block")' ).first() ).toBeVisible(); } );