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

Implement backend events for stubbing/spying WebSockets #7655

Open
3 tasks
flotwig opened this issue Jun 10, 2020 · 6 comments
Open
3 tasks

Implement backend events for stubbing/spying WebSockets #7655

flotwig opened this issue Jun 10, 2020 · 6 comments
Labels
E2E Issue related to end-to-end testing topic: network type: feature New feature that does not currently exist

Comments

@flotwig
Copy link
Contributor

flotwig commented Jun 10, 2020

Build out backend events to support stubbing/spying WebSockets for #199

  • Add support to add:route for matching on WebSockets
  • Match incoming websocket connections against registered net-stubbing routes
  • Add events to communicate WebSocket info between driver and server and to support interception of frames/connects/disconnects. Draft spec:
eventName from to payload description
ws:connect server driver CyIncomingRequest, CyWebSocket fired when a new WS connection is received
ws:connect:continue driver server CyIncomingRequest fired when driver wishes to pass the connection on to destination
ws:disconnect server driver CyWebSocket fired when a WS disconnects
ws:frame:outgoing server driver CyWebSocket, CyWebSocketMessage fired when browser sends a ws frame
ws:frame:outgoing:continue driver server CyWebSocketMessage continue passing frame to upstream
ws:frame:incoming server driver CyWebSocket, CyWebSocketMessage fired when upstream server sends a ws frame
ws:frame:incoming:continue driver server CyWebSocketMessage continue passing frame to browser

Depends on #687

@unlikelyzero
Copy link

This would be a game-changer for test automation. I can't wait for this to land! Let me know if you'd like me to test a preview PR!

@deepanshuverma
Copy link

any update on this one guys, when can we expect this ?

@cypress-app-bot
Copy link
Collaborator

This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.

@cypress-app-bot cypress-app-bot added the stale no activity on this issue for a long period label May 17, 2023
@Andarist
Copy link
Contributor

this feature would be awesome, bump for a stale bot

@nagash77 nagash77 added type: feature New feature that does not currently exist E2E Issue related to end-to-end testing and removed stale no activity on this issue for a long period labels May 18, 2023
@suppadeliux
Copy link

Would be awesome to support this!

@jove4015
Copy link

Would be so great to have this! We are waiting on data from a websocket to refresh and right now we have to go through hurdles to update hidden dom elements on the page so that we can notify cypress that the data is done loading.... it's beyond kludgy. Having a "cy.intercept" that works with websocket messages would be so helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E2E Issue related to end-to-end testing topic: network type: feature New feature that does not currently exist
Projects
None yet
Development

No branches or pull requests

8 participants