Update get-openid-token.spec.ts - use Cypress Testing Library (#10586)

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
t3chguy/dedup-icons-17oct
Suguru Hirahara 2023-04-13 06:27:39 +00:00 committed by GitHub
parent 747afec27e
commit a2c2c01edc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -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/);
});
});
});
});