Questions tagged [cypress-intercept]
111 questions
1
vote
1 answer
How to update the fixture for an existing intercept
I added one fixture in before each and now I need to get the updated results of the same fixture file which I added in the test script. Is this possible in Cypress? Could anyone tell me that how to do it properly If this kind of scenario is possible…

Ravi
- 29
- 6
1
vote
1 answer
Cypress intercept wait, no request ever occured
I'm having a hard time trying to mock a simple api request from a different port than the frontend.
The code below is returning: Timed out retrying after 5000ms: cy.wait() timed out waiting 5000ms for the 1st request to the route: convos. No request…

FabienChn
- 938
- 10
- 17
1
vote
1 answer
How to wait for a request just to be sent, not until it's completed in cypress?
I want to wait only until a request is sent.
I don't want to wait until the request receives a response.
As of now cy.intercept() and cy.wait() wait until the request receives a response.
Is there any way to wait just until the request is sent?
For…

Yogendiran Barath
- 67
- 8
1
vote
1 answer
intercepting third party calls in Cypress
I am able to use cy.intercept() to intercept a backend API. But this backend API internally makes a call to a third party server. I want to intercept this internal call and stub it, but it's not happening. This internal call cannot be 'seen' in the…

rojosa
- 55
- 2
- 11
1
vote
0 answers
Unable to fix the by default blank page of cypress updated version
After updating the cypress to latest version i'm geting this error
However i added the testIsloation to false in cofigration file but I'm still getting this error
can anyone please help

Abubakar Mughal
- 11
- 2
1
vote
2 answers
Cypress | How to create a variable from network response body for OTP on login test
Disclaimer: I'm very new to using cypress, javascript and coding in general so please be as clear as possible as I'm still picking up some basic concepts.(I have a lot to learn and I appreciate you!).
Problem: I'm writing a login test that requires…

JMac90
- 13
- 4
1
vote
0 answers
Cypress intercept and wait not working on GitHub Actions
All my tests are running and passing as expected locally; however, there is one test that is failing when running on GitHub actions. The error I'm getting is:
CypressError: Timed out retrying after 60000ms:
`cy.wait()` timed out waiting `60000ms`…

ege
- 812
- 6
- 16
1
vote
2 answers
How to capture a network request and replay it with the same headers in Cypress?
I have a Cypress test in which I navigate to a particular page and that page automatically initiates multiple requests. One of the requests fetches the data and displays it on the UI. In my test, I want to capture that request with all the…

Sunny
- 752
- 1
- 11
- 24
1
vote
1 answer
How to automate already registered users scenario in Cypress
I am new to Cypress and trying to automate this below-mentioned scenario using Cypress but I don't have an idea how to do it properly.
Scenario -: A user registers on a system using an email address and again trying to create another account using…

Ravi
- 29
- 6
1
vote
2 answers
Cypress assert values in array
I am trying to assert the value's in an array.
At this moment I made it to assert just the length:
cy.get('@UrlAndAppendices')
.its('request.body.correctionInstructionAppendices')
.should('have.length', 2)
What is the best way to compare…

E. E. Ozkan
- 149
- 10
1
vote
3 answers
Cypress request body interception and compare with a fixture / cont variable?
How can I intercept the entire requestbody and compare this with an fixture?
I tried:
it('Check if Frontend requestbody is the correct', () => {
cy.intercept('GET', '**/api/assessmenttestreference').as('ItemMove')
…

E. E. Ozkan
- 149
- 10
1
vote
1 answer
How to intercept POST request when multiple requests are being made in Cypress?
In my Cypress test, I am trying to intercept a request when logging in.
The password value I am passing to the request is 9K%bZKR8.
What I have observed is that when I click the login button, 2 POST requests are being made:
The 1st request contains…

user9847788
- 2,135
- 5
- 31
- 79
1
vote
2 answers
How to intercept video file in Cypress?
I'm trying to mock static video with cy.intercept
cy.intercept('/video.webm', { fixture: 'videos/video.webm' });
And that doesn't seems to work, it still return actual video instead of fixture one. I Also tried specify encoding binary and null like…

Gerpea
- 309
- 1
- 3
- 13
1
vote
1 answer
Cypress wait() for intercept() is not triggered for NEW URL only
Initiating a visit(), it triggers three fetches before ending up on the final NEW URL.
Each fetches triggers their corresponding wait() - except the NEW URL.
describe('login', () => {
it('login', () => {
…

Rich
- 705
- 9
- 16
1
vote
3 answers
Programmatically check if lazy-loading works
In Angular, it is quite easy to break lazy-loading. For example, all it takes is for someone to carelessly import something from a lazy-loaded module into the app module and this module is eagerly loaded. Therefore, I usually check for such errors…

georg-un
- 1,123
- 13
- 24