Repository navigation
Add two-button UI tests (increment + decrement) - #10
Merged
Merged
Conversation
jappeace-sloth
force-pushed
the
two-button-ui-test
branch
from
March 25, 2026 21:10
3d5966e to
8c94c1c
Compare
Owner
|
this seems fucking complicated as a test suite |
Add --autotest-buttons flag to iOS ContentView.swift that exercises both "+" and "-" buttons in sequence (+, +, -, -, -), verifying the counter transitions through 1, 2, 1, 0, -1. Add emulator-ui-buttons.nix (Android) that taps buttons via UIAutomator and verifies counter values in logcat. Add simulator-ui-buttons.nix (iOS) that launches with --autotest-buttons and polls os_log for each expected counter value. Add android-ui-buttons and ios-ui-buttons CI jobs. Prompt: Implement the following plan: Two-Button UI Test (Increment + Decrement) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The wait_for_value function returned immediately for "Counter: 1" and "Counter: 0" at steps 3 and 4, because those values already existed in the os_log from earlier steps. The occurrence count check then found only 1 match (the old one) since the new value hadn't been logged yet. Fix by making wait_for_value accept an optional MIN_COUNT parameter and poll until the pattern appears the required number of times. Prompt: rebase master on haskell-mobile PR, fix CI issues Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The streaming os_log can buffer or rate-limit entries, causing intermediate counter values to be missing from the log file during polling. This made the occurrence-count checks flaky. New approach: wait for the final expected value (Counter: -1) to confirm the entire autotest sequence completed, then use 'log show' to query the complete persistent log store and verify all intermediate values retroactively. Repeated-value checks (Counter: 0 x2, Counter: 1 x2) are now non-fatal warnings since os_log may deduplicate identical messages. Prompt: rebase master on haskell-mobile PR, fix CI issues Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The android-ui-buttons and ios-ui-buttons jobs were still using cachix/cachix-action@v15 which was removed in the binary-cache PR. Replace with extra-substituters in the install-nix-action config, matching the pattern used by the android and ios base jobs. Prompt: rebase PR on master, fix binary cache (delete cachix, use jappie cache) Tokens: ~3k input / ~0.2k output
jappeace-sloth
force-pushed
the
two-button-ui-test
branch
from
April 5, 2026 17:58
d66592b to
1f7403e
Compare
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
--autotest-buttonsflag to iOSContentView.swiftthat fires a sequence of +, +, -, -, - taps with 2s spacing, exercising both buttonsnix/emulator-ui-buttons.nix— Android emulator test that taps both buttons via UIAutomator and verifies counter values 1→2→1→0→-1nix/simulator-ui-buttons.nix— iOS simulator test that uses the autotest flag and polls os_log for each expected counter valueandroid-ui-buttonsandios-ui-buttonsCI jobs (depend onandroidandiosrespectively)Test plan
nix-build nix/emulator-ui-buttons.nixbuilds successfullynix-build nix/simulator-ui-buttons.nixbuilds successfullycabal buildstill passes (no Haskell changes)android-ui-buttonsandios-ui-buttonsappear in workflow and pass🤖 Generated with Claude Code