Skip to content

Fix flaky Playwright account and login tests in Firefox CI#221

Merged
MichaelKohler merged 3 commits intomainfrom
copilot/fix-flaky-playwright-tests
Mar 7, 2026
Merged

Fix flaky Playwright account and login tests in Firefox CI#221
MichaelKohler merged 3 commits intomainfrom
copilot/fix-flaky-playwright-tests

Conversation

Copy link
Contributor

Copilot AI commented Mar 7, 2026

  • Fix 1: Increase global test timeout from 30s to 60s in playwright.config.ts
  • Fix 2: Fix waitForURL in logout shared step — after logout the auth middleware redirects to /login?redirectTo=%2F, not /; changed from waitForURL("/") to waitForURL("**/login**")
  • Fix 3: Use retry-unique test data names in account.spec.ts to prevent data conflicts on retries
Original prompt

This section details on the original issue you should resolve

<issue_title>Flaky playwright tests</issue_title>
<issue_description>It seems that there are several flaky Playwright tests:

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…e unique retry data names

Co-authored-by: MichaelKohler <330324+MichaelKohler@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix flaky Playwright tests in the project Fix flaky Playwright account and login tests in Firefox CI Mar 7, 2026
@MichaelKohler MichaelKohler marked this pull request as ready for review March 7, 2026 08:31
@MichaelKohler
Copy link
Owner

@copilot Check the failed playwright test log. The login test still fails: " [firefox] › e2e/login.spec.ts:8:1 › allows login"

…t /)

Co-authored-by: MichaelKohler <330324+MichaelKohler@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 7, 2026

@copilot Check the failed playwright test log. The login test still fails: " [firefox] › e2e/login.spec.ts:8:1 › allows login"

Fixed in commit 3eef932. The root cause: after clicking Logout, the browser navigates to / but the auth middleware immediately redirects unauthenticated users to /login?redirectTo=%2F. My previous waitForURL("/") was waiting for a URL that's never reached — the final URL is the login page.

Changed to waitForURL("**/login**") which correctly matches the actual redirect destination.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • checkpoint.prisma.io
    • Triggering command: /opt/hostedtoolcache/node/24.14.0/x64/bin/node /opt/hostedtoolcache/node/24.14.0/x64/bin/node /home/REDACTED/work/savings-dashboard/savings-dashboard/node_modules/prisma/build/child {&#34;product&#34;:&#34;prisma&#34;,&#34;version&#34;:&#34;7.4.1&#34;,&#34;cli_install_type&#34;:&#34;local&#34;,&#34;information&#34;:&#34;&#34;,&#34;local_timestamp&#34;:&#34;2026-03-07T08:40:36Z&#34;,&#34;project_hash&#34;:&#34;06bc9486&#34;,&#34;cli_path&#34;:&#34;/home/REDACTED/work/savings-dashboard/savings-dashboard/node_modules/.bin/prisma&#34;,&#34;cli_path_hash (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@MichaelKohler MichaelKohler merged commit e2ac6ad into main Mar 7, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky playwright tests

2 participants