Share toolbox components and fix image and calendar updates
Some checks failed
Deploy Sokko G / deploy (push) Failing after 2s
Some checks failed
Deploy Sokko G / deploy (push) Failing after 2s
This commit is contained in:
parent
865a4ffd97
commit
34524d2961
13 changed files with 117 additions and 93 deletions
|
|
@ -90,6 +90,32 @@ test("creates, edits and deletes a weekly calendar event", async ({ page }) => {
|
|||
await expect(calendar.getByRole("button", { name: /Raid E2E modifié/ })).toHaveCount(0);
|
||||
});
|
||||
|
||||
test("updates weekly and monthly calendar drafts when extending a selection", async ({ page }) => {
|
||||
await createToolbox(page, "Calendar selection E2E");
|
||||
await addTool(page, "Calendrier");
|
||||
const weekly = moduleByType(page, "calendar").first();
|
||||
await weekly.getByRole("button", { name: "Hebdomadaire" }).click();
|
||||
await weekly.getByRole("button", { name: /Afficher l'ajout de Calendrier/ }).click();
|
||||
const slots = weekly.locator(".calendar-day-column").first().locator(".calendar-slot");
|
||||
await slots.nth(21).dispatchEvent("pointerdown", { buttons: 1 });
|
||||
await slots.nth(18).dispatchEvent("pointerover", { buttons: 1 });
|
||||
await slots.nth(18).dispatchEvent("pointerup", { buttons: 0 });
|
||||
await expect(weekly.getByRole("textbox", { name: "Début" })).toHaveValue("09:00");
|
||||
await expect(weekly.getByRole("textbox", { name: "Fin" })).toHaveValue("11:00");
|
||||
|
||||
await addTool(page, "Calendrier");
|
||||
const monthly = moduleByType(page, "calendar").last();
|
||||
await monthly.getByRole("button", { name: "Mensuel" }).click();
|
||||
await monthly.getByRole("button", { name: /Afficher l'ajout de Calendrier/ }).click();
|
||||
const days = monthly.locator(".calendar-month-cell:not(.is-outside)");
|
||||
await days.nth(4).dispatchEvent("pointerdown", { buttons: 1 });
|
||||
await days.nth(2).dispatchEvent("pointerover", { buttons: 1 });
|
||||
await expect(monthly.locator(".calendar-month-cell.is-selected")).toHaveCount(3);
|
||||
await days.nth(2).dispatchEvent("pointerup", { buttons: 0 });
|
||||
await expect(monthly.locator(".calendar-event-form")).toBeVisible();
|
||||
await expect(monthly.locator(".calendar-month-cell.is-form-selected")).toHaveCount(3);
|
||||
});
|
||||
|
||||
test("creates a goal tree checklist with more than three visible lines", async ({ page }) => {
|
||||
await createToolbox(page, "Goal Tree E2E Toolbox");
|
||||
await addTool(page, "Arbre d'objectifs");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue