Skip to content

Instantly share code, notes, and snippets.

@riccardogiorato
Created September 26, 2021 17:52
Show Gist options
  • Save riccardogiorato/fe047b9db2b87b471d1be637484a09b3 to your computer and use it in GitHub Desktop.
Save riccardogiorato/fe047b9db2b87b471d1be637484a09b3 to your computer and use it in GitHub Desktop.
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