Add planner-aware memos and unified tool configuration panels
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s
This commit is contained in:
parent
acd9b2fe11
commit
808610dcf2
53 changed files with 842 additions and 329 deletions
|
|
@ -52,7 +52,18 @@ test("creates at most five spaces and moves tools with the accessible selector",
|
|||
await expect(page.getByRole("tab", { name: "Divers" })).toHaveAttribute("aria-selected", "true");
|
||||
|
||||
await page.getByRole("tab", { name: "Défaut" }).click();
|
||||
await page.getByRole("combobox", { name: "Déplacer vers… — Alpha" }).selectOption({ label: "Divers" });
|
||||
const alpha = page.locator("[data-module-id='a']");
|
||||
await alpha.getByRole("button", { name: "Configuration", exact: true }).click();
|
||||
const organization = alpha.locator(".module-configuration-organization");
|
||||
const data = alpha.locator(".module-configuration-data");
|
||||
await expect(organization).toBeVisible();
|
||||
await expect(data).toBeVisible();
|
||||
const organizationBox = await organization.boundingBox();
|
||||
const dataBox = await data.boundingBox();
|
||||
expect(dataBox.y).toBeCloseTo(organizationBox.y, 0);
|
||||
expect(dataBox.x).toBeGreaterThan(organizationBox.x + organizationBox.width);
|
||||
expect(dataBox.width).toBeCloseTo(organizationBox.width, 0);
|
||||
await alpha.getByRole("combobox", { name: "Déplacer vers un autre espace", exact: true }).selectOption({ label: "Divers" });
|
||||
await expect(page.locator("[data-module-id='a']")).toHaveCount(0);
|
||||
await page.getByRole("tab", { name: "Divers" }).click();
|
||||
await expect(page.locator("[data-module-id='a']")).toBeVisible();
|
||||
|
|
@ -66,6 +77,52 @@ test("creates at most five spaces and moves tools with the accessible selector",
|
|||
await expect(page.getByRole("tab", { name: "Défaut" })).toHaveAttribute("aria-selected", "true");
|
||||
});
|
||||
|
||||
test("keeps the compact header order and isolates configuration from add and collapsed content", async ({ page }) => {
|
||||
await page.setViewportSize({ width: 390, height: 900 });
|
||||
await seedToolbox(page, {
|
||||
id: "module-configuration",
|
||||
name: "Module configuration",
|
||||
modules: [{ id: "a", type: "counters", title: "Alpha" }],
|
||||
moduleOrder: { one: ["a"], two: [["a"], []] }
|
||||
});
|
||||
|
||||
const tool = page.locator("[data-module-id='a']");
|
||||
await expect(tool.locator(".module-header-actions > button")).toHaveCount(5);
|
||||
expect(await tool.locator(".module-header-actions > button").evaluateAll((buttons) => buttons.map((button) => button.className.split(" ")[0]))).toEqual([
|
||||
"module-scroll-button",
|
||||
"module-edit-button",
|
||||
"module-configuration-button",
|
||||
"module-delete-button",
|
||||
"module-collapse-button"
|
||||
]);
|
||||
|
||||
const add = tool.getByRole("button", { name: "Afficher l'ajout de Alpha", exact: true });
|
||||
const configuration = tool.getByRole("button", { name: "Configuration", exact: true });
|
||||
await add.click();
|
||||
await expect(tool.locator(".module-add-panel")).toBeVisible();
|
||||
await configuration.click();
|
||||
await expect(add).toHaveAttribute("aria-pressed", "false");
|
||||
await expect(tool.locator(".module-add-panel")).toHaveCount(0);
|
||||
const panel = tool.getByRole("region", { name: "Configuration de Alpha", exact: true });
|
||||
await expect(panel).toBeVisible();
|
||||
await expect(panel.getByRole("button", { name: "Importer du texte", exact: true })).toBeVisible();
|
||||
const toolBox = await tool.boundingBox();
|
||||
const panelBox = await panel.boundingBox();
|
||||
expect(panelBox.width).toBeGreaterThan(toolBox.width - 24);
|
||||
expect(panelBox.width).toBeLessThan(toolBox.width);
|
||||
|
||||
await tool.getByRole("button", { name: "Masquer Alpha", exact: true }).click();
|
||||
await expect(panel).toHaveCount(0);
|
||||
await expect(tool.locator(".module-content")).toHaveCount(0);
|
||||
await configuration.click();
|
||||
await expect(panel).toBeVisible();
|
||||
await expect(tool.locator(".module-content")).toBeHidden();
|
||||
await expect(panel.getByRole("button", { name: "Importer du texte", exact: true })).toBeVisible();
|
||||
await configuration.press("Escape");
|
||||
await expect(panel).toHaveCount(0);
|
||||
await expect(configuration).toHaveAttribute("aria-expanded", "false");
|
||||
});
|
||||
|
||||
test("shows the tab insertion indicator on the correct side while reordering", async ({ page }) => {
|
||||
await seedToolbox(page, {
|
||||
id: "reorder-spaces",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue