mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-10 14:46:25 +02:00
test(e2e): fix existing test
This commit is contained in:
parent
2972b90028
commit
556fc8956b
@ -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();
|
||||
});
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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 }) => {
|
||||
|
||||
@ -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");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user