-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cypress-promise with async/await not working in Electron #2
Comments
the workaround probably would still work if you remove ".promisify()" - just put the assignment into the then clause: cy....then(ele => foo = ele) |
It's very possible something changed in Cypress 3 that is causing issues with the There isn't much code here (about 20 lines): https://github.com/NicholasBoll/cypress-promise/blob/master/index.js |
This doesn't seem to work with Electron or Firefox. The second promise does not resolve. |
Not working on Chrome either if you run "yarn cypress run". Only way got these to work is with "yarn cypress open" then run the tests with Chrome. All other browsers fail here. Any workaround to this issue? The second promise not resolving at all and always failing with timeout 4000 error. I'm using Cypress 4.7.0 |
I love this module, but its not working in Electron. So, I cant run cypress headless. Browser: Electron 91 (headless)
|
have you got the resolution? |
beside, the cypress-promise seems got command timeout in firefox |
A very good package, it is very needed and makes code easier to read. I have issues with it though.
is not working if you run it in Electron browser. I use 3.0.2 version of Cypress which comes with Electron 59.
After several experiments, I found a way to patch the promises to work in Electron. If you wrap your expect(foo).to.equal('foo'); into a Cypress command then Cypress automatically resolves the promise and you do not need async/await:
then this works in the test:
I know this is not the way it should be but for me this workaround is good enough until cypress-promise starts to work in Electron. I'm open for suggestions that can skip wrapping into command but directly resolve the promise in the tests without async/await.
The text was updated successfully, but these errors were encountered: