Skip to content

test(settings-seed): SettingsSeedCubit + state (+5 tests)#365

Merged
TaprootFreak merged 2 commits into
developfrom
test/settings-seed-cubit
May 15, 2026
Merged

test(settings-seed): SettingsSeedCubit + state (+5 tests)#365
TaprootFreak merged 2 commits into
developfrom
test/settings-seed-cubit

Conversation

@TaprootFreak
Copy link
Copy Markdown
Contributor

Summary

Stage 41 of the coverage push. Cubit-level coverage of the 'show recovery seed' toggle screen.

Cases

Target Cases
initial state 1 — seed mirrors `wallet.seed`; `showSeed=false`
`toggleShowSeed` 2 — single flip to true; double flip back to false
`SettingsSeedState` 2 — `copyWith` preserves untouched fields; Equatable props cover `seed` + `showSeed`

What's pinned

  • The toggle does not mutate the underlying seed — every emitted state still carries the canonical BIP39 test mnemonic.
  • `copyWith` is non-destructive: passing only `showSeed` keeps `seed` intact.
  • Equatable props enumerate both fields — pinned via the negative case (different `showSeed` breaks equality).

Test plan

  • `flutter test test/screens/settings_seed/settings_seed_cubit_test.dart` — 5 pass
  • `flutter analyze` clean on the new file
  • CI green

Stage 41 of the coverage push. Cubit-level coverage of the
'show recovery seed' toggle screen.

- initial state (1): seed mirrors wallet.seed; showSeed=false
- toggleShowSeed (2): single flip to true; double flip back to false
- SettingsSeedState (2): copyWith preserves untouched fields;
  Equatable props cover seed + showSeed
@TaprootFreak TaprootFreak marked this pull request as ready for review May 15, 2026 19:07
@TaprootFreak TaprootFreak merged commit af0b6b4 into develop May 15, 2026
1 check passed
@TaprootFreak TaprootFreak deleted the test/settings-seed-cubit branch May 15, 2026 19:07
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