Skip to content

Commit

Permalink
style: extract setupAndMoveToPlayground util
Browse files Browse the repository at this point in the history
  • Loading branch information
aziolek committed Apr 11, 2024
1 parent 12e65c5 commit 49fb4fa
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions client/cypress/utils/moveTime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const moveToDecisionWindowOpen = (cypressWindow: Cypress.AUTWindow): Chainable<a
});
// Waiting 2s is a way to prevent the effects of slowing down the e2e environment (data update).
cy.wait(2000);
// reload is needed to get updated data in the app
// Reload is needed to get updated data in the app
cy.reload();
return waitForLoadersToDisappear();
};
Expand All @@ -86,7 +86,7 @@ const moveToDecisionWindowClosed = (cypressWindow: Cypress.AUTWindow): Chainable
});
// Waiting 2s is a way to prevent the effects of slowing down the e2e environment (data update).
cy.wait(2000);
// reload is needed to get updated data in the app
// Reload is needed to get updated data in the app
cy.reload();
return waitForLoadersToDisappear();
};
Expand Down Expand Up @@ -120,15 +120,14 @@ export const moveTime = (
moveToDecisionWindowOpen(cypressWindow);
} else {
moveToDecisionWindowOpen(cypressWindow);
// reload is needed to get updated data in the app
// Reload is needed to get updated data in the app
cy.reload();
waitForLoadersToDisappear();
moveToDecisionWindowClosed(cypressWindow);
// reload is needed to get updated data in the app
}

// Waiting 2s is a way to prevent the effects of slowing down the e2e environment (data update).
cy.wait(5000);
cy.wait(2000);
cy.reload();
return waitForLoadersToDisappear();
};

0 comments on commit 49fb4fa

Please sign in to comment.