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

Fixes #1242 Create tests for create_event_page.dart #1472

Conversation

Ayush0Chaudhary
Copy link
Contributor

What kind of change does this PR introduce?
Fixes #1242 Create tests for create_event_page.dart

Issue Number:

Fixes #1242

Did you add tests for your changes?
YES

Snapshots/Videos:

If relevant, did you update the documentation?

Summary
Fixes #1242 Create tests for create_event_page.dart

Does this PR introduce a breaking change?
NO

Other information

Have you read the contributing guide?
YES

@Ayush0Chaudhary Ayush0Chaudhary force-pushed the Ayush0Chaudhary/create_event_page_test branch from 9be8d02 to a9c5148 Compare February 8, 2023 15:27
@Ayush0Chaudhary
Copy link
Contributor Author

I got 93.2% in these test

Screenshot from 2023-02-08 20-18-12

@Ayush0Chaudhary
Copy link
Contributor Author

The part which was not tested is in below ss
Screenshot from 2023-02-08 20-18-27

the below loop return false for every value

orgMembersList.forEach((orgMember) {
if (isAdmin) {
_adminCheckedMap.putIfAbsent(orgMember.id!, () => false);
} else {
_memberCheckedMap.putIfAbsent(orgMember.id!, () => false);
}
_memberCheckedMap.putIfAbsent(orgMember.id!, () => false);
});
return orgMembersList;
}

Thus the frontend can never be tested, as the list is always null

@Ayush0Chaudhary
Copy link
Contributor Author

@palisadoes @noman2002 @TheHazeEffect please review.

@Ayush0Chaudhary
Copy link
Contributor Author

@palisadoes the same check failed again, can you rerun the actions

@Ayush0Chaudhary
Copy link
Contributor Author

@noman2002

@codecov-commenter
Copy link

Codecov Report

Merging #1472 (a9c5148) into develop (311b205) will increase coverage by 0.67%.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff             @@
##           develop    #1472      +/-   ##
===========================================
+ Coverage    74.59%   75.26%   +0.67%     
===========================================
  Files          146      146              
  Lines         7222     7221       -1     
===========================================
+ Hits          5387     5435      +48     
+ Misses        1835     1786      -49     
Impacted Files Coverage Δ
...els/event_view_models/create_event_view_model.dart 100.00% <ø> (ø)
...s/after_auth_screens/events/create_event_page.dart 93.18% <ø> (+17.04%) ⬆️
lib/widgets/add_members_bottom_sheet.dart 79.16% <ø> (+39.58%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@noman2002 noman2002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but we should keep the issue open to get it to 100%

@palisadoes palisadoes requested review from palisadoes and removed request for TheHazeEffect February 8, 2023 17:28
@palisadoes palisadoes merged commit 1b09ba4 into PalisadoesFoundation:develop Feb 8, 2023
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.

Views: Create tests for create_event_page.dart
4 participants