Skip to content

test(kyc): nationality + 2FA request + 2FA verify cubits (+9 tests)#371

Merged
TaprootFreak merged 1 commit into
developfrom
test/kyc-nationality-2fa-cubits
May 15, 2026
Merged

test(kyc): nationality + 2FA request + 2FA verify cubits (+9 tests)#371
TaprootFreak merged 1 commit into
developfrom
test/kyc-nationality-2fa-cubits

Conversation

@TaprootFreak

Copy link
Copy Markdown
Contributor

Summary

Stage 47 of the coverage push. Cubit-level coverage of three related KYC step cubits.

Cases

Target Cases
`KycNationalityCubit` 3 — initial state; `setData` fires with `{nationality: {id: }}` + Loading → Success; failure path
`Kyc2FaCubit` (request) 3 — initial state; Loading → Success on `request2FaCode`; Loading → Failure on throw
`Kyc2FaVerifyCubit` (verify) 3 — initial state; Loading → Success on `verify2FaCode`; Loading → Failure on throw

What's pinned

  • The nationality body shape is `{nationality: {id: }}` — pinned verbatim so a refactor doesn't quietly invert it (e.g. `{nationalityId: }`).
  • Both 2FA cubits carry the raw `e.toString()` into the failure state's `errorMessage` — the UI uses that as fallback copy, so the contract is pinned.

Test plan

  • `flutter test test/screens/kyc/steps/kyc_nationality_2fa_cubits_test.dart` — 9 pass
  • `flutter analyze` clean on the new file
  • CI green

Stage 47 of the coverage push. Cubit-level coverage of three
related KYC step cubits.

- KycNationalityCubit (3): initial state; setData fires with
  {nationality: {id: <id>}} + Loading → Success; failure path
- Kyc2FaCubit (3): initial state; Loading → Success on
  request2FaCode; Loading → Failure(errorMessage) on throw
- Kyc2FaVerifyCubit (3): initial state; Loading → Success on
  verify2FaCode; Loading → Failure(errorMessage) on throw
@TaprootFreak TaprootFreak marked this pull request as ready for review May 15, 2026 20:03
@TaprootFreak TaprootFreak merged commit 3165617 into develop May 15, 2026
1 check passed
@TaprootFreak TaprootFreak deleted the test/kyc-nationality-2fa-cubits branch May 15, 2026 20:03
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