-
Notifications
You must be signed in to change notification settings - Fork 356
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
fix(ClipboardCopy): Add string[] type to children #11177
fix(ClipboardCopy): Add string[] type to children #11177
Conversation
Preview: https://patternfly-react-pr-11177.surge.sh A11y report: https://patternfly-react-pr-11177-a11y.surge.sh |
ce0fdf3
to
f1671dd
Compare
Actually it doesn't handle it correctly for some reason. @tlabaj do you happen to know what's happening? |
f1671dd
to
1325248
Compare
Ah nvm found the issue, was inside |
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.
This looks good, just a linting error due to formatting that needs to be resolved.
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 please add a unit test for the array of strings type?
3ec6591
to
8e6dd02
Compare
The ClipboardCopy component already handles string[] but didn't have it written in the props as valid.
8e6dd02
to
cb3204f
Compare
@tlabaj I've updated and fixed tests. It does fail atm but I do not understand why as the Jest docs claims it should work https://jestjs.io/docs/expect#tohavebeencalledwitharg1-arg2- I have trouble getting jest to work locally unfortunately as it keeps giving me this error, so debugging is a bit time consuming for me. Could you fix it instead or let me know if I missed a step in preparing my dev environment? FAIL packages/react-core/src/deprecated/components/Modal/__tests__/ModalBoxDescription.test.tsx
● Test suite failed to run
Cannot find module '@patternfly/react-styles' from 'packages/react-core/src/deprecated/components/Modal/ModalBoxDescription.tsx'
Require stack:
packages/react-core/src/deprecated/components/Modal/ModalBoxDescription.tsx
packages/react-core/src/deprecated/components/Modal/__tests__/ModalBoxDescription.test.tsx
1 | import * as React from 'react';
> 2 | import { css } from '@patternfly/react-styles'; |
packages/react-core/src/components/ClipboardCopy/__tests__/ClipboardCopy.test.tsx
Outdated
Show resolved
Hide resolved
Your changes have been released in:
Thanks for your contribution! 🎉 |
The ClipboardCopy component already handles string[] but didn't have it written in the props as valid.
What: Closes #11186
Additional issues: