test: Add unit & widget test coverage for onboarding, ai_inference, and stats features - #19
Conversation
… adding loading screen and storing embeddings
|
Important Review skippedToo many files! This PR contains 166 files, which is 66 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (103)
📒 Files selected for processing (166)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Addressed Issues:
Fixes #(issue number) - N/A
Screenshots/Recordings:
N/A — This is a test-only PR. No UI changes were made. All tests can be verified by running:
flutter testAdditional Notes:
This PR introduces deep unit and widget test coverage across three major features of the MoveYourBody app —
onboarding,ai_inference, andstats. All tests are written to be independent (no test depends on another), isolated (mocked dependencies viamocktail), and non-smoke (every test verifies actual business logic, not just "does it render").Key Testing Patterns Used
sqflite_common_ffifor real in-memory SQLite database testing (repositories)mocktailfor mocking repositories, services, andGoRouternavigationProviderScopeoverrides for isolating Riverpod-managed dependencies in widget testscontainer.listen()pattern for testing@riverpodauto-dispose notifiers safelyAsyncValuestate observation for testingFutureProvidererror states without race conditionsNote
TokenizerServiceis tested against real assets (vocab.txt).@riverpodauto-dispose providers required special handling in tests —container.listen()is used instead ofcontainer.read()to prevent premature disposal during async operations (Future.microtaskchains).Checklist
We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact.