You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
After updating from 18.0.0 to 18.0.2 many of our Cypress tests started failing. These are tests that close a modal and then immediately starts typing in input fields. Standard behaviour seems to be that page focus returns to the button that opened the modal after it is closed, but in 18.0.2 this is happening some time later than before. This results in some Cypress tests failing because the input field being typed in loses focus.
We've tried waiting for the modal to disappear from the DOM before continuing the tests with:
but none of these delay the tests long enough for the modal opening button to be focussed before continuing. We also tried waiting for the button to be focussed before continuing, but it caused some flakiness. The only reliable way of solving this issue we've found so far is waiting for 500 ms after closing the modal in every test that interacts with an input field after closing a modal, which is not ideal.
The text was updated successfully, but these errors were encountered:
SitDownBe
changed the title
Longer closing time of modals in 18.0.2 affects Cypress tests
Longer closing time of modals in 18.0.2 affecting Cypress tests
Aug 15, 2024
@SitDownBe Sorry for the late response, but i think the issue is that we have fade-out animation that normally takes 450ms. You can set animation false for your tests, or close your modal using BsModalService.hide() call which bypasses animation.
Description:
After updating from 18.0.0 to 18.0.2 many of our Cypress tests started failing. These are tests that close a modal and then immediately starts typing in input fields. Standard behaviour seems to be that page focus returns to the button that opened the modal after it is closed, but in 18.0.2 this is happening some time later than before. This results in some Cypress tests failing because the input field being typed in loses focus.
We've tried waiting for the modal to disappear from the DOM before continuing the tests with:
cy.get('bs-modal-backdrop').should('not.exist');
cy.get('modal-container').should('not.exist');
cy.get('body').should('not.have.class', 'modal-open');
but none of these delay the tests long enough for the modal opening button to be focussed before continuing. We also tried waiting for the button to be focussed before continuing, but it caused some flakiness. The only reliable way of solving this issue we've found so far is waiting for 500 ms after closing the modal in every test that interacts with an input field after closing a modal, which is not ideal.
The text was updated successfully, but these errors were encountered: