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(); } );