Skip to content
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

Test post_service.dart #1535

Closed
palisadoes opened this issue Feb 18, 2023 · 10 comments · Fixed by #2103
Closed

Test post_service.dart #1535

palisadoes opened this issue Feb 18, 2023 · 10 comments · Fixed by #2103
Assignees
Labels
good first issue Good for newcomers test Testing application

Comments

@palisadoes
Copy link
Contributor

palisadoes commented Feb 18, 2023

The Talawa code base needs to be 100% reliable. This means we need to have 100% test code coverage.

Tests need to be written for file:

lib/services/post_service.dart
  • When complete, all methods, classes and/or functions in the file will need to be tested.
  • Our test/ folder has the same structure as the lib folder. Place your test file in the equivalent folder under test/. You may need to create the appropriate directory structure to do this.
  • Current test code coverage for this file can be found here

IMPORTANT:

Please refer to this issue on how to implement these tests correctly:

PR Acceptance Criteria

  • When complete this file must show 100% coverage when merged into the code base. This will be clearly visible when you submit your PR.
  • The PR will show a report for the code coverage for the file you have added. You can use that as a guide.
  • You can verify your own code coverage by creating an account at Codecov.io
@palisadoes palisadoes added the bug Something isn't working label Feb 18, 2023
@github-actions github-actions bot added test Testing application unapproved Unapproved, needs to be triaged labels Feb 18, 2023
@palisadoes palisadoes added points 01 good first issue Good for newcomers and removed bug Something isn't working labels Feb 18, 2023
@SiddheshKukade
Copy link
Member

@palisadoes @noman2002 Sir I would like to work on this. I can write unit tests for the functions. please assign

@palisadoes palisadoes removed the unapproved Unapproved, needs to be triaged label Feb 22, 2023
@github-actions
Copy link

github-actions bot commented Mar 6, 2023

This issue did not get any activity in the past 10 days and will be closed in 365 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

@github-actions github-actions bot added the no-issue-activity No issue activity label Mar 6, 2023
@palisadoes
Copy link
Contributor Author

@SiddheshKukade Are you still working on this? It's been over 10 days since you made an update.

@github-actions github-actions bot removed the no-issue-activity No issue activity label Mar 7, 2023
@SiddheshKukade
Copy link
Member

SiddheshKukade commented Mar 12, 2023

@SiddheshKukade Are you still working on this? It's been over 10 days since you made an update.

@palisadoes Sir, Sorry for the delayed response. I was working on the other bugs and writing documentation for them as we've now added a check for it in the past few days.
The added document task took quite a bit time to understand the linter. Which caused the delay for this Pull request.
I'm currently trying to fix new bugs discovered recently by other contributors. I think they hold a higher urgency to fix to keep the app running without any problems.
I would like to work on them for now and get unassigned from this issue.

I would be ready to solve this one (If not already solved by other contributors) after the bugs are fixed.

@SiddheshKukade SiddheshKukade removed their assignment Mar 12, 2023
@github-actions
Copy link

This issue did not get any activity in the past 10 days and will be closed in 365 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

@github-actions github-actions bot added the no-issue-activity No issue activity label Mar 23, 2023
@Nitya-Pasrija
Copy link
Contributor

@palisadoes
Can I give this one a try?

@github-actions github-actions bot removed the no-issue-activity No issue activity label Apr 15, 2023
@github-actions
Copy link

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

@github-actions github-actions bot added the no-issue-activity No issue activity label Oct 17, 2023
@github-actions github-actions bot removed the no-issue-activity No issue activity label Oct 20, 2023
@github-actions
Copy link

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

@github-actions github-actions bot added the no-issue-activity No issue activity label Oct 30, 2023
@AyushRaghuvanshi
Copy link
Contributor

Hey, I would like to pick this issue up, Can you assign me this one?

@AyushRaghuvanshi
Copy link
Contributor

Hey @noman2002 , I was going through the code for inspiration for my next issue, where i noticed when testing a service file people have just mocked the network call and then hit that call, they are not verifying whether the function is properly doing its task. Why is it so? is it not needed.
For Example: in post_services.dart getPosts() function calls network to receive all organization posts and then add it into a stream.
Now people have just called getPosts and left it as it is.
What I propose is we should then test whether those posts are succesfully added into postStream as well.
Is it not necessary? I hope I was clear with my doubt.

palisadoes pushed a commit that referenced this issue Nov 17, 2023
* Add:Tests for post_service.dart

* Fix: Format

* Fix: lint issues

* Add:Fixed Format

* Add:Hive.deleteFromDisk() wherever Hive is used

* Remove: Unused Hive Box
palisadoes pushed a commit to palisadoes/talawa that referenced this issue Jan 10, 2024
…oesFoundation#2103)

* Add:Tests for post_service.dart

* Fix: Format

* Fix: lint issues

* Add:Fixed Format

* Add:Hive.deleteFromDisk() wherever Hive is used

* Remove: Unused Hive Box
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers test Testing application
Projects
None yet
5 participants