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 for router.dart #2138

Merged
merged 6 commits into from
Nov 26, 2023
Merged

Test for router.dart #2138

merged 6 commits into from
Nov 26, 2023

Conversation

Azad99-9
Copy link
Contributor

What kind of change does this PR introduce?

This PR adds unit tests to the router.dart file

#1473

Fixes #1473

Did you add tests for your changes?

Yes

Snapshots/Videos:

If relevant, did you update the documentation?

No

Summary

The motive is to make the router.dart file 100% code covered.

Does this PR introduce a breaking change?

No

Other information

Created a new file: test/router_test.dart

Have you read the contributing guide?

Yes

Copy link

Our Pull Request Approval Process

We have these basic policies to make the approval process smoother for our volunteer team.

Testing Your Code

Please make sure your code passes all tests. Our test code coverage system will fail if either of these two conditions occur:

  1. The overall code coverage drops below the target threshold of the repository
  2. Any file in the pull request has code coverage levels below the repository threshold

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.

Reviewers

When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

  1. comments in this PR or
  2. our slack channel

Reviewing Your Code

Your reviewer(s) will have the following roles:

  1. arbitrators of future discussions with other contributors about the validity of your changes
  2. point of contact for evaluating the validity of your work
  3. person who verifies matching issues by others that should be closed.
  4. person who gives general guidance in fixing your tests

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.

Copy link

codecov bot commented Nov 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9dc3483) 78.99% compared to head (29bceaa) 79.88%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2138      +/-   ##
===========================================
+ Coverage    78.99%   79.88%   +0.88%     
===========================================
  Files          152      152              
  Lines         7456     7456              
===========================================
+ Hits          5890     5956      +66     
+ Misses        1566     1500      -66     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Azad99-9
Copy link
Contributor Author

@palisadoes, @Ayush0Chaudhary could you please suggest me why is the above test failing.

@palisadoes
Copy link
Contributor

It looks like a transient bug. Please do a minor commit to see whether it clears.

@Azad99-9
Copy link
Contributor Author

@palisadoes I followed your suggestion by making a minor commit, but unfortunately, the issue continues to persist. After further investigation, it appears that the problem is linked to the GitHub Actions workflow. I'm seeking guidance on the best course of action to resolve this. Could you kindly advise on the next steps I should take to address this issue related to the GitHub Actions workflow?

@palisadoes
Copy link
Contributor

  1. Yes it looks like the workflow isn't executing correctly for this PR, though it has been working for others in this and other repos. We use the workflow to let new contributors what to expect, so it's important.
  2. Create a test PR and see whether it persists. We need to know if this issue is just related to this PR.

@Azad99-9
Copy link
Contributor Author

Ok

@aashimawadhwa
Copy link
Member

@noman2002 can you please look into this issue

@Azad99-9
Copy link
Contributor Author

Azad99-9 commented Nov 25, 2023

Pull request #2139 demonstrates this issue more clearyly.

@palisadoes
Copy link
Contributor

The pull request target GitHub workflow has suddenly started to fail in this and other repos. The GitHub action hasn't been updated since September. A dependency has changed and the authors will need to fix it. We'll have to ignore it for now.

@palisadoes
Copy link
Contributor

@Azad99-9 Please dart format your code and the PR workflow will work correctly

@Azad99-9
Copy link
Contributor Author

got it @palisadoes .

@Azad99-9
Copy link
Contributor Author

@aashimawadhwa please assign reviewers for this PR.

@palisadoes palisadoes merged commit ae4a4b7 into PalisadoesFoundation:develop Nov 26, 2023
6 of 7 checks passed
palisadoes pushed a commit to palisadoes/talawa that referenced this pull request Jan 10, 2024
* Modified the event edit test and made the code coverage of file edit_event_page to 100%

* tests for router.dart

* minor commit to fix failing bug.

* test-pr

* commiting after running dart format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unittest for router.dart
4 participants