fix(ClipboardCopy): Add string[] type to children#11177
fix(ClipboardCopy): Add string[] type to children#11177dlabaj merged 2 commits intopatternfly:mainfrom
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 |
thatblindgeye
left a comment
There was a problem hiding this comment.
This looks good, just a linting error due to formatting that needs to be resolved.
tlabaj
left a comment
There was a problem hiding this comment.
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! 🎉 |
* fix(ClipboardCopy): Add string[] type to children The ClipboardCopy component already handles string[] but didn't have it written in the props as valid. * Update failing test --------- Co-authored-by: Eric Olkowski <70952936+thatblindgeye@users.noreply.github.com>

The ClipboardCopy component already handles string[] but didn't have it written in the props as valid.
What: Closes #11186
Additional issues: