Skip to content

Commit

Permalink
test(OnyxNavBar): fix mobile screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
larsrickert committed Jan 9, 2025
1 parent 5a43de3 commit 2d99dcf
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ test.describe("Screenshot tests", () => {
});

test("Screenshot tests (mobile)", async ({ mount, page }) => {
await page.setViewportSize({ height: 512, width: ONYX_BREAKPOINTS.sm });
await page.addStyleTag({ content: "body { margin: 0 }" });
await page.setViewportSize({ height: 512, width: ONYX_BREAKPOINTS.sm - 1 });

const clickEvents: string[] = [];

Expand Down Expand Up @@ -199,6 +200,7 @@ test("Screenshot tests (mobile)", async ({ mount, page }) => {

["", " with context"].forEach((showContext) => {
test(`Screenshot tests (mobile truncated labels${showContext})`, async ({ mount, page }) => {
await page.addStyleTag({ content: "body { margin: 0 }" });
await page.setViewportSize({ height: 350, width: ONYX_BREAKPOINTS["2xs"] });
const longLabel = "Item with a very long truncated name";

Expand Down

0 comments on commit 2d99dcf

Please sign in to comment.