Skip to content

Commit 9dfa4f0

Browse files
committed
Stabilise screenshot
Signed-off-by: Michael Telatynski <[email protected]>
1 parent b49df70 commit 9dfa4f0

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

playwright/e2e/right-panel/right-panel.spec.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,15 @@ test.describe("RightPanel", () => {
157157
await expect(page.locator(".mx_UserInfo")).toBeVisible();
158158
await expect(page.locator(".mx_UserInfo_profile").getByText(LONG_NAME)).toBeVisible();
159159

160-
await expect(page.locator(".mx_UserInfo")).toMatchScreenshot("with-long-name.png");
160+
await expect(page.locator(".mx_UserInfo")).toMatchScreenshot("with-long-name.png", {
161+
mask: [page.locator(".mx_UserInfo_profile_mxid")],
162+
css: `
163+
/* Use monospace font for consistent mask width */
164+
.mx_UserInfo_profile_mxid {
165+
font-family: Inconsolata !important;
166+
}
167+
`,
168+
});
161169
},
162170
);
163171

Loading

0 commit comments

Comments
 (0)