Fix flaky and broken tests across E2E and unit suites#240
Merged
Conversation
- E2E cell interaction tests used a near-solved board with one empty cell, so any move completed the puzzle and triggered the victory display before the assertion could run; introduce two-empty-cell factories so filling cell (0,0) leaves isSolved() false and the board stays visible - GameTimerTests.OnTick_ShouldFireAtInterval waited only 5x the interval, giving insufficient headroom under CI scheduling jitter; double the wait to 10x so the tick count reliably reaches the >=3 threshold Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://gray-bush-02024e71e-240.westus2.7.azurestaticapps.net |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
E2E cell interaction tests (
game.spec.ts): TheinitialGame/gameAfterMovefixtures usedmakeTestGame()— a near-solved board with only one empty cell. Placing any value on that cell produced a fully solved board, which causedisSolved()to returntrueand replaced the game board with the victory overlay before the assertion could run. AddedmakeTestGameForInteraction()(two empty cells) andmakeTestGameAfterInteractionMove()(one filled, one still empty) so the board stays visible after the move.GameTimerTests.OnTick_ShouldFireAtInterval(GameTimerTests.cs): The test waited only_interval × 5(50 ms at a 10 ms interval) before asserting ≥ 3 ticks. Under CI scheduling jitter this gave only 2 ticks. Doubled the wait to_interval × 10for reliable headroom.Test plan
dotnet test— 710/710 passing (was 709/710)npm run testinSudoku.React— 139/139 passingnpx playwright test --project=reactinTests/E2E— 26/26 passing (was 24/26)🤖 Generated with Claude Code