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

Tests: Add tests in Jest to frontend components #7324

Open
wants to merge 15 commits into
base: epic/event-tickets-follow-up-GIVE-371
Choose a base branch
from

Conversation

pauloiankoski
Copy link
Contributor

@pauloiankoski pauloiankoski commented Mar 23, 2024

Resolves #

Description

This pull request serves as a starting point for implementing unit and behavioral tests for our React components. Tests are run in Jest with assistance from the Testing Library React (TLR) library. It includes tests that cover all components used in the Event Tickets frontend.

Additionally, I have added several new scripts to package.json to facilitate triggering the tests with specific configurations (listed below). I have also included a job for these tests in our GitHub workflow.

npm test
npm run test:verbose
npm run test:watch
npm run test:watch:verbose
npm run test:coverage

Visuals

CleanShot 2024-03-22 at 22 21 53

CleanShot 2024-03-22 at 22 22 25

Testing Instructions

Run one of the new available scripts.

Pre-review Checklist

  • Acceptance criteria satisfied and marked in related issue
  • Relevant @unreleased tags included in DocBlocks
  • Includes unit tests
  • Reviewed by the designer (if follows a design)
  • Self Review of code and UX completed

@pauloiankoski pauloiankoski force-pushed the test/event-tickets-components branch from 670f3bb to 93b1683 Compare March 23, 2024 00:17
@pauloiankoski pauloiankoski marked this pull request as ready for review March 23, 2024 01:37
@JasonTheAdams
Copy link
Contributor

@pauloiankoski This is so freaking cool!!

Party

@jonwaldstein
Copy link
Contributor

@pauloiankoski In concur, this is epic! Can't wait to test it out 😄

@jonwaldstein
Copy link
Contributor

@pauloiankoski I updated the branch & parent epic. I also had to install jest-environment-jsdom from this message:

Screenshot 2024-05-17 at 5 33 42 PM

@jonwaldstein
Copy link
Contributor

@pauloiankoski It looks like your tests are already doing their job as we have failing ones on this very PR 😄

Copy link
Contributor

@jonwaldstein jonwaldstein left a comment

Choose a reason for hiding this comment

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

This is great! we have some failing tests though so once you fix those we can merge. If you could also add some @unreleased tags that would be good too 😄

Copy link

github-actions bot commented Jul 8, 2024

This PR is stale because it has been open 45 days with no activity. Stale PRs will NOT be automatically closed.

@github-actions github-actions bot added the Stale label Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants