From fb11f43cc247b68ba21fee911d061249bf3ca918 Mon Sep 17 00:00:00 2001 From: Victor Zeinstra Date: Thu, 19 Dec 2024 09:48:05 +0100 Subject: [PATCH] fix: test e2e (#6378) Co-authored-by: victor --- .../cypress/integration/light/fiche-ministere-travail.spec.ts | 1 + .../cypress/integration/light/fiche-service-public.spec.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/code-du-travail-frontend/cypress/integration/light/fiche-ministere-travail.spec.ts b/packages/code-du-travail-frontend/cypress/integration/light/fiche-ministere-travail.spec.ts index db32e956a6..57ebd9d2c8 100644 --- a/packages/code-du-travail-frontend/cypress/integration/light/fiche-ministere-travail.spec.ts +++ b/packages/code-du-travail-frontend/cypress/integration/light/fiche-ministere-travail.spec.ts @@ -18,6 +18,7 @@ describe("Page Ministère du travail", () => { "/fiche-ministere-travail/la-demission#quelle-est-la-situation-du-salarie-a-la-fin-du-contrat" ); cy.findByRole("heading", { level: 1 }).should("have.text", "La démission"); + cy.findByRole("heading", { level: 1 }).click(); cy.get('[aria-expanded="true"]', { timeout: 10000 }) .get("h2") .should( diff --git a/packages/code-du-travail-frontend/cypress/integration/light/fiche-service-public.spec.ts b/packages/code-du-travail-frontend/cypress/integration/light/fiche-service-public.spec.ts index 0dfd11f9f2..07e86df69a 100644 --- a/packages/code-du-travail-frontend/cypress/integration/light/fiche-service-public.spec.ts +++ b/packages/code-du-travail-frontend/cypress/integration/light/fiche-service-public.spec.ts @@ -24,6 +24,7 @@ describe("Fiche Service public", () => { it("je vois une fiche service public avec un accordéon ouvert", () => { cy.visit("/fiche-service-public/salaire-primes-et-avantages#salaire"); + cy.findAllByRole("heading", { level: 1 }).click(); cy.get("h2").get('[aria-expanded="true"]').should("contain", "Salaire"); }); });