chore(ActionList): update tests to new standards#7669
chore(ActionList): update tests to new standards#7669nicolethoen merged 1 commit intopatternfly:mainfrom
Conversation
|
Preview: https://patternfly-react-pr-7669.surge.sh A11y report: https://patternfly-react-pr-7669-a11y.surge.sh |
| test('Renders with class pf-c-action-list', () => { | ||
| render(<ActionList>Test</ActionList>); | ||
|
|
||
| expect(screen.getByText('Test')).toHaveClass('pf-c-action-list'); |
There was a problem hiding this comment.
Would it be reasonable to combine this test with the last since they are rendering the same thing?
There was a problem hiding this comment.
and there are a couple other below that also render the same thing?
There was a problem hiding this comment.
I definitely wouldn't call it unreasonable to combine them, but I personally would advocate for a testing approach that only makes assertions about one aspect of component behavior in each test.
The primary reason being that I believe single behavior tests provide maximum utility from the test suite, as with this approach a failing test (or combination of them) can often point you straight to where a regression was introduced.
kmcfaul
left a comment
There was a problem hiding this comment.
like the descriptive test case names 👍
|
Your changes have been released in:
Thanks for your contribution! 🎉 |
What: Closes #7665
Additional issues: