import { test, expect } from "@playwright/test";

test.describe("Contractors (Demo Mode)", () => {
  test.beforeEach(async ({ page }) => {
    await page.goto("/demo/app/contractors");
  });

  test("displays contractor list", async ({ page }) => {
    await expect(page.locator("h1, h2").first()).toContainText(/contractors/i);
  });

  test("navigate to add contractor", async ({ page }) => {
    await page.click("text=Add Contractor");
    await expect(page).toHaveURL("/demo/app/contractors/new");
  });
});
