https://cypress.io logo
Hi all, I am e2e testing and want to mock server r...
# e2e-testing
g
Hi all, I am e2e testing and want to mock server requests using cy.intercept(). I am confused as to why the CommandLog displays the route *not stubbed. Here is the test:
Copy code
describe('visit and interact with home page', () => {
    beforeEach(() => {
        cy.intercept('GET', 'http://localhost:3001/api/post?*').as('getPosts')
    })

    it('visit homepage', () => {
        cy.visit('/')
    })
})
And here is what the CommandLog displays: