Complete risk-based toolbox regression coverage
All checks were successful
Deploy Sokko G / deploy (push) Successful in 20s
All checks were successful
Deploy Sokko G / deploy (push) Successful in 20s
This commit is contained in:
parent
a01f605d55
commit
f0797ccf14
5 changed files with 166 additions and 10 deletions
|
|
@ -106,3 +106,28 @@ test("recurring resets preserve unique completions and cleanup deletes only comp
|
|||
await expect(tool.getByRole("checkbox", { name: "Marquer effectué Child", exact: true })).toBeVisible();
|
||||
await expect(tool.getByRole("checkbox", { name: "Marquer effectué Weekly", exact: true })).toBeVisible();
|
||||
});
|
||||
|
||||
test("reordering a parent moves its subtree and rejects detaching a child", async ({ page }) => {
|
||||
const tool = await setup(page);
|
||||
await tool.getByRole("button", { name: "Réglages de la tâche Child", exact: true }).click();
|
||||
await tool.getByRole("combobox", { name: "Définir un parent", exact: true }).selectOption({ label: "Parent" });
|
||||
await tool.getByRole("button", { name: "Réglages de la tâche Child", exact: true }).click();
|
||||
async function drag(source, target) {
|
||||
await tool.getByRole("button", { name: `Déplacer ${source}`, exact: true }).hover();
|
||||
await page.mouse.down();
|
||||
const box = await tool.getByRole("button", { name: `Déplacer ${target}`, exact: true }).boundingBox();
|
||||
await page.mouse.move(box.x + box.width / 2, box.y + box.height * 0.2, { steps: 5 });
|
||||
await page.mouse.up();
|
||||
}
|
||||
const titles = () => tool.locator(".task-planner-title-input").evaluateAll((inputs) => inputs.map((input) => input.value));
|
||||
await drag("Weekly", "Parent");
|
||||
await expect.poll(titles).toEqual(["Weekly", "Parent", "Child"]);
|
||||
await drag("Parent", "Weekly");
|
||||
await expect.poll(titles).toEqual(["Parent", "Child", "Weekly"]);
|
||||
await drag("Child", "Weekly");
|
||||
await expect.poll(titles).toEqual(["Parent", "Child", "Weekly"]);
|
||||
await page.reload();
|
||||
await expect.poll(titles).toEqual(["Parent", "Child", "Weekly"]);
|
||||
await tool.getByRole("button", { name: "Réglages de la tâche Child", exact: true }).click();
|
||||
await expect(tool.getByRole("button", { name: "Retirer Parent", exact: true })).toBeVisible();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue