From c8d32c6acca1b8248bfbf05c32977ac6cbdbb67b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20LUDWIG?= Date: Sun, 28 Jan 2024 16:13:02 +0100 Subject: [PATCH] test: correct selector for Main Title of page --- cypress/e2e/common/Header.cy.ts | 2 +- cypress/e2e/pages/blog/[slug].cy.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/common/Header.cy.ts b/cypress/e2e/common/Header.cy.ts index cafae7f..8907e9e 100644 --- a/cypress/e2e/common/Header.cy.ts +++ b/cypress/e2e/common/Header.cy.ts @@ -53,7 +53,7 @@ describe("Common > Header", () => { cy.get("[data-cy=locales-list]").should("not.be.visible") cy.get("[data-cy=locale-click]").click() cy.get("[data-cy=locales-list]").should("be.visible") - cy.get("h1").click() + cy.get("main h1").click() cy.get("[data-cy=locales-list]").should("not.be.visible") }) }) diff --git a/cypress/e2e/pages/blog/[slug].cy.ts b/cypress/e2e/pages/blog/[slug].cy.ts index 20ec423..259b354 100644 --- a/cypress/e2e/pages/blog/[slug].cy.ts +++ b/cypress/e2e/pages/blog/[slug].cy.ts @@ -2,7 +2,7 @@ describe("Page /blog/[slug]", () => { it("should displays the first blog post (`hello-world`)", () => { cy.visit("/blog/hello-world") cy.get("[data-cy=locale-flag-text]").should("not.exist") - cy.get("h1").should("have.text", "👋 Hello, world!") + cy.get("main h1").should("have.text", "👋 Hello, world!") cy.get(".prose a:visible").should("have.attr", "target", "_blank") })