Skip to content

Commit 7a11be2

Browse files
author
Copilot
committed
Fix h1 visibility test by waiting for network idle and fixing variable name
1 parent f9f7c46 commit 7a11be2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

showcases/patternhub/tests/default.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const getDefaultScreenshotTest = async (
99
) => {
1010
test(`${type} should match screenshot`, async ({ page }) => {
1111
await page.goto(`${path}`, {
12-
waitUntil: 'domcontentloaded'
12+
waitUntil: 'networkidle'
1313
});
1414
await fn(page);
1515
await expect(page).toHaveScreenshot([name, 'patternhub.png']);
@@ -35,8 +35,8 @@ for (const group of Components) {
3535
`overview`,
3636
`.${group.path}/${component.name}/overview?fullscreen=true`,
3737
async (page) => {
38-
const firstH2 = page.locator('h1').first();
39-
await expect(firstH2).toBeVisible();
38+
const firstH1 = page.locator('h1').first();
39+
await expect(firstH1).toBeVisible();
4040
}
4141
);
4242
});

0 commit comments

Comments
 (0)