Share toolbox components and fix image and calendar updates
Some checks failed
Deploy Sokko G / deploy (push) Failing after 2s

This commit is contained in:
Shinuwa 2026-09-10 14:19:55 +02:00
parent 865a4ffd97
commit 34524d2961
13 changed files with 117 additions and 93 deletions

24
e2e/library.spec.js Normal file
View file

@ -0,0 +1,24 @@
// Rôle : vérifie le chargement des outils de chaque catégorie de la librairie.
import { test, expect } from "@playwright/test";
import { LIBRARY_CATEGORY_DEFINITIONS } from "../website/src/features/toolboxes/toolboxModuleRegistry.js";
test("loads every library tool through the shared component registry", async ({ page }) => {
const errors = [];
page.on("pageerror", (error) => errors.push(error.message));
page.on("console", (message) => {
if (message.type() === "error") errors.push(message.text());
});
await page.goto("/#/library");
for (const category of LIBRARY_CATEGORY_DEFINITIONS) {
await page.locator(`.library-doc-nav-group > a[href="#/library#library-category-${category.key}"]`).click();
for (const type of category.types) {
const tools = page.locator(`[data-module-type="${type}"] .module-content`);
await expect(tools.first()).toBeVisible();
for (const tool of await tools.all()) {
await expect(tool.getByText("Chargement de l'outil...")).toHaveCount(0);
await expect(tool.locator(":scope > *").first()).toBeVisible();
}
}
}
expect(errors).toEqual([]);
});