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: switch tabs tests to react testing library #1378

Merged
merged 11 commits into from
Apr 9, 2024

Conversation

lsprr
Copy link
Contributor

@lsprr lsprr commented Mar 2, 2024

Issue #1159

This PR switches the Tabs tests to React Testing Library.

Validation steps

  • Run yarn test
  • See that there are coverage percentages in the table
  • Verify that the tests are converted properly

@lsprr lsprr requested a review from a team as a code owner March 2, 2024 04:11
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-1378.d15792l1n26ww3.amplifyapp.com

Copy link
Contributor

@ryomtoob ryomtoob left a comment

Choose a reason for hiding this comment

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

I left a few comments, but overall this conversion looks good! In addition to converting the existing cases, this is an opportunity to evaluate if we should add anything to increase coverage and better follow the CONTRIBUTING guidelines. That being said, I think we should make sure we are running axe on all the component states. Right now, we're missing the vertical and thin variants.

@lsprr
Copy link
Contributor Author

lsprr commented Mar 15, 2024

I left a few comments, but overall this conversion looks good! In addition to converting the existing cases, this is an opportunity to evaluate if we should add anything to increase coverage and better follow the CONTRIBUTING guidelines. That being said, I think we should make sure we are running axe on all the component states. Right now, we're missing the vertical and thin variants.

I have just added those variants to the test file.

Copy link
Member

@scurker scurker left a comment

Choose a reason for hiding this comment

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

Just a few minor things, looking good!

packages/react/src/components/Tabs/tabs.test.tsx Outdated Show resolved Hide resolved
packages/react/src/components/Tabs/tabs.test.tsx Outdated Show resolved Hide resolved
packages/react/src/components/Tabs/tabs.test.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@anastasialanz anastasialanz left a comment

Choose a reason for hiding this comment

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

Looks great! Thank you!

@anastasialanz
Copy link
Contributor

🚨 Reviewed for Security 🚨

@anastasialanz anastasialanz enabled auto-merge (squash) April 7, 2024 17:45
@anastasialanz anastasialanz disabled auto-merge April 7, 2024 17:45
@scurker scurker merged commit ed44118 into dequelabs:develop Apr 9, 2024
6 of 7 checks passed
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.

4 participants