Skip to content

Commit 76c74aa

Browse files
committed
fix: scroll to server list section in discover-web screenshot
The discover-web screenshot now scrolls to the category pills / server grid section instead of capturing the hero banner at the top of the page. Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>
1 parent 62d4343 commit 76c74aa

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

docs/screenshots/discover-web.png

-137 Bytes
Loading

tests/e2e/specs/capture-screenshots.manual.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -915,6 +915,20 @@ describe('Screenshot Capture', function () {
915915
await browser.setWindowSize(1920, 1080);
916916
await browser.pause(500);
917917

918+
// Scroll down to the server list section so the screenshot focuses on
919+
// the registry grid rather than the hero banner
920+
try {
921+
const categoryPill = await $('[data-testid="category-pill-all"]');
922+
if (await categoryPill.isExisting()) {
923+
await categoryPill.scrollIntoView({ block: 'start' });
924+
await browser.pause(500);
925+
}
926+
} catch {
927+
// Fallback: scroll by a fixed amount to get past the hero
928+
await browser.execute(() => window.scrollBy(0, 600));
929+
await browser.pause(500);
930+
}
931+
918932
await saveFullScreenshot('discover-web');
919933

920934
await browser.url(originalUrl);

0 commit comments

Comments
 (0)