Update events.spec.ts - use Cypress Testing Library (#10590)

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
This commit is contained in:
Suguru Hirahara 2023-04-20 09:33:31 +00:00 committed by GitHub
parent 1efa82917a
commit 6b211dd602
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -159,7 +159,9 @@ describe("Widget Events", () => {
cy.viewRoomByName(ROOM_NAME);
// approve capabilities
cy.contains(".mx_WidgetCapabilitiesPromptDialog button", "Approve").click();
cy.get(".mx_WidgetCapabilitiesPromptDialog").within(() => {
cy.findByRole("button", { name: "Approve" }).click();
});
cy.all([cy.get<string>("@widgetEventSent"), cy.get<string>("@layoutEventSent")]).then(async () => {
// bot creates a new room with 'm.room.topic'