test(e2e): fix existing test

This commit is contained in:
Florian Duros 2026-03-31 12:12:40 +02:00
parent 2972b90028
commit 556fc8956b
No known key found for this signature in database
GPG Key ID: A5BBB4041B493F15
4 changed files with 5 additions and 6 deletions

View File

@ -40,7 +40,6 @@ test.describe("Topic links", () => {
"",
);
await page.goto(`#/room/${room.roomId}`);
await expect(page.getByTestId("topic").getByRole("link", { name: link })).toBeVisible();
const locator = await app.toggleRoomInfoPanel();
await expect(locator.getByRole("link", { name: link })).toBeVisible();
});

View File

@ -58,7 +58,7 @@ test.describe("Create Room", () => {
await page.getByRole("button", { name: "Go" }).click();
await expect(page.getByText("Encryption enabled")).toBeVisible();
await expect(page.getByText("Send your first message to")).toBeVisible();
await expect(page.getByText("This is the beginning of your direct message history with")).toBeVisible();
const composer = page.getByRole("region", { name: "Message composer" });
await expect(composer.getByRole("textbox", { name: "Send a message…" })).toBeVisible();

View File

@ -344,7 +344,7 @@ test.describe("Spaces", () => {
await page.getByRole("button", { name: "View", exact: true }).click();
// Assert we get shown the new room intro, and thus not the soft crash screen
await expect(page.locator(".mx_NewRoomIntro")).toBeVisible();
await expect(page.getByTestId("start-chat-view")).toBeVisible();
});
test("should render spaces view", { tag: "@screenshot" }, async ({ page, app, user, axe }) => {

View File

@ -1272,7 +1272,7 @@ test.describe("Timeline", () => {
// Scroll to the bottom to take a snapshot of the whole viewport
await app.timeline.scrollToBottom();
// Assert that both avatar in the introduction and the last message are visible at the same time
await expect(page.locator(".mx_NewRoomIntro .mx_BaseAvatar")).toBeVisible();
await expect(page.getByTestId("start-chat-view").locator(".mx_BaseAvatar")).toBeVisible();
const lastEventTileIrc = page.locator(".mx_EventTile_last[data-layout='irc']");
await expect(lastEventTileIrc.locator(".mx_MTextBody").first()).toBeVisible();
await expect(lastEventTileIrc.getByRole("status")).toHaveAccessibleName("Your message was sent"); // rendered at the bottom of EventTile
@ -1285,7 +1285,7 @@ test.describe("Timeline", () => {
// Make sure the strings do not overflow on modern layout
await app.settings.setValue("layout", null, SettingLevel.DEVICE, Layout.Group);
await app.timeline.scrollToBottom(); // Scroll again in case
await expect(page.locator(".mx_NewRoomIntro .mx_BaseAvatar")).toBeVisible();
await expect(page.getByTestId("start-chat-view").locator(".mx_BaseAvatar")).toBeVisible();
const lastEventTileGroup = page.locator(".mx_EventTile_last[data-layout='group']");
await expect(lastEventTileGroup.locator(".mx_MTextBody").first()).toBeVisible();
await expect(lastEventTileGroup.getByRole("status")).toHaveAccessibleName("Your message was sent");
@ -1297,7 +1297,7 @@ test.describe("Timeline", () => {
// Make sure the strings do not overflow on bubble layout
await app.settings.setValue("layout", null, SettingLevel.DEVICE, Layout.Bubble);
await app.timeline.scrollToBottom(); // Scroll again in case
await expect(page.locator(".mx_NewRoomIntro .mx_BaseAvatar")).toBeVisible();
await expect(page.getByTestId("start-chat-view").locator(".mx_BaseAvatar")).toBeVisible();
const lastEventTileBubble = page.locator(".mx_EventTile_last[data-layout='bubble']");
await expect(lastEventTileBubble.locator(".mx_MTextBody").first()).toBeVisible();
await expect(lastEventTileBubble.getByRole("status")).toHaveAccessibleName("Your message was sent");