Skip to content

ColorPicker: improve unit tests #49344

@ciampo

Description

@ciampo

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions