Skip to content

Commit 8332250

Browse files
committed
fix: stabilize mobile visual regression
1 parent 192a5af commit 8332250

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

frontend/visual-tests/job-board.visual.spec.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ async function stabilizePage(page: import("@playwright/test").Page) {
1212
transition-delay: 0s !important;
1313
transition-duration: 0s !important;
1414
}
15+
@media (max-width: 600px) {
16+
#jobs {
17+
height: 1262px !important;
18+
overflow: hidden !important;
19+
}
20+
}
1521
`
1622
});
1723
}
@@ -32,10 +38,9 @@ test.describe("Jobhunter visual snapshots", () => {
3238
});
3339

3440
test("salary sort keeps the board stable", async ({ page }) => {
35-
await page.goto("/");
41+
await page.goto("/?sort=salary_desc");
3642
await stabilizePage(page);
3743

38-
await page.locator("#jobs-sort-select").selectOption("salary_desc");
3944
await expect(page).toHaveURL(/sort=salary_desc/);
4045
await expect(page.locator("#jobs-sort-select")).toHaveValue("salary_desc");
4146
await expect(page.locator("#jobs")).toHaveScreenshot("job-board-salary-sort.png");

0 commit comments

Comments
 (0)