Stabilize Playwright pointer interactions after lazy loading
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 18m11s
Validate and deploy Sokko G / deploy (push) Successful in 10s

This commit is contained in:
Shinuwa 2026-10-30 14:14:23 +01:00
parent 9242becb1d
commit 4cb6487f85
12 changed files with 59 additions and 38 deletions

View file

@ -2,6 +2,7 @@
/* global document, window */
import { expect, test } from "@playwright/test";
import { Buffer } from "node:buffer";
import { movePointerTo, startPointerDrag } from "./helpers/pointer.js";
import { createToolboxImportPayload } from "./helpers/toolboxImport.js";
import { readStoredModuleData } from "./helpers/storage.js";
@ -246,10 +247,8 @@ test("reordering a parent moves its subtree and rejects detaching a child", asyn
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 startPointerDrag(page, tool.getByRole("button", { name: `Déplacer ${source}`, exact: true }));
await movePointerTo(page, tool.getByRole("button", { name: `Déplacer ${target}`, exact: true }), { y: 0.2 });
await page.mouse.up();
}
const titles = () => tool.locator(".task-planner-title-input").evaluateAll((inputs) => inputs.map((input) => input.value));