Stabilize Playwright pointer interactions after lazy loading
This commit is contained in:
parent
9242becb1d
commit
4cb6487f85
12 changed files with 59 additions and 38 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue