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: Adds tests to the PublishedStatus component #13892
test: Adds tests to the PublishedStatus component #13892
Conversation
Codecov Report
@@ Coverage Diff @@
## master #13892 +/- ##
==========================================
- Coverage 77.55% 77.48% -0.08%
==========================================
Files 935 935
Lines 47301 47319 +18
Branches 5907 5907
==========================================
- Hits 36685 36665 -20
- Misses 10472 10510 +38
Partials 144 144
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
expect(await screen.findByText(tooltip)).toBeInTheDocument(); | ||
expect(savePublished).not.toHaveBeenCalled(); | ||
userEvent.click(screen.getByText('Published')); | ||
expect(savePublished).toHaveBeenCalledTimes(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! (2)
expect(await screen.findByText(tooltip)).toBeInTheDocument(); | ||
expect(savePublished).not.toHaveBeenCalled(); | ||
userEvent.click(screen.getByText('Draft')); | ||
expect(savePublished).toHaveBeenCalledTimes(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
SUMMARY
Adds tests to the
PublishedStatus
component.TEST PLAN
1 - Execute
PublishedStatus
tests2 - All tests should pass
@rusackas @junlincc
ADDITIONAL INFORMATION