From cf99ac3330af7ea0f618e27d6196cbbf12c90fb5 Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 19 Nov 2024 12:43:32 -0400 Subject: [PATCH] fix(RMS test): make test less flaky by asserting the language has changed before checking the format (#1995) Co-authored-by: Steve Astels --- .../e2e/admin/components/remaining_messages_summary.cy.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests_cypress/cypress/e2e/admin/components/remaining_messages_summary.cy.js b/tests_cypress/cypress/e2e/admin/components/remaining_messages_summary.cy.js index 13095a7bb..ae9d435d2 100644 --- a/tests_cypress/cypress/e2e/admin/components/remaining_messages_summary.cy.js +++ b/tests_cypress/cypress/e2e/admin/components/remaining_messages_summary.cy.js @@ -64,6 +64,7 @@ describe("Remaining Messages Summary Component", () => { it("shows thousands separator in FR for today’s remaining", () => { cy.get("#header-lang").click(); + cy.get("html").should("have.attr", "lang", "fr"); cy.visit(PageURL); RMS.Below() .find('*[data-testid="rms"]') @@ -82,6 +83,7 @@ describe("Remaining Messages Summary Component", () => { it("shows thousands separator in FR for the year’s remaining", () => { cy.get("#header-lang").click(); + cy.get("html").should("have.attr", "lang", "fr"); cy.visit(PageURL); RMS.Below() .find('*[data-testid="rms"]')