Add Playwright E2E tests for critical game functionality#183
Add Playwright E2E tests for critical game functionality#183
Conversation
Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com>
|
|
@copilot create a suite for the rules in a mock online match, create a suite for the board UI, and a suite for the dialogues. I want the tests added to the workflow |
Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com>
Done in commit Three new suites (35 new tests, 51 total):
How the mock online match works: CI ( 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:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot looks like the end-to-end tests have errors so why are they passing |
…race condition Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com>
The root cause: Playwright exits with code 0 when flaky tests pass on retry, so CI showed green. The 3 failing tests all had the same race condition — Firebase's Fixed in
Result: 51/51 pass with zero retries across two consecutive runs. 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:
If you need me to access, download, or install something from one of these locations, you can either:
|

e2e/game.spec.ts)window.__e2e__test-helper tosrc/index.tsx(DEV-only)'__test__'game-ID sentinel in match observere2e/helpers.ts— shared utilitiese2e/board.spec.ts— Board UI suite (17 tests)e2e/rules.spec.ts— Game rules in mock online match suite (9 tests)e2e/dialogues.spec.ts— Dialogues suite (9 tests).github/workflows/test.ymlonAuthStateChangedfires asynchronously after board renders, callingload()→setSelected(null), which wipes test-made selectionswindow.__e2e__.authReadyflag set via double-rAF after auth observer fires (guarantees React committed all batched state resets before tests proceed)e2e/helpers.tsload()now waits forauthReady === truee2e/game.spec.tsmigrated to sharedload()helper (was using localwaitForBoard)beforeEachcallbacks updated to explicitasync/awaitformOriginal prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.