ic-ui-kit
ic-ui-kit copied to clipboard
[ic-button] - adds visual tests for hover & pressed states of buttons
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?
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.