diff --git a/playwright/e2e/right-panel/right-panel.spec.ts b/playwright/e2e/right-panel/right-panel.spec.ts index cb2a11ac00..0bdd0a283a 100644 --- a/playwright/e2e/right-panel/right-panel.spec.ts +++ b/playwright/e2e/right-panel/right-panel.spec.ts @@ -47,6 +47,7 @@ test.describe("RightPanel", () => { // Set a local room address const localAddresses = page.locator(".mx_SettingsFieldset", { hasText: "Local Addresses" }); await localAddresses.getByRole("textbox").fill(ROOM_ADDRESS_LONG); + await expect(page.getByText("This address is available to use")).toBeVisible(); await localAddresses.getByRole("button", { name: "Add" }).click(); await expect(localAddresses.getByText(`#${ROOM_ADDRESS_LONG}:localhost`)).toHaveClass( "mx_EditableItem_item", diff --git a/playwright/e2e/room-directory/room-directory.spec.ts b/playwright/e2e/room-directory/room-directory.spec.ts index 34004c90d2..a38cc7d395 100644 --- a/playwright/e2e/room-directory/room-directory.spec.ts +++ b/playwright/e2e/room-directory/room-directory.spec.ts @@ -30,6 +30,7 @@ test.describe("Room Directory", () => { // First add a local address `gaming` const localAddresses = page.locator(".mx_SettingsFieldset", { hasText: "Local Addresses" }); await localAddresses.getByRole("textbox").fill("gaming"); + await expect(page.getByText("This address is available to use")).toBeVisible(); await localAddresses.getByRole("button", { name: "Add" }).click(); await expect(localAddresses.getByText("#gaming:localhost")).toHaveClass("mx_EditableItem_item"); diff --git a/playwright/e2e/settings/general-room-settings-tab.spec.ts b/playwright/e2e/settings/general-room-settings-tab.spec.ts index eec32f7af5..5e29f802c2 100644 --- a/playwright/e2e/settings/general-room-settings-tab.spec.ts +++ b/playwright/e2e/settings/general-room-settings-tab.spec.ts @@ -41,6 +41,7 @@ test.describe("General room settings tab", () => { // 1. Set the room-address to be a really long string const longString = "abcasdhjasjhdaj1jh1asdhasjdhajsdhjavhjksd".repeat(4); await settings.locator("#roomAliases input[label='Room address']").fill(longString); + await expect(page.getByText("This address is available to use")).toBeVisible(); await settings.locator("#roomAliases").getByText("Add", { exact: true }).click(); // 2. wait for the new setting to apply ... diff --git a/playwright/pages/client.ts b/playwright/pages/client.ts index c2586f1b5e..362915ce71 100644 --- a/playwright/pages/client.ts +++ b/playwright/pages/client.ts @@ -179,18 +179,17 @@ export class Client { public async createRoom(options: ICreateRoomOpts): Promise { const client = await this.prepareClient(); return await client.evaluate(async (cli, options) => { - const roomPromise = new Promise((resolve) => { - const onRoom = (room: Room) => { - if (room.roomId === roomId) { - cli.off(window.matrixcs.ClientEvent.Room, onRoom); - resolve(); - } - }; - cli.on(window.matrixcs.ClientEvent.Room, onRoom); - }); const { room_id: roomId } = await cli.createRoom(options); if (!cli.getRoom(roomId)) { - await roomPromise; + await new Promise((resolve) => { + const onRoom = (room: Room) => { + if (room.roomId === roomId) { + cli.off(window.matrixcs.ClientEvent.Room, onRoom); + resolve(); + } + }; + cli.on(window.matrixcs.ClientEvent.Room, onRoom); + }); } return roomId; }, options); diff --git a/playwright/stale-screenshot-reporter.ts b/playwright/stale-screenshot-reporter.ts index 5c0e42ca2b..36aba56a07 100644 --- a/playwright/stale-screenshot-reporter.ts +++ b/playwright/stale-screenshot-reporter.ts @@ -44,7 +44,6 @@ class StaleScreenshotReporter implements Reporter { public async onExit(): Promise { if (this.failing) return; - const screenshotFiles = new Set(await glob(`**/*.png`, { cwd: snapshotRoot })); for (const screenshot of screenshotFiles) { if (screenshot.split("-").at(-1) !== "linux.png") { diff --git a/playwright/testcontainers/mas.ts b/playwright/testcontainers/mas.ts index 6939789457..9b05b521ba 100644 --- a/playwright/testcontainers/mas.ts +++ b/playwright/testcontainers/mas.ts @@ -23,7 +23,6 @@ const DEFAULT_CONFIG = { { name: "human" }, { name: "oauth" }, { name: "compat" }, - { name: "adminapi" }, { name: "graphql", playground: true, @@ -164,10 +163,12 @@ const DEFAULT_CONFIG = { }, rate_limiting: { login: { - burst: 1000, + burst: 10, + per_second: 1, }, registration: { - burst: 1000, + burst: 10, + per_second: 1, }, }, };