Skip to content

fix(tests): repair unit tests broken by the new-ui v2 merge - #1212

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/base-unit-test-compile
Aug 10, 2026
Merged

fix(tests): repair unit tests broken by the new-ui v2 merge#1212
bmc08gt merged 1 commit into
code/cashfrom
fix/base-unit-test-compile

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Problem

./gradlew test (the CI Run Flipcash Tests job) is red on code/cash — the v2 tab-bar UI merge (#1209) changed three production signatures/behaviors but left the unit tests asserting the old ones. Because the compile of those test sources fails, CI goes red for every open PR based on code/cash, not just the change that happens to be under review.

Fixes

  • BalanceViewModelTestBalanceViewModel gained chatCoordinator + feedCoordinator constructor params; the test now passes relaxed mocks for them.
  • BuildNavGraphForLaunchTestbuildNavGraphForLaunch gained an isNewUi param; the test helper passes isNewUi = false (its assertions cover v1 routing).
  • BuildNavGraphForLaunchTestAuthState.Unknown is now intentionally grouped with Authenticating and returns null (stay on the Loading screen until auth resolves), per the explanatory comment in MainRoot. The stale test asserted Unknown → OnboardingFlow; it now asserts the documented wait-on-Loading behavior, mirroring the existing Authenticating test.

Verification

./gradlew testDebugUnitTest --continue is fully green (:apps:flipcash:app and :apps:flipcash:features:balance test tasks force-reran and pass). No production code changed — tests only.

Merging this unblocks CI on the other open PRs based on code/cash.

The v2 tab-bar UI change (#1209) landed with three stale unit-test expectations
that break `./gradlew test`:

- BalanceViewModelTest: BalanceViewModel gained chatCoordinator + feedCoordinator
  constructor params; pass relaxed mocks.
- BuildNavGraphForLaunchTest: buildNavGraphForLaunch gained an isNewUi param; pass
  isNewUi = false (the existing assertions cover the v1 routing).
- BuildNavGraphForLaunchTest: AuthState.Unknown is now intentionally grouped with
  Authenticating and returns null (wait on Loading) rather than routing to
  OnboardingFlow; update the test to assert that documented behavior.
@github-actions github-actions Bot added the type: fix Bug fix label Aug 10, 2026
@bmc08gt
bmc08gt merged commit 4784dc4 into code/cash Aug 10, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the fix/base-unit-test-compile branch August 10, 2026 23:33
bmc08gt added a commit that referenced this pull request Aug 11, 2026
…ipcash-protos

* origin/code/cash:
  refactor(persistence): normalize UserProfile into a shared user_profiles table (#1210)
  fix(tests): repair unit tests broken by the new-ui v2 merge (#1212)
  feat(kmp/ed25519): in-place KMP module (JNI on Android, cinterop on iOS) + mnemonic Kotlin rewrite (#1204)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant