From a2c2c01edc02c45b8ab93d18b74274d19d0af495 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Thu, 13 Apr 2023 06:27:39 +0000 Subject: [PATCH] Update get-openid-token.spec.ts - use Cypress Testing Library (#10586) Signed-off-by: Suguru Hirahara --- .../e2e/integration-manager/get-openid-token.spec.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cypress/e2e/integration-manager/get-openid-token.spec.ts b/cypress/e2e/integration-manager/get-openid-token.spec.ts index f7b3eeaeca..c1026a5787 100644 --- a/cypress/e2e/integration-manager/get-openid-token.spec.ts +++ b/cypress/e2e/integration-manager/get-openid-token.spec.ts @@ -59,15 +59,13 @@ const INTEGRATION_MANAGER_HTML = ` `; function openIntegrationManager() { - cy.get(".mx_RightPanel_roomSummaryButton").click(); - cy.get(".mx_RoomSummaryCard_appsGroup").within(() => { - cy.contains("Add widgets, bridges & bots").click(); - }); + cy.findByRole("tab", { name: "Room info" }).click(); + cy.findByRole("button", { name: "Add widgets, bridges & bots" }).click(); } function sendActionFromIntegrationManager(integrationManagerUrl: string) { cy.accessIframe(`iframe[src*="${integrationManagerUrl}"]`).within(() => { - cy.get("#send-action").should("exist").click(); + cy.findByRole("button", { name: "Press to send action" }).should("exist").click(); }); } @@ -134,7 +132,9 @@ describe("Integration Manager: Get OpenID Token", () => { sendActionFromIntegrationManager(integrationManagerUrl); cy.accessIframe(`iframe[src*="${integrationManagerUrl}"]`).within(() => { - cy.get("#message-response").should("include.text", "access_token"); + cy.get("#message-response").within(() => { + cy.findByText(/access_token/); + }); }); }); });