Skip to content

Commit

Permalink
stabilize tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BoppLi committed Aug 6, 2024
1 parent 7f9e6ff commit 500c282
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,14 @@ test.describe("Screenshot tests", () => {

if (row === "hover") {
await component.getByText("Test label").hover();
}
if (row === "focus-visible") await page.keyboard.press("Tab");

// wait for the tooltip to show up reliably
if (["focus-visible", "hover"].includes(row)) {
// eslint-disable-next-line playwright/no-standalone-expect
await expect(page.getByRole("tooltip", { name: errorMessage })).toBeVisible();

Check failure

Code scanning / ESLint

Disallow using `expect` outside of `test` blocks Error

Expect must be inside of a test block
}
if (row === "focus-visible") await page.keyboard.press("Tab");
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,14 @@ test.describe("Screenshot tests", () => {

if (row === "hover") {
await component.getByText("Test label").hover();
}
if (row === "focus-visible") await page.keyboard.press("Tab");

// wait for the tooltip to show up reliably
if (["focus-visible", "hover"].includes(row)) {
// eslint-disable-next-line playwright/no-standalone-expect
await expect(page.getByRole("tooltip", { name: errorMessage })).toBeVisible();

Check failure

Code scanning / ESLint

Disallow using `expect` outside of `test` blocks Error

Expect must be inside of a test block
}
if (row === "focus-visible") await page.keyboard.press("Tab");
},
});

Expand Down

0 comments on commit 500c282

Please sign in to comment.