- Add vitest with solid plugin, coverage, jsdom environment - Create MSW mocks for API responses in test setup - Add unit test for ProfessionAdminListPage - Add Playwright accessibility and visual regression configs - Add sample accessibility and visual tests - Add ESLint + Prettier configs with SolidJS rules - Update scripts: test, test:coverage, test:accessibility, test:visual - Add .gitignore entries for coverage, test-results, playwright-report, .vitest - Install required dev dependencies: vitest, @solidjs/testing-library, msw, eslint, prettier, typescript, @axe-core/playwright, etc. - Create .github/workflows/ci.yml with lint, test, coverage, e2e, accessibility, visual checks This sets up full testing pipeline for admin frontend.
16 lines
666 B
TypeScript
16 lines
666 B
TypeScript
import { test, expect } from "@playwright/test";
|
|
|
|
test.describe("Visual Regression - Admin Pages", () => {
|
|
test("company management page should match baseline", async ({ page }) => {
|
|
await page.goto("/admin/company");
|
|
// Wait for table to load
|
|
await expect(page.locator("table")).toBeVisible({ timeout: 10000 });
|
|
await expect(page).toHaveScreenshot({ maxDiffPixelRatio: 0.1 });
|
|
});
|
|
|
|
test("jobs management page should match baseline", async ({ page }) => {
|
|
await page.goto("/admin/jobs");
|
|
await expect(page.locator("table")).toBeVisible({ timeout: 10000 });
|
|
await expect(page).toHaveScreenshot({ maxDiffPixelRatio: 0.1 });
|
|
});
|
|
});
|