chore(ClipboardCopy): updated tests#9574
Conversation
|
Preview: https://patternfly-react-pr-9574.surge.sh A11y report: https://patternfly-react-pr-9574-a11y.surge.sh |
ea1243e to
3c7d4f4
Compare
4c71132 to
a71fe93
Compare
476fa44 to
e96b4bf
Compare
|
I also updated how the |
wise-king-sullyman
left a comment
There was a problem hiding this comment.
Awesome work on this so far, small handful of requsts/questions:
packages/react-core/src/components/ClipboardCopy/__tests__/ClipboardCopy.test.tsx
Show resolved
Hide resolved
packages/react-core/src/components/ClipboardCopy/__tests__/ClipboardCopy.test.tsx
Outdated
Show resolved
Hide resolved
packages/react-core/src/components/ClipboardCopy/__tests__/ClipboardCopy.test.tsx
Outdated
Show resolved
Hide resolved
packages/react-core/src/components/ClipboardCopy/__tests__/ClipboardCopy.test.tsx
Show resolved
Hide resolved
packages/react-core/src/components/ClipboardCopy/__tests__/ClipboardCopyButton.test.tsx
Outdated
Show resolved
Hide resolved
packages/react-core/src/components/ClipboardCopy/__tests__/ClipboardCopyButton.test.tsx
Outdated
Show resolved
Hide resolved
packages/react-core/src/components/ClipboardCopy/__tests__/ClipboardCopyButton.test.tsx
Show resolved
Hide resolved
| expect(toggleButton).toHaveAttribute('aria-expanded', 'false'); | ||
| }); | ||
| expect(screen.getByRole('button')).toHaveAttribute('data-prop', 'test'); | ||
| }); |
There was a problem hiding this comment.
Can you add tests for the default class and the className prop?
There was a problem hiding this comment.
@tlabaj we had a question when discussing this. Currently the ClipboardCopyToggle component has className as part of the interface, but it's spread in the props object which is placed on our Button component internally. Do you happen to know if that was the intent (passing a className to ClipboardCopyToggle renders the class on pf-v5-c-button), or was the className meant to be passed on the div.pf-v5-c-clipboard-copy__toggle-icon"?
ClipboardCopyToggle file for reference
There was a problem hiding this comment.
Can open up a new breaking change issue to spread the className div.pf-v5-c-clipboard-copy__toggle-icon. We may also consider adding a new prop to add a classname to the button.
e96b4bf to
68d6f8f
Compare
wise-king-sullyman
left a comment
There was a problem hiding this comment.
🥳 looks great other than that last question about className
|
Your changes have been released in:
Thanks for your contribution! 🎉 |
* chore(ClipboardCopy): updated tests * Added tests for ClipboardCopy * Removed generated tests, added snapshot * Updated onTooltipHidden test to integration * Separated tooltip and callback tests * Adjusted wait time in cypress * Updated snapshots after rebase * Added tests for non-exported components * Updated per Austin comments
What: Closes #9532
Additional issues: