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

Commit 2dbaf00

Browse files
authored
Ditch right panel tabs and re-add close button (#99)
* Add extra buttons to room summary card Signed-off-by: Michael Telatynski <[email protected]> * Remove right panel tabs in favour of X button on each panel Signed-off-by: Michael Telatynski <[email protected]> * Update room summary card header to align close button correctly Signed-off-by: Michael Telatynski <[email protected]> * Fix typo in pinned messages heading Signed-off-by: Michael Telatynski <[email protected]> * Update snapshots Signed-off-by: Michael Telatynski <[email protected]> * Update tests Signed-off-by: Michael Telatynski <[email protected]> * Iterate Signed-off-by: Michael Telatynski <[email protected]> * Update snapshots Signed-off-by: Michael Telatynski <[email protected]> * Update screenshot Signed-off-by: Michael Telatynski <[email protected]> * Improve coverage Signed-off-by: Michael Telatynski <[email protected]> * i18n Signed-off-by: Michael Telatynski <[email protected]> * Fix base card title colours Signed-off-by: Michael Telatynski <[email protected]> * Update snapshots Signed-off-by: Michael Telatynski <[email protected]> --------- Signed-off-by: Michael Telatynski <[email protected]>
1 parent 67cb8b7 commit 2dbaf00

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+864
-499
lines changed

playwright/e2e/crypto/crypto.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ test.describe("Cryptography", function () {
220220

221221
// Assert that verified icon is rendered
222222
await page.getByTestId("base-card-back-button").click();
223-
await page.locator(".mx_RightPanelTabs").getByText("Info").click();
223+
await page.getByLabel("Room info").nth(1).click();
224224
await expect(page.locator('.mx_RoomSummaryCard_badges [data-kind="success"]')).toContainText("Encrypted");
225225

226226
// Take a snapshot of RoomSummaryCard with a verified E2EE icon

playwright/e2e/crypto/dehydration.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ test.describe("Dehydration", () => {
9494

9595
await viewRoomSummaryByName(page, app, ROOM_NAME);
9696

97-
await page.locator(".mx_RightPanelTabs").getByText("People").click();
97+
await page.locator(".mx_RightPanel").getByRole("menuitem", { name: "People" }).click();
9898
await expect(page.locator(".mx_MemberList")).toBeVisible();
9999

100100
await getMemberTileByName(page, NAME).click();

playwright/e2e/crypto/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ export const verify = async (app: ElementAppPage, bob: Bot) => {
345345
const bobsVerificationRequestPromise = waitForVerificationRequest(bob);
346346

347347
const roomInfo = await app.toggleRoomInfoPanel();
348-
await page.locator(".mx_RightPanelTabs").getByText("People").click();
348+
await page.locator(".mx_RightPanel").getByRole("menuitem", { name: "People" }).click();
349349
await roomInfo.getByText("Bob").click();
350350
await roomInfo.getByRole("button", { name: "Verify" }).click();
351351
await roomInfo.getByRole("button", { name: "Start Verification" }).click();

playwright/e2e/integration-manager/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ import type { ElementAppPage } from "../../pages/ElementAppPage";
1111
export async function openIntegrationManager(app: ElementAppPage) {
1212
const { page } = app;
1313
await app.toggleRoomInfoPanel();
14-
await page.getByRole("tab", { name: "Extensions" }).click();
14+
await page.getByRole("menuitem", { name: "Extensions" }).click();
1515
await page.getByRole("button", { name: "Add extensions" }).click();
1616
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ test.describe("Lazy Loading", () => {
7373
async function openMemberlist(app: ElementAppPage): Promise<void> {
7474
await app.toggleRoomInfoPanel();
7575
const { page } = app;
76-
await page.locator(".mx_RightPanelTabs").getByText("People").click();
76+
await page.locator(".mx_RightPanel").getByRole("menuitem", { name: "People" }).click();
7777
}
7878

7979
function getMemberInMemberlist(page: Page, name: string): Locator {

playwright/e2e/read-receipts/index.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,10 +394,7 @@ class Helpers {
394394
* Close the threads panel.
395395
*/
396396
async closeThreadsPanel() {
397-
await this.page.locator(".mx_RoomHeader").getByLabel("Threads").click();
398-
if (await this.page.locator("#thread-panel").isVisible()) {
399-
await this.page.locator(".mx_RoomHeader").getByLabel("Threads").click();
400-
}
397+
await this.page.locator(".mx_RightPanel").getByTestId("base-card-close-button").click();
401398
await expect(this.page.locator(".mx_RightPanel")).not.toBeVisible();
402399
}
403400

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ test.describe("RightPanel", () => {
6565
test("should handle clicking add widgets", async ({ page, app }) => {
6666
await viewRoomSummaryByName(page, app, ROOM_NAME);
6767

68-
await page.getByRole("tab", { name: "Extensions" }).click();
68+
await page.getByRole("menuitem", { name: "Extensions" }).click();
6969
await page.getByRole("button", { name: "Add extensions" }).click();
7070
await expect(page.locator(".mx_IntegrationManager")).toBeVisible();
7171
});
@@ -106,7 +106,7 @@ test.describe("RightPanel", () => {
106106
test("should handle viewing room member", async ({ page, app }) => {
107107
await viewRoomSummaryByName(page, app, ROOM_NAME);
108108

109-
await page.locator(".mx_RightPanelTabs").getByText("People").click();
109+
await page.locator(".mx_RightPanel").getByRole("menuitem", { name: "People" }).click();
110110
await expect(page.locator(".mx_MemberList")).toBeVisible();
111111

112112
await getMemberTileByName(page, NAME).click();
@@ -116,7 +116,7 @@ test.describe("RightPanel", () => {
116116
await page.getByTestId("base-card-back-button").click();
117117
await expect(page.locator(".mx_MemberList")).toBeVisible();
118118

119-
await page.locator(".mx_RightPanelTabs").getByText("Info").click();
119+
await page.getByLabel("Room info").nth(1).click();
120120
await checkRoomSummaryCard(page, ROOM_NAME);
121121
});
122122
});

playwright/e2e/spaces/threads-activity-centre/index.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -328,13 +328,6 @@ export class Helpers {
328328
return expect(this.page.locator(".mx_ThreadPanel")).toBeVisible();
329329
}
330330

331-
/**
332-
* Assert that the thread tab is focused
333-
*/
334-
assertThreadTabFocused() {
335-
return expect(this.page.locator("#thread-panel-tab")).toBeFocused();
336-
}
337-
338331
/**
339332
* Populate the rooms with messages and threads
340333
* @param room1

playwright/e2e/spaces/threads-activity-centre/threadsActivityCentre.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,6 @@ test.describe("Threads Activity Centre", () => {
157157
await util.openTac();
158158
await util.clickRoomInTac(room1.name);
159159

160-
await util.assertThreadTabFocused();
160+
await util.assertThreadPanelIsOpened();
161161
});
162162
});
Loading

0 commit comments

Comments
 (0)