diff --git a/cypress/e2e/login/consent.spec.ts b/cypress/e2e/login/consent.spec.ts index 1831e090ac..32f4e0f033 100644 --- a/cypress/e2e/login/consent.spec.ts +++ b/cypress/e2e/login/consent.spec.ts @@ -46,8 +46,10 @@ describe("Consent", () => { // Accept terms & conditions cy.get(".mx_QuestionDialog").within(() => { - cy.contains("#mx_BaseDialog_title", "Terms and Conditions"); - cy.get(".mx_Dialog_primary").click(); + cy.get("#mx_BaseDialog_title").within(() => { + cy.findByText("Terms and Conditions"); + }); + cy.findByRole("button", { name: "Review terms and conditions" }).click(); }); cy.get("@windowOpen").then((stub) => {