I have a case checked about forcing HTTPS in my application, When start forcing HTTPS all HTTP requests will be redirected to HTTPS and back.
Which Cypress API can help me figure out them? Thanks.
I have a case checked about forcing HTTPS in my application, When start forcing HTTPS all HTTP requests will be redirected to HTTPS and back.
Which Cypress API can help me figure out them? Thanks.
This will help others.
// expect http
cy.visit(Cypress.env('environment'))
cy.location().should((loc) => {
expect(loc.protocol).to.eq('http:')
})
// expect https
cy.visit(Cypress.env('environment'))
cy.location().should((loc) => {
expect(loc.protocol).to.eq('https:')
})