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

Code Coverage for DeleteOrg.tsx #1216

Closed
wants to merge 1 commit into from
Closed

Code Coverage for DeleteOrg.tsx #1216

wants to merge 1 commit into from

Conversation

ShatilKhan
Copy link

Fixes #1066

Did you add tests for your changes?
Yes

Summary

Test for Rendering Delete Button

This test checks if the delete button is rendered correctly when the canDelete prop is true. It renders the DeleteOrg component and then checks if the delete button (identified by the data-testid attribute openDeleteModalBtn) is present in the document.

Test for Opening Delete Modal

This test checks if the delete modal appears when the delete button is clicked. It renders the DeleteOrg component, simulates a click event on the delete button, and then checks if the delete modal (identified by the data-testid attribute orgDeleteModal) is present in the document.

Test for Closing Delete Modal

This test checks if the delete modal closes when the close button is clicked. It renders the DeleteOrg component, simulates a click event on the delete button to open the modal, simulates another click event on the close button (identified by the data-testid attribute closeDelOrgModalBtn), and then checks if the delete modal is not present in the document.

Does this PR introduce a breaking change?
No

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 these 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
  3. Merge conflicts

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

CONTRIBUTING.md

Read our CONTRIBUTING.md file. Most importantly:

  1. PRs with issues not assigned to you will be closed by the reviewer
  2. Fix the first comment in the PR so that each issue listed automatically closes

Other

  1. 🎯 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.
  2. Read the CONTRIBUTING.md file make

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congratulations on making your first PR! 🎊 If you haven't already, check out our Contributing Guidelines and PR Reporting Guidelines to ensure that you are following our guidelines for contributing and creating PR.

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.

Please fix the type errors.

@ShatilKhan
Copy link
Author

ShatilKhan commented Dec 20, 2023

Please fix the type errors.

Can you explain a bit on what change you're referring to please?
An example would be appreciated

@palisadoes
Copy link
Contributor

Please fix the failing test

@ShatilKhan
Copy link
Author

Yes I've found the errors, working on fixing them

@aashimawadhwa
Copy link
Member

but this issue is not assigned to you? @ShatilKhan

@ShatilKhan
Copy link
Author

but this issue is not assigned to you? @ShatilKhan

It was originally assigned to me
Unassigned as I couldn’t make the PR in time
I finally made the PR last night

@palisadoes
Copy link
Contributor

Unfortunately, there isn’t an issue assigned to you for this PR. Please follow the guidelines in our PR_GUIDELINES.md file. We have the procedures in place so that everyone has a fair chance of contributing. I will be closing this pull request. Please follow the procedures and resubmit when ready.

We understand the difficulty in your situation but we have to balance dormant issues that get no attention and the need for everyone to get a chance. Please look for or create other issues to work on.

Closing

@palisadoes palisadoes closed this Dec 21, 2023
@ShatilKhan ShatilKhan deleted the delorg branch January 11, 2024 11:44
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.

Code Coverage: Create tests for src/components/DeleteOrg/DeleteOrg.tsx
4 participants