diff --git a/frontend/e2e/playlists.spec.ts b/frontend/e2e/playlists.spec.ts index 08cc28c9..d63ed3dc 100644 --- a/frontend/e2e/playlists.spec.ts +++ b/frontend/e2e/playlists.spec.ts @@ -66,11 +66,13 @@ async function carry(page: Page, grip: Locator, to: { x: number; y: number }) { /** The same onto the rail. An unpinned one is a tab until the drag's own hover peeks it open. */ async function carryToRail(page: Page, grip: Locator, target: Locator) { + const tab = page.getByRole("button", { name: "Pin Playlists open" }); + // The rail's lists answer after the rows: until then a pinned rail shows neither the list nor a tab. + await target.or(tab).first().waitFor(); if (await target.isVisible()) { await carry(page, grip, await centre(target)); return; } - const tab = page.getByRole("button", { name: "Pin Playlists open" }); await carry(page, grip, await centre(tab)); await expect(target).toBeVisible(); await page.mouse.move(...(Object.values(await centre(target)) as [number, number]), { steps: 6 });