-
-
Notifications
You must be signed in to change notification settings - Fork 171
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
How do I combine Synpress with other plugins? Getting errors about promises #775
Comments
Ok, like I've reported in #764, I've added debugging in
Suprisingly, it reports PS Ok, I've installed |
Making Synpress works with Cucumber id definitely a great idea! I will look into this issue when I have a chance. Thanks for sharing! |
Right, so now that I've defeated several issues, the problem is boiled down to
The first one is quite a problem, as it slows down the feedback loop (when writing tests) to an extent that I'd call it "breaks it". I'll update the repo to make it work as I have it working locally now (haven't done yet). |
These might be related: #404 |
Current DX is a total nightmare. The following 2 issues ruin the workflow:
Combined with the fact that some failures are randomly reproduced/not reproduced due to timeouts (I'm dealing with a complex DApp with behavior quirks), I'm getting the following DX problems:
I'll do my best to provide a minimal reproducible example, but for now I'm just outlining the problems and asking to prioritize #417. I'm also looking for a way not to close Cypress window once it fails: this would help determining the step on which the problem occured and do some in-place debugging (like in the watch mode). PS @kasparkallas I don't really see any connection. Why you think so? |
Ok, looks like putting
into a steps definition file is a working approach to beat the "not sure where the failure comes from" problem, as well as to access the sources by the stack trace). This helps a lot. |
Another problem, a somewhat complicated one: cypress-io/cypress#27437 – |
The reason is that synpress is/was using async/await inside the
|
Thanks @MichalLytek, this cures the complain about a promise indeed, created a PR for this. There are other problems with watch mode though, I'll report those later. |
Describe the bug
I've successfully set up the Cucumber + Cypress bundle and now trying make Cucumber + Synpress work in a similar way.
However, I'm getting this error:
Stack trace is not very helpful:
My guess is, something's wrong with my config:
More precisely, I suspect that I should combine
synpressPlugins(on, config)
andawait addCucumberPreprocessorPlugin(on, config)
in a way so that the second command is only called once the first one finishes. However,await
doesn't help with that and generally I'm not sure how to combine them correctly. May be pass the rest as a callback tosynpressPlugins
as the second argument?To Reproduce
npm init i
,npm run test
(or justnpx cypress open
);Related repository
https://github.com/YakovL/synpress-cucumber
Expected behavior
The test should run.
Screenshots
The error message and the stack trace covers it all, none informative screenshots.
Desktop (please complete the following information):
Additional context
#414 looks related
The text was updated successfully, but these errors were encountered: