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:
parent
5d61553e02
commit
9cd08f0ebb
1 changed files with 3 additions and 1 deletions
|
|
@ -506,8 +506,10 @@ test.describe("Planner", () => {
|
||||||
|
|
||||||
// Export GPX plan (which includes waypoints) and verify <desc> appears inside a <wpt>
|
// Export GPX plan (which includes waypoints) and verify <desc> appears inside a <wpt>
|
||||||
await page.getByRole("button", { name: "Export GPX" }).click();
|
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");
|
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 download = await downloadPromise;
|
||||||
const gpxStream = await download.createReadStream();
|
const gpxStream = await download.createReadStream();
|
||||||
const chunks: Buffer[] = [];
|
const chunks: Buffer[] = [];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue