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', () => {
cy.intercept('/_next/static/development/_devMiddlewareManifest.json').as('fetch1')
cy.intercept('http://localhost:3333/auth/works/token-check').as('fetch2')
cy.intercept('/_next/static/development/_devPagesManifest.json').as('fetch3')
cy.intercept('http://localhost:3002/login').as('login')
cy.visit('/')
// cy.wait(['@fetch1', '@fetch2', '@fetch3', '@login'])
cy.wait('@fetch1')
cy.wait('@fetch2')
cy.wait('@fetch3')
// cy.wait('@login')
cy.wait('@login', {
requestTimeout: 10000
})
cy.url().should('include', '/login')
})
})