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 <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-05-18 00:20:48 +02:00
parent 5d61553e02
commit 9cd08f0ebb
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9

View file

@ -506,8 +506,10 @@ test.describe("Planner", () => {
// Export GPX plan (which includes waypoints) and verify <desc> appears inside a <wpt>
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[] = [];