Skip to content

Commit cdedcc0

Browse files
authored
Adds tooltip for compose menu (#31122)
* Adds tooltip for compose menu button * fix tests * prettier * tweak aria attributes
1 parent b679693 commit cdedcc0

File tree

14 files changed

+72
-42
lines changed

14 files changed

+72
-42
lines changed

playwright/e2e/crypto/backups-mas.spec.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ test.describe("Encryption state after registration", () => {
4949
"Pa$sW0rD!",
5050
);
5151

52-
await page.getByRole("navigation", { name: "Room list" }).getByRole("button", { name: "Add" }).click();
52+
await page
53+
.getByRole("navigation", { name: "Room list" })
54+
.getByRole("button", { name: "New conversation" })
55+
.click();
5356
await page.getByRole("menuitem", { name: "New room" }).click();
5457
await page.getByRole("textbox", { name: "Name" }).fill("test room");
5558
await page.getByRole("button", { name: "Create room" }).click();
@@ -78,7 +81,10 @@ test.describe("Key backup reset from elsewhere", () => {
7881
await page.getByRole("button", { name: "Continue" }).click();
7982
await registerAccountMas(page, mailpitClient, testUsername, `${testUsername}@email.com`, testPassword);
8083

81-
await page.getByRole("navigation", { name: "Room list" }).getByRole("button", { name: "Add" }).click();
84+
await page
85+
.getByRole("navigation", { name: "Room list" })
86+
.getByRole("button", { name: "New conversation" })
87+
.click();
8288
await page.getByRole("menuitem", { name: "New room" }).click();
8389
await page.getByRole("textbox", { name: "Name" }).fill("test room");
8490
await page.getByRole("button", { name: "Create room" }).click();

playwright/e2e/crypto/crypto.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const checkDMRoom = async (page: Page) => {
2121
};
2222

2323
const startDMWithBob = async (page: Page, bob: Bot) => {
24-
await page.getByRole("navigation", { name: "Room list" }).getByRole("button", { name: "Add" }).click();
24+
await page.getByRole("navigation", { name: "Room list" }).getByRole("button", { name: "New conversation" }).click();
2525
await page.getByRole("menuitem", { name: "Start chat" }).click();
2626
await page.getByTestId("invite-dialog-input").fill(bob.credentials.userId);
2727
await page.getByRole("option", { name: bob.credentials.displayName }).click();

playwright/e2e/crypto/toasts.spec.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ test.describe("Key storage out of sync toast", () => {
2323
await deleteCachedSecrets(page);
2424

2525
// We won't be prompted for crypto setup unless we have an e2e room, so make one
26-
await page.getByRole("navigation", { name: "Room list" }).getByRole("button", { name: "Add" }).click();
26+
await page
27+
.getByRole("navigation", { name: "Room list" })
28+
.getByRole("button", { name: "New conversation" })
29+
.click();
2730
await page.getByRole("menuitem", { name: "New room" }).click();
2831
await page.getByRole("textbox", { name: "Name" }).fill("Test room");
2932
await page.getByRole("button", { name: "Create room" }).click();
@@ -68,7 +71,10 @@ test.describe("'Turn on key storage' toast", () => {
6871
await logIntoElementAndVerify(page, credentials, recoveryKey.encodedPrivateKey);
6972

7073
// We won't be prompted for crypto setup unless we have an e2e room, so make one
71-
await page.getByRole("navigation", { name: "Room list" }).getByRole("button", { name: "Add" }).click();
74+
await page
75+
.getByRole("navigation", { name: "Room list" })
76+
.getByRole("button", { name: "New conversation" })
77+
.click();
7278
await page.getByRole("menuitem", { name: "New room" }).click();
7379
await page.getByRole("textbox", { name: "Name" }).fill("Test room");
7480
await page.getByRole("button", { name: "Create room" }).click();

playwright/e2e/crypto/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ export async function sendMessageInCurrentRoom(page: Page, message: string): Pro
438438
* @param isEncrypted - Whether the room should be encrypted
439439
*/
440440
export async function createRoom(page: Page, roomName: string, isEncrypted: boolean): Promise<void> {
441-
await page.getByRole("navigation", { name: "Room list" }).getByRole("button", { name: "Add" }).click();
441+
await page.getByRole("navigation", { name: "Room list" }).getByRole("button", { name: "New conversation" }).click();
442442
await page.getByRole("menuitem", { name: "New room" }).click();
443443

444444
const dialog = page.locator(".mx_Dialog");

playwright/e2e/invite/invite-dialog.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ test.describe("Invite dialog", function () {
7373
"should support inviting a user to Direct Messages",
7474
{ tag: "@screenshot" },
7575
async ({ page, app, user, bot }) => {
76-
await page.getByRole("navigation", { name: "Room list" }).getByRole("button", { name: "Add" }).click();
76+
await page
77+
.getByRole("navigation", { name: "Room list" })
78+
.getByRole("button", { name: "New conversation" })
79+
.click();
7780
await page.getByRole("menuitem", { name: "Start chat" }).click();
7881

7982
const other = page.locator(".mx_InviteDialog_other");

playwright/e2e/left-panel/room-list-panel/room-list-header.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ test.describe("Header section of the room list", () => {
3030
const roomListHeader = getHeaderSection(page);
3131
await expect(roomListHeader).toMatchScreenshot("room-list-header.png");
3232

33-
const composeMenu = roomListHeader.getByRole("button", { name: "Add" });
33+
const composeMenu = roomListHeader.getByRole("button", { name: "New conversation" });
3434
await composeMenu.click();
3535

3636
await expect(page.getByRole("menu")).toMatchScreenshot("room-list-header-compose-menu.png");
@@ -55,7 +55,7 @@ test.describe("Header section of the room list", () => {
5555
await expect(roomListHeader).toMatchScreenshot("room-list-space-header.png");
5656

5757
await expect(roomListHeader.getByRole("heading", { name: "MySpace" })).toBeVisible();
58-
await expect(roomListHeader.getByRole("button", { name: "Add" })).toBeVisible();
58+
await expect(roomListHeader.getByRole("button", { name: "New conversation" })).toBeVisible();
5959

6060
const spaceMenu = roomListHeader.getByRole("button", { name: "Open space menu" });
6161
await spaceMenu.click();

playwright/e2e/left-panel/room-list-panel/room-list.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,10 @@ test.describe("Room list", () => {
315315
});
316316

317317
test("should be a video room", { tag: "@screenshot" }, async ({ page, app, user }) => {
318-
await page.getByRole("navigation", { name: "Room list" }).getByRole("button", { name: "Add" }).click();
318+
await page
319+
.getByRole("navigation", { name: "Room list" })
320+
.getByRole("button", { name: "New conversation" })
321+
.click();
319322
await page.getByRole("menuitem", { name: "New video room" }).click();
320323
await page.getByRole("textbox", { name: "Name" }).fill("video room");
321324
await page.getByRole("button", { name: "Create video room" }).click();

playwright/e2e/room/create-room.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ test.describe("Create Room", () => {
4545
);
4646

4747
test("should allow us to start a chat and show encryption state", async ({ page, user, app }) => {
48-
await page.getByRole("button", { name: "Add", exact: true }).click();
48+
await page.getByRole("button", { name: "New conversation", exact: true }).click();
4949
await page.getByRole("menuitem", { name: "Start chat" }).click();
5050

5151
await page.getByTestId("invite-dialog-input").fill(user.userId);

playwright/e2e/voip/element-call.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,10 @@ test.describe("Element Call", () => {
398398
},
399399
});
400400
test("should be able to create and join a video room", async ({ page, user }) => {
401-
await page.getByRole("navigation", { name: "Room list" }).getByRole("button", { name: "Add" }).click();
401+
await page
402+
.getByRole("navigation", { name: "Room list" })
403+
.getByRole("button", { name: "New conversation" })
404+
.click();
402405
await page.getByRole("menuitem", { name: "New video room" }).click();
403406
await page.getByRole("textbox", { name: "Name" }).fill("Test room");
404407
await page.getByRole("button", { name: "Create video room" }).click();

playwright/pages/ElementAppPage.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ export class ElementAppPage {
5353
*/
5454

5555
public async openCreateRoomDialog(roomKindname: "New room" | "New video room" = "New room"): Promise<Locator> {
56-
await this.page.getByRole("navigation", { name: "Room list" }).getByRole("button", { name: "Add" }).click();
56+
await this.page
57+
.getByRole("navigation", { name: "Room list" })
58+
.getByRole("button", { name: "New conversation" })
59+
.click();
5760
await this.page.getByRole("menuitem", { name: roomKindname }).click();
5861
return this.page.locator(".mx_CreateRoomDialog");
5962
}

0 commit comments

Comments
 (0)