-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
CustomSelect: add tests for new features #58583
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core SVNIf you're a Core Committer, use this list when committing to
GitHub Merge commitsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
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.
I had a few thoughts, but no blockers 👍
And thanks for the note in the description about toHaveTextContent
— it was helpful!
packages/components/src/custom-select-control-v2/test/index.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/custom-select-control-v2/test/index.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/custom-select-control-v2/test/index.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/custom-select-control-v2/test/index.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/custom-select-control-v2/test/index.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/custom-select-control-v2/test/index.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/custom-select-control-v2/test/index.tsx
Outdated
Show resolved
Hide 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.
I just reliased I have review comments pending since yesterday and I forgot to submit them 😭 Some of them are duplicates of Lena's comments, you'll get a nice 2x1 when solving them 😄
packages/components/src/custom-select-control-v2/test/index.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/custom-select-control-v2/test/index.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/custom-select-control-v2/test/index.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/custom-select-control-v2/test/index.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/custom-select-control-v2/test/index.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/custom-select-control-v2/test/index.tsx
Outdated
Show resolved
Hide resolved
81e9fd8
to
1861978
Compare
c04010f
to
6ea8733
Compare
6ea8733
to
95a9882
Compare
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.
LGTM 🚀
We can always iterate in follow-up PRs with more tests as needed
What?
I planned to add additional tests for the new component once #57902 is merged. However, I think it would be good to do this before for additional checks that the new features continue to work.
Why?
To ensure new features work as intended and future changes like the legacy adapter don't break these features.
How?
Adding tests for features that aren't included in
CustomSelectControl
(which will be included in this component's tests, after merging #57902).Note
We were hoping with the ariakit version we could improve tests so instead of
toHaveTextContent
we would asserttoHaveValue
. However, there isn't avalue
attribute since it's not an HTML input. We could consider adding a data attribute if that would be better than checking the option's text content.Testing Instructions
npm run:test packages/components/src/custom-select-control-v2/test/index.tsx