Improve test coverage with unit and integration tests - #185
Merged
Conversation
Improvements: - Enhanced CategoryColorHelper tests for all beverage types and themes - Added UrlLauncherHelper tests for URL launching behavior - Added router tests for navigation paths and URL encoding - Fixed router tests to use proper types (DrinkSort enum) Test count: 405 tests passing Coverage improved across utility helpers and router configuration Testing approach: - Tests focus on behavior, not implementation details - Proper mocking of platform interfaces (URL launcher) - URI encoding/decoding edge cases covered - Both light and dark theme variants tested
Now that test coverage has been significantly improved (72%+), we can enforce a higher coverage threshold in CI to prevent regressions. Changes: - minimum-coverage: 25 → 70 - Updated comment to reflect current coverage level - TODO completed: threshold restored to original target
richardthe3rd
force-pushed
the
claude/improve-test-coverage-YfcKy
branch
from
December 23, 2025 16:51
fc648bc to
73627d9
Compare
Contributor
LCOV of commit
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
🚀 Cloudflare Pages PreviewYour preview deployment is ready! Preview URL: https://claude-improve-test-coverage.staging-cambeerfestival.pages.dev This preview will be automatically updated when you push new commits to this PR. |
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.
This pull request introduces comprehensive new widget and unit tests to improve the reliability and coverage of the codebase, particularly around routing, URL launching, and category color helpers. Additionally, the minimum code coverage threshold in the CI workflow has been significantly increased to ensure higher code quality.
Testing improvements:
appRouterconfiguration, verifying navigation, route parsing, and path matching for all main routes and dynamic parameters intest/router_test.dart.UrlLauncherHelperutility, including successful launches, error handling, custom error messages, and exception scenarios, with a mock implementation of theUrlLauncherPlatformintest/url_launcher_helper_test.dart.CategoryColorHelper.getCategoryColorto cover all supported categories and both light and dark themes, ensuring correct color assignment intest/utils_test.dart.CI/CD and code quality:
.github/workflows/build-deploy.ymlfrom 25% to 70%, reflecting improved test coverage and enforcing higher standards for future changes.