Skip to content
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

Tests: Add Component Tests for DuotonePicker Component #69264

Draft
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

im3dabasia
Copy link
Contributor

@im3dabasia im3dabasia commented Feb 20, 2025

Work in progres

What?

This PR introduces unit tests for the DuotonePicker Component

Related comment: #48353 (comment)
Related issues: #48347, #48346

Why?

Adding these tests ensures that the components render correctly and behave as expected when interacting with the duotone color options. This improves confidence in the component functionality and helps catch regressions.

How?

  • Added tests for DuotonePicker to check:
    - Rendering of duotone options.
    - Proper handling of onChange when selecting and clearing duotone values.

Testing Instruction

Confirm tests pass.

npm run test:unit packages/components/src/duotone-picker/test/duotone-picker.tsx 

Screenshots

image

@t-hamano t-hamano added [Type] Code Quality Issues or PRs that relate to code quality [Package] Components /packages/components labels Feb 20, 2025
@im3dabasia im3dabasia marked this pull request as ready for review February 21, 2025 16:10
Copy link

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: im3dabasia <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@im3dabasia im3dabasia marked this pull request as draft February 21, 2025 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants