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?_preview=1");
    // Wait for table to load
    await expect(page.locator("table")).toBeVisible({ timeout: 10000 });
    await expect(page).toHaveScreenshot({ maxDiffPixelRatio: 1 });
  });

  test("jobs management page should match baseline", async ({ page }) => {
    await page.goto("/admin/jobs?_preview=1");
    await expect(page.locator("table")).toBeVisible({ timeout: 10000 });
    await expect(page).toHaveScreenshot({ maxDiffPixelRatio: 1 });
  });
});
