Skip to content

Commit 3d11d0e

Browse files
committed
Wait for the page to be fully loaded by checking for a reliable element
1 parent a7f9ba5 commit 3d11d0e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/index.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import { test, expect } from "@playwright/test";
22

33
test("Has Index title", async ({ page }) => {
44
await page.goto("/");
5+
6+
// Wait for the page to be fully loaded by checking for a reliable element
7+
await page.waitForSelector('main', { state: 'visible' });
58

69
// Expect a title "to contain" a substring.
710
await expect(page).toHaveTitle(/Index - Nuxt 3 Woocommerce/);

0 commit comments

Comments
 (0)