Skip to content

Commit 391e189

Browse files
committed
test(e2e): add test for cider mention
1 parent b32b6d9 commit 391e189

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

playwright/e2e/composer/CIDER.spec.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ const CtrlOrMeta = process.platform === "darwin" ? "Meta" : "Control";
1414
test.describe("Composer", () => {
1515
test.use({
1616
displayName: "Janet",
17+
botCreateOpts: {
18+
displayName: "Bob",
19+
},
1720
});
1821

1922
test.use({
@@ -94,5 +97,22 @@ test.describe("Composer", () => {
9497
).toBeVisible();
9598
});
9699
});
100+
101+
test("can send mention", { tag: "@screenshot" }, async ({ page, bot, app }) => {
102+
// Set up a private room so we have another user to mention
103+
await app.client.createRoom({
104+
is_direct: true,
105+
invite: [bot.credentials.userId],
106+
});
107+
await app.viewRoomByName("Bob");
108+
109+
const composer = page.getByRole("textbox", { name: "Send an unencrypted message…" });
110+
await composer.pressSequentially("@bob");
111+
await page.getByRole("option", { name: "Bob" }).click();
112+
await expect(composer.getByText("Bob")).toBeVisible();
113+
await expect(composer).toMatchScreenshot("mention.png");
114+
await composer.press("Enter");
115+
await expect(page.locator(".mx_EventTile_body", { hasText: "Bob" })).toBeVisible();
116+
});
97117
});
98118
});

0 commit comments

Comments
 (0)