fix(tests): settings golden renders software wallet path#585
Merged
TaprootFreak merged 4 commits intoMay 26, 2026
Merged
Conversation
3 tasks
The settings page conditionally renders the "Wallet-Sicherung" (backup) tile only when an open SoftwareWallet is present (settings_page.dart:100). The golden test was using const HomeState() — openWallet null — so the tile never appeared in settings_page_default.png, leaving the handbook entry #12-settings inconsistent with the documented description. Stub the HomeBloc state with a MockSoftwareWallet so the rendered golden matches what software-wallet users actually see in Settings. PNG regeneration follows via golden-regenerate.yaml on dfx01.
Add a sentence to the #12-settings description explaining that the Wallet-Sicherung tile is software-wallet-only: BitBox users don't see it because the backup lives on the hardware device itself (settings_page.dart:100 — gated by walletType == WalletType.software). Pairs with the test-fixture fix in the same PR so the regenerated PNG and the prose agree.
d9b4a96 to
3833e58
Compare
Per docs/visual-regression-tests.md "Regenerating baselines" gotcha: GITHUB_TOKEN-driven pushes don't trigger `pull_request: synchronize`, so the bot's baseline commit 44b64cb has zero status checks reported. Empty user-signed commit re-arms the checks.
TaprootFreak
added a commit
that referenced
this pull request
May 26, 2026
Re-opens [#584](#584) (closed because its base \`chore/post-541-followups\` was deleted after the collection-merge [#571](#571)). Cherry-picked Jana's original commit (\`517170a\`) onto the new collection branch \`chore/post-580-followups\`. ## Summary The "Support kontaktieren" tile under Settings → Kontakt must always be visible — including pre-signin onboarding flows where the user has not yet registered an email. Render it unconditionally and drop the surrounding cubit/state machinery that only existed to gate this single tile. ## Pair PR Pairs with [DFXswiss/api#3761](DFXswiss/api#3761) (drops \`UserCapabilitiesDto.supportAvailable\`). **Merge order is unconstrained — both PRs are independent-safe:** | Order | Backend sends | App reads | Crash? | |---|---|---|---| | App-PR alone merged | \`supportAvailable: true/false\` still in JSON | Field no longer read in \`fromJson\` — Dart \`Map<String,dynamic>\` silently ignores unknown keys | No | | API-PR alone merged | Field gone from JSON | Old app code reads \`json['supportAvailable'] as bool? ?? false\` → \`false\` → tile stays hidden (existing bug persists) | No | | Both merged | Backend stops sending, app stops reading | — | No | The DTO uses \`as bool? ?? false\` (nullable cast with default fallback) for every capability flag, so neither side is brittle to the other's deploy timing. Earlier "Merge order: API first" claim was inaccurate. ## Review history Audited via subagent during the #584 cycle (clean, no MAJORs). Main-repo mirror was needed for Visual Regression on the dfx01 self-hosted runner (same Fork-PR pattern as [#585](#585)). Credit: code-diff by Jana Rüttimann (\`Blume1977\`). --------- Co-authored-by: Blume1977 <jana.ruettimann@dfx.swiss> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Re-opens #582 from the main repo so the self-hosted dfx01 runner can execute. Original PR was from a fork (
Blume1977/realunit-app), whereworkflow_dispatchcannot reach the runner.Summary
settings_page.dart:100only renders the Wallet-Sicherung tile whenopenWallet?.walletType == WalletType.software.settings_golden_test.dart) usedconst HomeState()—openWalletdefaulted tonull, so the tile never appeared insettings_page_default.png.#12-settingslists Wallet-Sicherung in its description but the PNG never showed it — visible mismatch.MockSoftwareWalletso the golden matches the actual production state of users navigating to Settings.Why
The handbook documents the software-wallet user journey end-to-end (BitBox is only a branch on screen #2). Any conditionally-rendered tile gated by
walletType == WalletType.softwaremust appear in the handbook PNG.Verified
settings_page_default.png(5806d9e) showing the Wallet-Sicherung tile.d9b4a96) per the bot-push gotcha documented indocs/visual-regression-tests.md.Commits
Blume1977)Blume1977)github-actions[bot]Out of scope