Skip to content

Commit

Permalink
fix active screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
larsrickert committed Aug 12, 2024
1 parent ae244a8 commit 7c58eb7
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ test.describe("screenshot tests", () => {
beforeScreenshot: async (component, page, column, row) => {
if (row === "hover") await component.hover();
if (row === "focus-visible") await page.keyboard.press("Tab");
if (row === "active") await page.mouse.down();
if (row === "active") {
const box = (await component.boundingBox())!;
await page.mouse.move(box.x + box.width / 2, box.y + box.height / 2);
await page.mouse.down();
}
},
});
}
Expand Down

0 comments on commit 7c58eb7

Please sign in to comment.