Use Cypress Testing Library - consent.spec.ts (#10514)

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
This commit is contained in:
Suguru Hirahara 2023-04-11 06:13:30 +00:00 committed by GitHub
parent c8585be2f8
commit 737b30d2fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) => {