Skip to content

e2e: anvil-dataset "displays download file manifest" times out on firefox #4840

@frano-m

Description

@frano-m

Summary

The e2e test e2e/anvil/anvil-dataset.spec.ts:101 — Dataset > displays download file manifest times out on Firefox CI at page.waitForURL(...) (line 113). 180s test timeout exceeded; Chromium/WebKit pass.

Recent context

The page.waitForURL(...) wait was added by #4828 (80deb3ab, 2026-05-14) to fix an earlier flake where the destination-page locator polled an unmounted page. The fix works on Chromium/WebKit but appears to time out on Firefox.

Likely cause

Click → URL race. Current code:

await clickCard(page, TITLE_TEXT_REQUEST_FILE_MANIFEST);
await page.waitForURL((url) => url.pathname.endsWith(ROUTES.MANIFEST_DOWNLOAD));

clickCard awaits the click before the URL listener attaches. On Firefox the SPA navigation may already have completed by the time the listener registers → waitForURL never sees the transition.

Proposed fix

Attach the listener first via Promise.all:

await Promise.all([
  page.waitForURL((url) => url.pathname.endsWith(ROUTES.MANIFEST_DOWNLOAD)),
  clickCard(page, TITLE_TEXT_REQUEST_FILE_MANIFEST),
]);

If the lifecycle is the issue (e.g. Firefox treating load differently), passing { waitUntil: "domcontentloaded" } to waitForURL is a fallback.

Acceptance criteria

  • Test passes consistently on Firefox CI.
  • No regression on Chromium/WebKit.

Related

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions