Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit a81940b

Browse files
authored
Update existing Cypress tests - use Cypress Testing Library (#10755)
Signed-off-by: Suguru Hirahara <[email protected]>
1 parent 58c942b commit a81940b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

cypress/e2e/crypto/crypto.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ interface CryptoTestContext extends Mocha.Context {
2727
}
2828

2929
const openRoomInfo = () => {
30-
cy.get(".mx_RightPanel_roomSummaryButton").click();
30+
cy.findByRole("button", { name: "Room info" }).click();
3131
return cy.get(".mx_RightPanel");
3232
};
3333

cypress/e2e/crypto/decryption-failure.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const handleVerificationRequest = (request: VerificationRequest): Chainable<Emoj
6060
const checkTimelineNarrow = (button = true) => {
6161
cy.viewport(800, 600); // SVGA
6262
cy.get(".mx_LeftPanel_minimized").should("exist"); // Wait until the left panel is minimized
63-
cy.get(".mx_RightPanel_roomSummaryButton").click(); // Open the right panel to make the timeline narrow
63+
cy.findByRole("button", { name: "Room info" }).click(); // Open the right panel to make the timeline narrow
6464
cy.get(".mx_BaseCard").should("exist");
6565

6666
// Ensure the failure bar does not cover the timeline
@@ -74,7 +74,7 @@ const checkTimelineNarrow = (button = true) => {
7474
cy.get("[data-testid='decryption-failure-bar-button']:last-of-type").should("be.visible");
7575
}
7676

77-
cy.get(".mx_RightPanel_roomSummaryButton").click(); // Close the right panel
77+
cy.findByRole("button", { name: "Room info" }).click(); // Close the right panel
7878
cy.get(".mx_BaseCard").should("not.exist");
7979
cy.viewport(1000, 660); // Reset to the default size
8080
};

cypress/e2e/right-panel/right-panel.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const getMemberTileByName = (name: string): Chainable<JQuery<HTMLElement>> => {
2929

3030
const viewRoomSummaryByName = (name: string): Chainable<JQuery<HTMLElement>> => {
3131
cy.viewRoomByName(name);
32-
cy.get(".mx_RightPanel_roomSummaryButton").click();
32+
cy.findByRole("button", { name: "Room info" }).click();
3333
return checkRoomSummaryCard(name);
3434
};
3535

0 commit comments

Comments
 (0)