Skip to content

Add waydowntown full stack tests#68

Merged
backspace merged 31 commits intomainfrom
full-stack-tests
Feb 24, 2026
Merged

Add waydowntown full stack tests#68
backspace merged 31 commits intomainfrom
full-stack-tests

Conversation

@backspace
Copy link
Owner

I don’t love it but I think some are needed.

@github-actions
Copy link

github-actions bot commented Feb 5, 2026

Registrations test results

147 tests  ±0   147 ✅ ±0   3m 41s ⏱️ -7s
 27 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit cf57c3d. ± Comparison against base commit 0103ce4.

♻️ This comment has been updated with latest results.

backspace and others added 14 commits February 4, 2026 22:30
- Extend TestController to create test game data via 'game' parameter
- Add TestGameData and TestSetupData classes to test client
- Create fill_in_the_blank_test.dart testing full game flow:
  - Create and start run
  - Submit wrong answer (verify not complete)
  - Submit correct answer (verify win)
  - Test case-insensitive matching

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- task_description is on run (after start), not specification
- Add proper status code checks to second test for better debugging

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
fill_in_the_blank concept requires answer_id in submissions.
Extract answer ID from run creation response and include it
in all submission requests.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Specification has has_many relationship with Answer, not embeds_many.
Must insert Answer separately with specification_id.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add string_collector game creation to TestController
- Make TestGameData flexible for different game types
- Add string_collector_test.dart testing multi-item collection
- Add test result publishing step to CI workflow

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Feb 8, 2026

Full-stack integration test results

3 tests   3 ✅  3m 37s ⏱️
3 suites  0 💤
1 files    0 ❌

Results for commit cf57c3d.

♻️ This comment has been updated with latest results.

backspace and others added 12 commits February 8, 2026 09:40
Tests the ordered sequence game type:
- Complete sequence in correct order to win
- Wrong order submission rejected with 422
- Wrong answer resets progress back to order 1

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
orientation_memory is a "placeless" concept, so filtering by concept
creates a new specification with random answers. We must use the
specification.id filter to use our test specification with known answers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Simpler and more standard than individual delete_all calls.
CASCADE handles foreign key dependencies automatically.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
I’m sure they’ll be broken, but.
The Gradle APK build takes ~11.5 minutes on CI, which consumes most of
the default 12-minute test timeout. The first test file loaded
alphabetically would always time out during the build phase.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wait for game button to appear before tapping, pumpAndSettle after
ensureVisible to let scroll complete, and increase ready timeout to 30s.
The first test on a fresh Android emulator can be slower.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
pumpAndSettle waits for all animations to stop, which can hang
indefinitely on the home screen (SVG logo, etc). A fixed 500ms pump
gives enough time for scroll to complete without the hang risk.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…le origin check, control test order

- Increase ready button wait timeout from 30s to 120s for game tests
  (WebSocket connection is slow on CI emulator without hardware acceleration)
- Add check_origin: false to Phoenix test config (matches dev config)
- Run tests in explicit order: token_refresh first to warm up emulator

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add 15s timeout to WebSocket connect and channel join in RunLaunchRoute
- Add retry logic (3 attempts with exponential backoff) for connection failures
- Add failOn parameter to waitFor helper for fast failure on error detection
- Swap test order: run string_collector before fill_in_the_blank to test position dependency

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…endencies

_loadGameInfo(context) was called directly in build(), creating a new Future
on every rebuild. FutureBuilder restarts when it sees a new Future instance,
causing the inner FutureBuilder to never settle to "done" state on slow
emulators where pump() triggers frequent rebuilds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
backspace and others added 3 commits February 16, 2026 22:10
Print connection lifecycle, FutureBuilder state, and visible text widgets
to understand what's on screen when the test times out. Also broaden
failOn to catch any "Error" text, not just "Error connecting".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The "I'm ready" button was below the ListView viewport on the Nexus 6
CI emulator because string_collector renders extra cards (Starting point,
Goal) that push it off-screen. ListView uses lazy rendering so the
button widget didn't exist in the tree at all.

Fix: wait for the AppBar title (confirming the launch screen loaded),
then use scrollUntilVisible to scroll until the button appears. Also
increase game navigation timeout to 30s for both tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CI confirmed the scroll fix works — all 3 tests pass. Remove verbose
print statements from RunLaunchRoute and RequestRunRoute. Keep the
widget text dump on waitFor timeout as it's useful for future debugging.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@backspace backspace merged commit 991bdae into main Feb 24, 2026
6 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.

1 participant