diff --git a/playwright/e2e/release-announcement/index.ts b/playwright/e2e/release-announcement/index.ts index 3b6c2dd38a..2a2e704d74 100644 --- a/playwright/e2e/release-announcement/index.ts +++ b/playwright/e2e/release-announcement/index.ts @@ -42,7 +42,10 @@ export class Helpers { */ async assertReleaseAnnouncementIsVisible(name: string) { await expect(this.getReleaseAnnouncement(name)).toBeVisible(); - await expect(this.page).toMatchScreenshot(`release-announcement-${name}.png`, { showTooltips: true }); + await expect(this.page).toMatchScreenshot(`release-announcement-${name}.png`, { + showTooltips: true, + hideJumpToBottomButton: true, + }); } /** diff --git a/playwright/element-web-test.ts b/playwright/element-web-test.ts index 8520533461..fee9f070d8 100644 --- a/playwright/element-web-test.ts +++ b/playwright/element-web-test.ts @@ -107,6 +107,7 @@ interface ExtendedToMatchScreenshotOptions extends ToMatchScreenshotOptions { includeDialogBackground?: boolean; showTooltips?: boolean; timeout?: number; + hideJumpToBottomButton?: boolean; } type Expectations = { @@ -165,6 +166,14 @@ export const expect = baseExpect.extend({ `; } + if (options?.hideJumpToBottomButton) { + css += ` + .mx_JumpToBottomButton { + display: none !important; + } + `; + } + if (options?.css) { css += options.css; }