Improve compact desktop usability and action guidance
All checks were successful
Deploy Sokko G / deploy (push) Successful in 19s

This commit is contained in:
Shinuwa 2026-10-05 21:47:16 +02:00
parent 0ac1a0974e
commit 0fc18cd8b9
24 changed files with 325 additions and 90 deletions

View file

@ -1,15 +1,36 @@
// Rôle : vérifie en navigateur que la home charge les zones principales.
import { expect, test } from "@playwright/test";
import { resetSokkoStorage } from "./helpers/storage.js";
test.beforeEach(async ({ page }) => resetSokkoStorage(page));
test("home page renders the application shell", async ({ page }) => {
await page.goto("/");
await expect(page.locator(".app-shell")).toBeVisible();
const main = page.getByRole("main");
const hero = main.locator(".hero");
await expect(main).toBeVisible();
await expect(main.getByRole("heading", { name: "Sokko G", exact: true })).toBeVisible();
await expect(main.getByRole("link", { name: "Voir les toolboxes", exact: true })).toBeVisible();
const create = hero.getByRole("button", { name: "Créer ma première toolbox", exact: true });
await expect(create).toBeVisible();
await expect(main.getByRole("link", { name: "Voir les jeux", exact: true })).toBeVisible();
await expect(page.locator(".home-stats")).toBeVisible();
await expect(page.locator(".origin-section")).toBeVisible();
await create.click();
await expect(page.getByRole("dialog", { name: "Nouvelle toolbox", exact: true })).toBeVisible();
});
test("home links to the toolbox list once a toolbox exists", async ({ page }) => {
await page.locator(".hero").getByRole("button", { name: "Créer ma première toolbox", exact: true }).click();
const dialog = page.getByRole("dialog", { name: "Nouvelle toolbox", exact: true });
await dialog.getByRole("textbox", { name: "Nom", exact: true }).fill("Accueil contextualisé");
await dialog.getByRole("button", { name: "Créer", exact: true }).click();
await page.goto("/#/");
const link = page.getByRole("main").getByRole("link", { name: "Voir mes toolboxes", exact: true });
await expect(link).toBeVisible();
await link.click();
await expect(page).toHaveURL(/#\/toolboxes$/);
});