Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Fix E2E test: Cart title not found (Admin bar)
Browse files Browse the repository at this point in the history
  • Loading branch information
tarhi-saad authored and Aljullu committed Nov 7, 2023
1 parent 2afb5a6 commit 9c109b9
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions tests/e2e/tests/templates/cart-template.block_theme.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,19 @@ test.describe( 'Test the cart template', async () => {
).toBeVisible();
} );

test( 'Admin bar edit site link opens site editor', async ( { admin } ) => {
test( 'Admin bar edit site link opens site editor', async ( {
admin,
editor,
editorUtils,
} ) => {
await admin.page.goto( permalink, { waitUntil: 'load' } );
await admin.page.locator( '#wp-admin-bar-site-editor a' ).click();
await editorUtils.enterEditMode();
await editorUtils.closeWelcomeGuideModal();
await editorUtils.waitForSiteEditorFinishLoading();
await editor.canvas.waitForSelector( 'h1:has-text("Cart block")' );
await expect(
admin.page
.frameLocator( 'iframe[title="Editor canvas"i]' )
.locator( 'h1:has-text("Cart")' )
.first()
editor.canvas.locator( 'h1:has-text("Cart block")' ).first()
).toBeVisible();
} );
} );
Expand Down

0 comments on commit 9c109b9

Please sign in to comment.