Skip to content

Commit

Permalink
Use Cypress Testing Library - consent.spec.ts (#10514)
Browse files Browse the repository at this point in the history
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
  • Loading branch information
luixxiul committed Apr 11, 2023
1 parent c8585be commit 737b30d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cypress/e2e/login/consent.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<SinonStub>("@windowOpen").then((stub) => {
Expand Down

0 comments on commit 737b30d

Please sign in to comment.