docs(testing): document the Tier 0–4 BitBox test strategy#347
Merged
Conversation
Closes Acceptance Criterion #6 of #314: `docs/testing.md` explains when to use which tier with concrete examples from the repo, plus the cubit / widget / service+HTTP patterns and the `FakeBitboxCredentials` modes that Tier 1 already ships. - Decision tree for picking a tier based on what behaviour you need to prove - Tier 0 patterns pointing at `kyc_cubit_test.dart`, `kyc_email_page_test.dart`, `dfx_bank_account_service_test.dart` (including the `setAuthToken` pre-seed for DFXAuthService-derived services) - Tier 1 patterns pointing at `fake_bitbox_credentials.dart` and `kyc_sign_flow_test.dart`, with the FakeBitboxBehavior matrix - Tier 2 / 3 / 4 marked deferred with status pointers back to #314's phases - Mocktail gotchas (Future + thenAnswer, registerFallbackValue) - Adding-tests checklist for PRs touching KycCubit, Eip712Signer, DFXAuthService, BitboxCredentials, or bitbox_flutter Cross-links from CONTRIBUTING.md's Testing section.
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.
Closes Acceptance Criterion #6 of #314 — "Documentation: `docs/testing.md` explains when to use which tier, with examples."
Summary
A single page that captures everything we've learned across Phase 0 (#319) and Phase 1 Foundation (#320 / #321) about how to test BitBox-touching code without re-deriving the rules every PR:
CONTRIBUTING.md's Testing section gets a one-line cross-link.
Test plan