I have a username/password input with a 'show password' button which shows the password text when clicked; but only if you hold it. As soon as you release the click, it will hide the password again.
The wrong way of testing it is:
it('show password word', () => {
cy.get('[data-cy="login-password-input"]').should('have.type', 'password')
cy.get('[data-cy="show-password-btn"]').click()
cy.get('[data-cy="login-password-input"]').should('have.type', 'text')
})
Since this reverts back to type=password before I have a chance to check it. Is it possible to keep the click held down whilst performing the last verification check?