Skip to content

fix(functional-tests): drop the 500ms header timeout in cookiesDisabled - #21080

Merged
vbudhram merged 1 commit into
mainfrom
fxa-14384
Aug 20, 2026
Merged

fix(functional-tests): drop the 500ms header timeout in cookiesDisabled#21080
vbudhram merged 1 commit into
mainfrom
fxa-14384

Conversation

@vbudhram

@vbudhram vbudhram commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Because

This pull request

  • Removes the explicit timeout: 500 from the header assertion.
  • Awaits the page object helper instead, so its own waitFor() governs the wait. This is the form the sibling test at line 29 has always used, on the same element, and that call site has not been reported flaky.
  • Rewrites the comment above the assertion. It still credits FXA-9323, which correctly replaced waitForTimeout, and now says why the 500ms budget went away.

Issue that this pull request solves

Closes: https://mozilla-hub.atlassian.net/browse/FXA-14384

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).
  • I have manually reviewed all AI generated code.

How to review (Optional)

  • Key files/areas to focus on: packages/functional-tests/tests/misc/cookiesDisabled.spec.ts
  • Suggested review order: read the changed assertion, then compare it to line 29 of the same file.
  • Risky or complex parts: none. The diff is one assertion plus a comment.

Screenshots (Optional)

No user interface change.

Other information (Optional)

I did not run the spec locally. It needs a live stack, so CI is the check.

What I did run:

  • npx tsc -p packages/functional-tests/tsconfig.json --noEmit. It reports the three errors that already exist on main, in lib/sub-helpers.ts and lib/testAccountTracker.ts. This change adds none.
  • npx nx lint functional-tests. Exit 0, no errors.

The test box above is unticked on purpose: the test changed, but I could not run it here.

## Because

- `misc/cookiesDisabled.spec.ts` "visit verify page with localStorage disabled" fails at random on the Playwright PR job. It blocks the merge gate, then passes on a rerun. It hit #21061, #21067 and #21071 on the same day.
- The assertion gave `.card-header` a 500ms visibility budget. A loaded CI container needs longer than that to paint the element.
- The budget was also redundant. `pages/cookiesDisabled.ts` already waits with `header.waitFor()`, so the 500ms only capped a wait that was already correct.

## This pull request

- Removes the explicit `timeout: 500` from the header assertion.
- Awaits the page object helper instead, so its own `waitFor()` governs the wait. This is the form the sibling test at line 29 has always used, on the same element, and that call site has not been reported flaky.
- Rewrites the comment above the assertion. It still credits FXA-9323, which correctly replaced `waitForTimeout`, and now says why the 500ms budget went away.

## Issue that this pull request solves

Closes: https://mozilla-hub.atlassian.net/browse/FXA-14384
@vbudhram vbudhram added the auto label Aug 20, 2026
Copilot AI balanced review requested due to automatic review settings August 20, 2026 15:38
@vbudhram
vbudhram requested a review from a team as a code owner August 20, 2026 15:38
@vbudhram vbudhram added the auto label Aug 20, 2026
@vbudhram vbudhram self-assigned this Aug 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes a flaky 500ms visibility timeout from the cookies-disabled functional test.

Changes:

  • Uses the standard Playwright assertion timeout.
  • Aligns the assertion with the sibling test.
  • Updates the timeout rationale comment.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

timeout: 500,
});
// FXA-9323 replaced waitForTimeout here, but its 500ms budget was too short
// for CI. The page object already waits, so let its waitFor() govern.
@vbudhram
vbudhram merged commit 9593e0f into main Aug 20, 2026
21 checks passed
@vbudhram
vbudhram deleted the fxa-14384 branch August 20, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants