Created
September 26, 2021 17:52
-
-
Save riccardogiorato/fe047b9db2b87b471d1be637484a09b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const baseUrlTesla = "https://www.tesla.com/"; | |
const urlHttpsWww = "https://www.tesla.com/"; | |
it(urlHttpsWww + " end location", () => { | |
cy.visit(urlHttpsWww); | |
cy.url().should("eq", baseUrlTesla); | |
}); | |
it("200 homepage response", () => { | |
cy.request({ | |
url: urlHttpsWww, | |
followRedirect: false, | |
}).then((resp) => { | |
expect(resp.status).to.eq(200); | |
expect(resp.redirectedToUrl).to.eq(undefined); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment