Last active
June 23, 2020 21:28
-
-
Save joegaudet/cb10559dcf39dba1621b83c0e6a33b0d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cypress.Commands.add("settleAppPromises", () => { | |
return cy.window() | |
.then(win => cy.waitUntil(() => win.SwiftFox.__container__.lookup('service:settledPromiseQueue').isEmpty)); | |
}); | |
Cypress.Commands.overwrite('click', (originalFn) => { | |
cy.settleAppPromises(); | |
return originalFn(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment