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

Websocket Documentation Missing or Hard to Find #558

Open
LawJolla opened this issue Apr 27, 2018 · 5 comments
Open

Websocket Documentation Missing or Hard to Find #558

LawJolla opened this issue Apr 27, 2018 · 5 comments

Comments

@LawJolla
Copy link

Tremendous work on Cypress! I'm a solo dev that always found testing a nuisance, but now it's part of my work flow thanks to you!

Cypress mentions " You can control WebSocket messages from within Cypress, conditionally load 3rd party scripts, or call functions directly on your application." https://docs.cypress.io/guides/overview/key-differences.html#New-kind-of-testing

I'm running Apollo/GraphQL on the front end, and I would like to mock several web socket frames.

But I cannot find any docs or API for web socket hooks. Websockets are tricky because they need a stateful, persistent server, and it doesn't look like cy.server() provides that, so I'm not sure where to begin.

Any help is appreciated!

@LawJolla LawJolla changed the title Websocket Documentation Needed Websocket Documentation Missing or Hard to Find Apr 27, 2018
@dwelle
Copy link
Contributor

dwelle commented Feb 19, 2019

In https://docs.cypress.io/faq/questions/general-questions-faq.html#We-use-WebSockets-will-Cypress-work-with-that there's:

We use WebSockets, will Cypress work with that?

Yes.

Shouldn't that be changed to No, or at least an explanation that you can't mock/stub/route it? I'm not sure what the Yes means at all.

/cc @jennifer-shehane

@baal-cadar
Copy link

baal-cadar commented May 2, 2019

@LawJolla @dwelle
I've created small lib to "mock" WebSockets that works with Cypress, maybe someone will find it useful

Example:

Repository & npm:

@dwelle
Copy link
Contributor

dwelle commented May 2, 2019

@baal-cadar looks interesting..

@samlucax
Copy link

Any updates?

@Drecu
Copy link

Drecu commented Aug 4, 2020

When can we expect websockets to be supported by cypress?
That would narrow down the problem of having to many 3rd party dependencies, which cypress was intended to prevent and be a "all in one solution". (Think of selenium ,etc...)

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

No branches or pull requests

7 participants