diff --git a/playwright/e2e/audio-player/audio-player.spec.ts b/playwright/e2e/audio-player/audio-player.spec.ts index 89d2002ed6..a6d920dcb8 100644 --- a/playwright/e2e/audio-player/audio-player.spec.ts +++ b/playwright/e2e/audio-player/audio-player.spec.ts @@ -253,7 +253,6 @@ test.describe("Audio player", { tag: ["@no-firefox", "@no-webkit"] }, () => { // Find and click "Reply" button const clickButtonReply = async () => { - await tile.scrollIntoViewIfNeeded(); await tile.hover(); await tile.getByRole("button", { name: "Reply", exact: true }).click(); }; diff --git a/playwright/e2e/composer/RTE.spec.ts b/playwright/e2e/composer/RTE.spec.ts index 418f28e126..3b750000c5 100644 --- a/playwright/e2e/composer/RTE.spec.ts +++ b/playwright/e2e/composer/RTE.spec.ts @@ -79,9 +79,8 @@ test.describe("Composer", () => { // Enter some more text, then send the message await page.getByRole("textbox").pressSequentially("this is the spoiler text "); await page.getByRole("button", { name: "Send message" }).click(); - // Check that a spoiler item has appeared in the timeline and locator the spoiler command text - await expect(page.locator("button.mx_EventTile_spoiler")).toBeVisible(); - await expect(page.getByText("this is the spoiler text")).toBeVisible(); + // Check that a spoiler item has appeared in the timeline and contains the spoiler text + await expect(page.locator("button.mx_EventTile_spoiler")).toHaveText("this is the spoiler text"); }); }); }); diff --git a/playwright/e2e/login/soft_logout.spec.ts b/playwright/e2e/login/soft_logout.spec.ts index cb8f832f9d..884dd3fee6 100644 --- a/playwright/e2e/login/soft_logout.spec.ts +++ b/playwright/e2e/login/soft_logout.spec.ts @@ -32,7 +32,9 @@ test.describe("Soft logout", () => { // back to the welcome page await expect(page).toHaveURL(/\/#\/home/); - await expect(page.getByRole("heading", { name: `Welcome ${user.userId}`, exact: true })).toBeVisible(); + await expect( + page.getByRole("heading", { name: "Now, let's help you get started", exact: true }), + ).toBeVisible(); }); test("still shows the soft-logout page when the page is reloaded after a soft-logout", async ({ diff --git a/playwright/e2e/read-receipts/high-level.spec.ts b/playwright/e2e/read-receipts/high-level.spec.ts index afd790fdb8..627b2d348d 100644 --- a/playwright/e2e/read-receipts/high-level.spec.ts +++ b/playwright/e2e/read-receipts/high-level.spec.ts @@ -11,6 +11,8 @@ Please see LICENSE files in the repository root for full details. import { customEvent, many, test } from "."; test.describe("Read receipts", { tag: "@mergequeue" }, () => { + test.slow(); + test.describe("Ignored events", () => { test("If all events after receipt are unimportant, the room is read", async ({ roomAlpha: room1, diff --git a/playwright/e2e/settings/roles-permissions-room-settings-tab.spec.ts b/playwright/e2e/settings/roles-permissions-room-settings-tab.spec.ts index 856546e91a..1193afe135 100644 --- a/playwright/e2e/settings/roles-permissions-room-settings-tab.spec.ts +++ b/playwright/e2e/settings/roles-permissions-room-settings-tab.spec.ts @@ -37,7 +37,9 @@ test.describe("Roles & Permissions room settings tab", () => { // Change the role of Alice to Moderator (50) await combobox.selectOption("Moderator"); await expect(combobox).toHaveValue("50"); + const respPromise = page.waitForRequest("**/state/**"); await applyButton.click(); + await respPromise; // Reload and check Alice is still Moderator (50) await page.reload(); diff --git a/playwright/e2e/spotlight/spotlight.spec.ts b/playwright/e2e/spotlight/spotlight.spec.ts index f72d88d8cc..d1bb3dec25 100644 --- a/playwright/e2e/spotlight/spotlight.spec.ts +++ b/playwright/e2e/spotlight/spotlight.spec.ts @@ -125,7 +125,7 @@ test.describe("Spotlight", () => { await expect(resultLocator).toHaveCount(1); await expect(resultLocator.first()).toContainText(room1Name); await resultLocator.first().click(); - expect(page.url()).toContain(room1Id); + await expect(page).toHaveURL(new RegExp(`#/room/${room1Id}`)); await expect(roomHeaderName(page)).toContainText(room1Name); }); @@ -139,7 +139,7 @@ test.describe("Spotlight", () => { await expect(resultLocator.first()).toContainText(room1Name); await expect(resultLocator.first()).toContainText("View"); await resultLocator.first().click(); - expect(page.url()).toContain(room1Id); + await expect(page).toHaveURL(new RegExp(`#/room/${room1Id}`)); await expect(roomHeaderName(page)).toContainText(room1Name); }); @@ -153,7 +153,7 @@ test.describe("Spotlight", () => { await expect(resultLocator.first()).toContainText(room2Name); await expect(resultLocator.first()).toContainText("Join"); await resultLocator.first().click(); - expect(page.url()).toContain(room2Id); + await expect(page).toHaveURL(new RegExp(`#/room/${room2Id}`)); await expect(page.locator(".mx_RoomView_MessageList")).toHaveCount(1); await expect(roomHeaderName(page)).toContainText(room2Name); }); @@ -168,7 +168,7 @@ test.describe("Spotlight", () => { await expect(resultLocator.first()).toContainText(room3Name); await expect(resultLocator.first()).toContainText("View"); await resultLocator.first().click(); - expect(page.url()).toContain(room3Id); + await expect(page).toHaveURL(new RegExp(`#/room/${room3Id}`)); await page.getByRole("button", { name: "Join the discussion" }).click(); await expect(roomHeaderName(page)).toHaveText(room3Name); });