first commit

This commit is contained in:
2026-07-21 16:50:58 +02:00
commit 256599626e
407 changed files with 30489 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
import { expect, test } from "@playwright/test";
const CONSENT_STORAGE_KEY = "ben-to-cookie-consent-v1";
const WELCOME_TOUR_STORAGE_KEY = "ben-to.welcome-tour-dismissed";
test.describe("Bandeau cookies / analytics", () => {
test.beforeEach(async ({ context }) => {
await context.addInitScript(
(keys: { consent: string; tour: string }) => {
localStorage.removeItem(keys.consent);
localStorage.setItem(keys.tour, "v1");
},
{ consent: CONSENT_STORAGE_KEY, tour: WELCOME_TOUR_STORAGE_KEY }
);
});
test("le bandeau saffiche puis disparaît après acceptation", async ({ page }) => {
await page.goto("/");
const banner = page.locator(".cookie-consent");
await expect(banner).toBeVisible();
await page.getByRole("button", { name: /Accepter|Accept|동의|同意/i }).click();
await expect(banner).toBeHidden();
});
});