Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Fixes intermittent issues with Cypress tests #68

Merged
merged 2 commits into from
Jun 11, 2020

Conversation

t-davies
Copy link
Contributor

@t-davies t-davies commented Jun 11, 2020

What
Fixes and workarounds for some intermittent problems with our Cypress tests. It is likely this is caused by the page being updated in the background and then the DOM element Cypress is referring to becoming detached from the document, since it has been replaced. There is a proposal to have Cypress requery in these cases over at cypress-io/cypress#7306.

Why
So that we can have better confidence in our tests, and do not get into the habit of just re-running them when there is a failure.

Anything else?

  • We should follow progress of the linked GitHub issue and look to remove these workarounds once there is a better solution available.

@@ -66,6 +56,7 @@ context('Add action form', () => {
);

cy.get('[data-testid=add-action-button-test]').click();
cy.get('[data-testid=add-action-button-test]').should('not.exist');
Copy link
Contributor Author

@t-davies t-davies Jun 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waits for the button to disappear, since this is hidden after the API call has completed so we know we should be done waiting for it.

@t-davies t-davies marked this pull request as ready for review June 11, 2020 16:18
@mmmmillar
Copy link
Contributor

Let's give it a go!

@t-davies t-davies merged commit 5d0ba0a into master Jun 11, 2020
@t-davies t-davies deleted the hotfix/cypress-tests-failing branch June 11, 2020 16:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants