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

@ -1,6 +1,7 @@
// Rôle : valide l’accès immédiat aux toolboxes et aux réglages locaux de la collection.
/* global document, Buffer */
import { expect, test } from "@playwright/test";
import { movePointerTo, startPointerDrag } from "./helpers/pointer.js";
import { readStoredSnapshot, resetSokkoStorage } from "./helpers/storage.js";
function toolbox(id, name) {
@ -169,10 +170,8 @@ test("renders ten toolboxes without overflow and persists card reordering", asyn
const sourceHandle = cards.nth(0).getByRole("button", { name: /Déplacer Collection 1/ });
const target = cards.nth(1);
const [sourceBox, targetBox] = await Promise.all([sourceHandle.boundingBox(), target.boundingBox()]);
await page.mouse.move(sourceBox.x + sourceBox.width / 2, sourceBox.y + sourceBox.height / 2);
await page.mouse.down();
await page.mouse.move(targetBox.x + targetBox.width * 0.8, targetBox.y + targetBox.height / 2, { steps: 8 });
await startPointerDrag(page, sourceHandle);
await movePointerTo(page, target, { x: 0.8, steps: 8 });
await page.mouse.up();
await expect(cards.nth(0).getByRole("heading")).toHaveText(/Collection 2/);