-
Notifications
You must be signed in to change notification settings - Fork 355
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
chore(CodeBlock): update tests #9546
Conversation
Preview: https://patternfly-react-pr-9546.surge.sh A11y report: https://patternfly-react-pr-9546-a11y.surge.sh |
const { asFragment } = render(<CodeBlockAction>action</CodeBlockAction>); | ||
expect(asFragment()).toMatchSnapshot(); | ||
}); | ||
test('CodeBlock content renders with class pf-v5-c-code-block__content by default', () => { |
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.
Can you follow what Adam is doing in his PR for updating our test to not have hard coded styles. This will make it easier when updating versions of PF classes in the future.
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.
Just some comments below, can we also add tests for:
- in CodeBlock, that passing
actions
works (could just pass a div with a simple string and check that the string renders) - basic snapshot tests for CodeBlockAction and CodeBlockCode
- In CodeBlockCode, that the
pf-v5-c-code-block__pre
class renders by default and thatclassName
being passed works
What: Closes #9533