Websocket Documentation Missing or Hard to Find
See original GitHub issueTremendous 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!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:26
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Writing WebSocket servers - Web APIs | MDN
A WebSocket server is nothing more than an application listening on any port of a TCP server that follows a specific protocol.
Read more >Creating AsyncAPI for WebSocket API - Step by Step
Learn how to create a complex AsyncAPI document using WebSocket API ... You can just add missing information to the description of a...
Read more >Chrome Websockets CORS policy - Stack Overflow
I have a hard time believing that the issue with Chrome isn't something with CORS. I have it working by first sending an...
Read more >WebSockets and Node.js - testing WS and SockJS by building ...
First, require the WS library and use the WebSocket.Server method to create a new WebSocket server on port 7071 (no significance, any port...
Read more >Authentication - websockets 10.4 documentation
The WebSocket server can use any client authentication mechanism available ... after the WebSocket handshake, making it impossible to monitor authentication ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In https://docs.cypress.io/faq/questions/general-questions-faq.html#We-use-WebSockets-will-Cypress-work-with-that there’s:
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 theYes
means at all./cc @jennifer-shehane
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…)