Skip to content
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

Suggestion: suppress Cypress promise/async warnings #6

Open
FFdhorkin opened this issue Mar 12, 2020 · 2 comments
Open

Suggestion: suppress Cypress promise/async warnings #6

FFdhorkin opened this issue Mar 12, 2020 · 2 comments

Comments

@FFdhorkin
Copy link

cypress-promise seems like it would improve the readability/maintainability of our test code significantly. We're using Cypress to test API endpoints, not an actual webpage, so many of the concerns Cypress raises in their "Commands are not Promises" blurb don't really matter, and the way Cypress can lead to many levels of indents can be painful.

However, all the warnings that Cypress spits out during usage of cypress-promise are somewhat of a nonstarter.

There's got to be some way to have cypress-promise suppress all of Cypress' warnings. (It'd be better to transpile, as you mentioned on #5, but I'd bet that'd be much more effort.)

@NicholasBoll
Copy link
Owner

Arg. 100% agree. I'm sure it is possible. I've tried a few times for several hours per attempt. I can't quite figure out the internal mechanisms enough to get this lib to work consistently or to remove the warning.

Warning is thrown here:
https://github.com/cypress-io/cypress/blob/7afe4f8c40e3c4166a4d1ba4a941248edf5329fc/packages/driver/src/cy/commands/connectors.coffee#L116-L120

Defined here:
https://github.com/cypress-io/cypress/blob/b6703aaec756ad58bdf4b2f3df3a3a1a9dbbc4f8/packages/driver/src/cypress/error_messages.coffee#L1324-L1335

@Dan503
Copy link

Dan503 commented Mar 28, 2020

Maybe the solution is to raise an issue against Cypress to allow users to suppress the warning?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants