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
|
|
@ -1,5 +1,6 @@
|
|||
// Rôle : vérifie le panneau large et la bascule guide/toolbox en fenêtre compacte.
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { startPointerDrag } from "./helpers/pointer.js";
|
||||
|
||||
async function openDrawer(page) {
|
||||
await page.locator(".topbar-actions").waitFor();
|
||||
|
|
@ -18,9 +19,7 @@ async function openDrawer(page) {
|
|||
|
||||
async function resizeDrawer(page, deltaX) {
|
||||
const handle = page.locator(".drawer-resize-handle");
|
||||
const bounds = await handle.boundingBox();
|
||||
await page.mouse.move(bounds.x + bounds.width / 2, bounds.y + bounds.height / 2);
|
||||
await page.mouse.down();
|
||||
const bounds = await startPointerDrag(page, handle);
|
||||
await page.mouse.move(bounds.x + bounds.width / 2 + deltaX, bounds.y + bounds.height / 2);
|
||||
await page.mouse.up();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue