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

ColorPicker: improve unit tests #49344

Open
ciampo opened this issue Mar 24, 2023 · 0 comments
Open

ColorPicker: improve unit tests #49344

ciampo opened this issue Mar 24, 2023 · 0 comments
Labels
[Feature] Colors Color management [Package] Components /packages/components [Type] Enhancement A suggestion for improvement.

Comments

@ciampo
Copy link
Contributor

ciampo commented Mar 24, 2023

As originally flagged in #49214 (comment)_, the unit test for ColorPicker could definitely be improved:

  • they don't use user-event
  • they don't check for the exact color values that are passed to the onChange function (they currently only check that it's a valid hex value)
  • they don't check the value of the input fields
  • they only interact with the component by simulating a mouse drag over the "canvas", and therefore they don't test all of the different input fields available:
    • The hex input
    • The HSL input/sliders
    • The RGB input/sliders
    • The hue slider
    • The Alpha slider
@ciampo ciampo added [Type] Enhancement A suggestion for improvement. [Package] Components /packages/components labels Mar 24, 2023
@Thelmachido Thelmachido added the [Feature] Colors Color management label Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Colors Color management [Package] Components /packages/components [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants