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
+29
View File
@@ -0,0 +1,29 @@
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("Tour d'accueil première visite", () => {
test.beforeEach(async ({ context }) => {
await context.addInitScript(
(keys: { consent: string; tour: string }) => {
localStorage.setItem(keys.consent, "analytics-rejected");
localStorage.removeItem(keys.tour);
},
{ consent: CONSENT_STORAGE_KEY, tour: WELCOME_TOUR_STORAGE_KEY }
);
});
test("modale visible sur / puis fermeture via bouton principal", async ({ page }) => {
await page.goto("/");
const dialog = page.locator("#welcome-tour-dialog");
await expect(dialog).toBeVisible({ timeout: 15_000 });
await page.getByRole("button", { name: /Commencer|Get started|시작하기|开始使用/i }).click();
await expect(dialog).toBeHidden();
});
test("pas de modale sur une URL recette partagée", async ({ page }) => {
await page.goto("/r/base%3Aonigiri/variant%3Aonigiri-kimchi-mozza");
await expect(page.locator("#welcome-tour-dialog")).toHaveCount(0);
});
});