Skip to content

Commit 80ef47a

Browse files
authored
Merge pull request #1422 from w3bdesign/dev
Wait for the page to be fully loaded by checking for a reliable element
2 parents a7f9ba5 + 3bc8496 commit 80ef47a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/index.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { test, expect } from "@playwright/test";
22

33
test("Has Index title", async ({ page }) => {
44
await page.goto("/");
5-
5+
// Wait for the page to be fully loaded by checking for a reliable element
6+
await page.waitForSelector("main", { state: "visible" });
67
// Expect a title "to contain" a substring.
78
await expect(page).toHaveTitle(/Index - Nuxt 3 Woocommerce/);
89
});

0 commit comments

Comments
 (0)