Audit the project and secure toolbox data

This commit is contained in:
Shinuwa 2026-10-14 16:59:09 +02:00
parent 96af62edf0
commit e87edda5c7
40 changed files with 2324 additions and 125 deletions

View file

@ -1,19 +1,22 @@
// Rôle : vérifie l'édition, les prérequis et les réinitialisations du planificateur réel.
import { expect, test } from "@playwright/test";
import { Buffer } from "node:buffer";
import { createToolboxImportPayload } from "./helpers/toolboxImport.js";
async function setup(page) {
await page.goto("/#/toolboxes");
await page.getByText("Importer une toolbox", { exact: true }).locator('input[type="file"]').setInputFiles({
name: "tasks.json", mimeType: "application/json",
buffer: Buffer.from(JSON.stringify({
toolbox: { id: "tasks", name: "Task workflows", modules: [{ id: "planner", type: "taskPlanner", title: "Tasks" }] },
modules: { planner: { resetTime: "00:00", weeklyResetDay: 1, tasks: [
buffer: Buffer.from(JSON.stringify(createToolboxImportPayload({
id: "tasks",
name: "Task workflows",
modules: [{ id: "planner", type: "taskPlanner", title: "Tasks" }],
moduleData: { planner: { resetTime: "00:00", weeklyResetDay: 1, tasks: [
{ id: "parent", title: "Parent", type: "unique", category: "Raid" },
{ id: "child", title: "Child", type: "daily" },
{ id: "weekly", title: "Weekly", type: "weekly" },
] } },
})),
}))),
});
await page.getByRole("link", { name: "Ouvrir Task workflows", exact: true }).first().click();
const tool = page.locator('[data-module-type="taskPlanner"]');