-
-
Notifications
You must be signed in to change notification settings - Fork 508
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 pinnedpost #2204
Unittest for pinnedpost #2204
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 #2204 +/- ##
===========================================
+ Coverage 76.43% 80.20% +3.77%
===========================================
Files 152 149 -3
Lines 7438 6971 -467
===========================================
- Hits 5685 5591 -94
+ Misses 1753 1380 -373 ☔ View full report in Codecov by Sentry. |
@noman2002 Sir i have made this widget to use pinnedPost instead of manually passed pinnedPosts. But then other files are having a bit problem its not possible to test error cases with that manually passed data. In this pinned_post is having 100% coverage but other files. Sir, what should I do |
@noman2002 I have checked that progress indicator dont know why that is not covered |
@noman2002 if anything I need to correct please tell me I will try my best |
@noman2002 Sir from my observation I think that pinnedPost in constructor should be used.I can test other two files if you give me permission as they are two separate issues mentioned in issue section |
@noman2002 @Ayush0Chaudhary is this fine |
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.
Why did you change the app files?
Give reasons or undo your changes/
@@ -226,8 +226,7 @@ Route<dynamic> generateRoute(RouteSettings settings) { | |||
); | |||
case Routes.pinnedPostScreen: | |||
// final Map<String, dynamic> post = settings.arguments! as Map<String, dynamic> ; | |||
final Map<String, String> post = | |||
settings.arguments! as Map<String, String>; | |||
final Post post = settings.arguments! as Post; |
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.
why add this?
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.
Sir, In the pinnedpost widget if you see the constructor you can see a variable pinnedPost which is a list of post but it was used nowhere instead a manually made list of map string was used so I made that widget to use pinnedPost. But the pinnedpostscreen widget was requiring a map string so I made a change there a made it to use post
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.
@Ayush0Chaudhary Please have a look.
@nidhin29 Please fix the conflicting files. |
@nidhin29 Resolve the merge conflicts, it cannot be merged without resolving merge conflicts. |
@noman2002 Ok sir |
![]() |
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.