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

Commit 4b1b9b1

Browse files
authored
Update roles cypress is looking for (#10708)
* Update roles cypress is looking for * Fix sliding sync test
1 parent 621fdf1 commit 4b1b9b1

File tree

6 files changed

+6
-8
lines changed

6 files changed

+6
-8
lines changed

cypress/e2e/integration-manager/send_event.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const INTEGRATION_MANAGER_HTML = `
6767
`;
6868

6969
function openIntegrationManager() {
70-
cy.findByRole("tab", { name: "Room info" }).click();
70+
cy.findByRole("button", { name: "Room info" }).click();
7171
cy.get(".mx_RoomSummaryCard_appsGroup").within(() => {
7272
cy.findByRole("button", { name: "Add widgets, bridges & bots" }).click();
7373
});

cypress/e2e/lazy-loading/lazy-loading.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ describe("Lazy Loading", () => {
117117

118118
function openMemberlist(): void {
119119
cy.get(".mx_HeaderButtons").within(() => {
120-
cy.findByRole("tab", { name: "Room info" }).click();
120+
cy.findByRole("button", { name: "Room info" }).click();
121121
});
122122

123123
cy.get(".mx_RoomSummaryCard").within(() => {

cypress/e2e/polls/pollHistory.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ describe("Poll history", () => {
7575
};
7676

7777
function openPollHistory(): void {
78-
cy.findByRole("tab", { name: "Room info" }).click();
78+
cy.findByRole("button", { name: "Room info" }).click();
7979
cy.get(".mx_RoomSummaryCard").within(() => {
8080
cy.findByRole("button", { name: "Poll history" }).click();
8181
});

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const NAME = "Alice";
2424

2525
const viewRoomSummaryByName = (name: string): Chainable<JQuery<HTMLElement>> => {
2626
cy.viewRoomByName(name);
27-
cy.findByRole("tab", { name: "Room info" }).click();
27+
cy.findByRole("button", { name: "Room info" }).click();
2828
return checkRoomSummaryCard(name);
2929
};
3030

cypress/e2e/sliding-sync/sliding-sync.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,7 @@ describe("Sliding Sync", () => {
241241
});
242242

243243
it("should update user settings promptly", () => {
244-
cy.findByRole("button", { name: "User menu" }).click();
245-
cy.findByRole("menuitem", { name: "All settings" }).click();
246-
cy.findByRole("button", { name: "Preferences" }).click();
244+
cy.openUserSettings("Preferences");
247245
cy.contains(".mx_SettingsFlag", "Show timestamps in 12 hour format")
248246
.should("exist")
249247
.find(".mx_ToggleSwitch_on")

cypress/e2e/threads/threads.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ describe("Threads", () => {
295295
cy.get(".mx_ThreadSummary_content").findByText("How are things?").should("exist");
296296
});
297297

298-
cy.findByRole("tab", { name: "Threads" })
298+
cy.findByRole("button", { name: "Threads" })
299299
.should("have.class", "mx_RightPanel_headerButton_unread") // User asserts thread list unread indicator
300300
.click(); // User opens thread list
301301

0 commit comments

Comments
 (0)