I have a problem with cypress + react.
I have a situation where I Request data from EP after blurring of input and it will show a message that the data is validating, the message disappears right after the request is done.
I have to test that message is visible after input blur but it disapears so fast that cypress can't detect it / not assert it
part of test code:
cy.get('.some-input').type('some-value')
cy.get('body').click(); // hacky way to blur from input
cy.get('.message')
.contains('Please wait whilst we validate your details')
.should('be.visible');
part of react code:
{accountNumberValidationInProgress && renderMessage(t('Please wait whilst we validate your details'))}
so accountNuberValidationInProgress is true when I blur from some input and the request started, after I receive data from EP this variable is set again to false.