-
-
Notifications
You must be signed in to change notification settings - Fork 488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unittest for pinned_post.dart #2178
Conversation
Our Pull Request Approval ProcessWe have these basic policies to make the approval process smoother for our volunteer team. Testing Your CodePlease make sure your code passes all tests. Our test code coverage system will fail if either of these two conditions occur:
The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing. ReviewersWhen your PR has been assigned reviewers contact them to get your code reviewed and approved via:
Reviewing Your CodeYour reviewer(s) will have the following roles:
Other🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #2178 +/- ##
===========================================
+ Coverage 76.43% 79.90% +3.47%
===========================================
Files 152 152
Lines 7438 7460 +22
===========================================
+ Hits 5685 5961 +276
+ Misses 1753 1499 -254 ☔ View full report in Codecov by Sentry. |
@noman2002 The pinned post are manually passed so is it possible to check the error cases |
@noman2002 Sir,I have written tests for other lines if it is possible to test the error case pls tell me and I will work on it |
lib/widgets/pinned_post.dart
Outdated
: pinnedPosts[index]['imageUrl']!, | ||
errorWidget: (context, url, error) { | ||
return const CircularProgressIndicator(); | ||
}, | ||
height: SizeConfig.screenHeight! * 0.15, | ||
fit: BoxFit.cover, | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please write the test for this error widget.
Yes, Please write the test for error widget. You can mock the situation by giving incorrect image url. |
This change included the Unittest for pinned post
Issue Number: #2161
Fixed #2161
Did you add tests for your changes?
Yes
Summary
It is unittest for pinned_post.
Does this PR introduce a breaking change?
No, this does not introduce any major changes to the codebase.
Have you read the contributing guide?
Yes, i have followed the guidelines.