diff --git a/playwright/e2e/timeline/media-preview-settings.spec.ts b/playwright/e2e/timeline/media-preview-settings.spec.ts index d09a576629..e32a7dbc82 100644 --- a/playwright/e2e/timeline/media-preview-settings.spec.ts +++ b/playwright/e2e/timeline/media-preview-settings.spec.ts @@ -15,6 +15,9 @@ const MEDIA_FILE = fs.readFileSync("playwright/sample-files/riot.png"); test.describe("Media preview settings", () => { test.use({ displayName: "Alan", + botCreateOpts: { + displayName: "Bob", + }, room: async ({ app, page, homeserver, bot, user }, use) => { const mxc = (await bot.uploadContent(MEDIA_FILE, { name: "image.png", type: "image/png" })).content_uri; const roomId = await bot.createRoom({ @@ -39,7 +42,14 @@ test.describe("Media preview settings", () => { await app.viewRoomById(room.roomId); await expect( page.getByRole("complementary").filter({ hasText: "Do you want to join Test room" }), - ).toMatchScreenshot("invite-no-avatar.png"); + ).toMatchScreenshot("invite-no-avatar.png", { + // Hide the mxid, which is not stable. + css: ` + .mx_RoomPreviewBar_inviter_mxid { + display: none !important; + } + `, + }); await expect( page.getByRole("tree", { name: "Rooms" }).getByRole("treeitem", { name: "Test room" }), ).toMatchScreenshot("invite-room-tree-no-avatar.png"); @@ -52,7 +62,14 @@ test.describe("Media preview settings", () => { await app.viewRoomById(room.roomId); await expect( page.getByRole("complementary").filter({ hasText: "Do you want to join Test room" }), - ).toMatchScreenshot("invite-with-avatar.png"); + ).toMatchScreenshot("invite-with-avatar.png", { + // Hide the mxid, which is not stable. + css: ` + .mx_RoomPreviewBar_inviter_mxid { + display: none !important; + } + `, + }); await expect( page.getByRole("tree", { name: "Rooms" }).getByRole("treeitem", { name: "Test room" }), ).toMatchScreenshot("invite-room-tree-with-avatar.png"); diff --git a/playwright/snapshots/timeline/media-preview-settings.spec.ts/invite-no-avatar-linux.png b/playwright/snapshots/timeline/media-preview-settings.spec.ts/invite-no-avatar-linux.png index f706297f52..377282a2c8 100644 Binary files a/playwright/snapshots/timeline/media-preview-settings.spec.ts/invite-no-avatar-linux.png and b/playwright/snapshots/timeline/media-preview-settings.spec.ts/invite-no-avatar-linux.png differ diff --git a/playwright/snapshots/timeline/media-preview-settings.spec.ts/invite-with-avatar-linux.png b/playwright/snapshots/timeline/media-preview-settings.spec.ts/invite-with-avatar-linux.png index 00fdb29c81..93459507d0 100644 Binary files a/playwright/snapshots/timeline/media-preview-settings.spec.ts/invite-with-avatar-linux.png and b/playwright/snapshots/timeline/media-preview-settings.spec.ts/invite-with-avatar-linux.png differ