ic-ui-kit icon indicating copy to clipboard operation
ic-ui-kit copied to clipboard

[ic-button] - adds visual tests for hover & pressed states of buttons

Open ad9242 opened this issue 8 months ago • 1 comments

Summary

Investigate if it is possible to capture the hover & pressed states of buttons in the cypress visual regression tests

💰 Use value

Will catch when colors change & provide confidence in the component

Additional info

May be able to use something like the following: https://docs.cypress.io/api/commands/hover#Simulating-mouseover-event-to-get-popover-to-display

maybe "mousedown" for pressed state?

ad9242 avatar May 01 '25 08:05 ad9242

After a little investigation, it seems using cy.realMouseDown for the pressed state and cy.realHover for the hover state should give us what we need.

MI6-286 avatar May 01 '25 13:05 MI6-286