- Add vitest, Playwright, ESLint, Prettier configs - Add unit tests and e2e accessibility/visual tests - Add MSW mocks and test setup - Update scripts and .gitignore - Install required dev dependencies Note: GitHub Actions workflow will be added after token scope is granted.
15 lines
590 B
TypeScript
15 lines
590 B
TypeScript
import { test, expect } from "@playwright/test";
|
|
|
|
test.describe("Visual Regression - Public Pages", () => {
|
|
test("homepage should match baseline", async ({ page }) => {
|
|
await page.goto("/");
|
|
await expect(page.locator("main")).toBeVisible({ timeout: 10000 });
|
|
await expect(page).toHaveScreenshot({ maxDiffPixelRatio: 0.1 });
|
|
});
|
|
|
|
test("jobs page should match baseline", async ({ page }) => {
|
|
await page.goto("/jobs");
|
|
await expect(page.locator("main")).toBeVisible({ timeout: 10000 });
|
|
await expect(page).toHaveScreenshot({ maxDiffPixelRatio: 0.1 });
|
|
});
|
|
});
|