From 9cd08f0ebbad051e503f3ac1219110cea19c750b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ullrich=20Sch=C3=A4fer?= Date: Mon, 18 May 2026 00:20:48 +0200 Subject: [PATCH] Fix E2E: wait for Export dropdown before clicking Export Plan The dropdown renders asynchronously after clicking Export GPX; wait for 'Export Plan' text to be visible before clicking it. Co-Authored-By: Claude Sonnet 4.6 --- e2e/planner.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/e2e/planner.test.ts b/e2e/planner.test.ts index 7c47452..7241260 100644 --- a/e2e/planner.test.ts +++ b/e2e/planner.test.ts @@ -506,8 +506,10 @@ test.describe("Planner", () => { // Export GPX plan (which includes waypoints) and verify appears inside a await page.getByRole("button", { name: "Export GPX" }).click(); + // Wait for the dropdown to open, then click Export Plan + await expect(page.getByText("Export Plan")).toBeVisible({ timeout: 3000 }); const downloadPromise = page.waitForEvent("download"); - await page.getByRole("button", { name: /Export Plan/i }).click(); + await page.getByText("Export Plan").first().click(); const download = await downloadPromise; const gpxStream = await download.createReadStream(); const chunks: Buffer[] = [];