Open damian-nrj opened 2 years ago
Hi @damian-nrj . Thank you for opening an issue. I was able to reproduce the behavior you were describing in this reproduction repository. Like your comment describes, the fetch request just seems to hang and the intercept never seems to get called.
i am having similar issue, the only difference is that mine is text/event-stream type. i can await successfully in my localhost server but failed in my real server env.
also wondering if there is way to intercept stream response with fixtures?
i had this issue before and to resolve it i created a command func with all the needed cy.intercept for my test cases and and run it in the beginning of my test cases and when needed i called them cy.wait(@alias).then(xhr:any) =>{}
Current behavior
Hi. I have the following problem:
I want to
cy.intercept
a call that fetches music stream in order to confirm that music is actually played. Therefore, I decided to spy on a particular http call. Unfortunately, creating such interceptor hangs a call and it never fulfills. If nocy.intercept
created, it would go well and return200 OK
.After 30s
cy.wait
time-outs and test case fails.I reached help on Cypress Discord but without success. I was suggested that it might be due to binary/streaming resource and Cypress proxy might be unable to handle it correctly.
Desired behavior
cy.intercept
does not hang call to an external resource.cy.wait
fulfills.Tests are passed.
Test code to reproduce
Cypress Version
10.10.0
Node version
16.13.1
Operating System
macOS 12.2.1
Debug Logs
No response
Other
No response