cypress best practices updated

This commit is contained in:
Owen Rees
2023-06-20 08:42:03 +02:00
parent ffbc8db21d
commit f1ef7cd3f2
13 changed files with 60 additions and 91 deletions
+11 -5
View File
@@ -4,11 +4,11 @@ import Contact from "@/app/contactez-nous/page";
const navbarFooterCheck = () => {
it("includes navbar", () => {
cy.get("nav");
cy.get("[data-cy='navbar']");
});
it("includes footer", () => {
cy.get("footer");
cy.get("[data-cy='footer']");
});
};
@@ -19,7 +19,9 @@ describe("Verify component mount", () => {
});
it("correct h1 tags with website name included", () => {
cy.get("h1").contains("echecs france", { matchCase: false });
cy.get("[data-cy='header1']").contains("echecs france", {
matchCase: false,
});
});
navbarFooterCheck();
@@ -31,7 +33,9 @@ describe("Verify component mount", () => {
});
it("correct h1 tags with page title included", () => {
cy.get("h2").contains("qui sommes-nous", { matchCase: false });
cy.get("[data-cy='header2']").contains("qui sommes-nous", {
matchCase: false,
});
});
navbarFooterCheck();
@@ -43,7 +47,9 @@ describe("Verify component mount", () => {
});
it("correct h1 tags with page title included", () => {
cy.get("h2").contains("contactez-nous", { matchCase: false });
cy.get("[data-cy='header2']").contains("contactez-nous", {
matchCase: false,
});
});
navbarFooterCheck();