import { test, expect } from "@playwright/test";

const runE2E = process.env.RUN_E2E === "true";

test.skip(!runE2E, "RUN_E2E=true requis");

test("navigation home -> login -> register", async ({ page }) => {
  await page.goto("/");
  await expect(page).toHaveTitle(/RollerLogic/i);

  await page.click("[data-action='go-login']");
  await expect(page.locator("main[data-screen='login']")).toHaveClass(
    /is-active/,
  );

  await page.click("[data-action='go-register']");
  await expect(page.locator("main[data-screen='register']")).toHaveClass(
    /is-active/,
  );
});
