Skip to content

Commit 03b6a33

Browse files
committed
fix: increase scroll offset for discover-web screenshot
Scroll 500px past category pills so server cards fill the viewport instead of the hero banner dominating the screenshot. Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>
1 parent 76c74aa commit 03b6a33

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

docs/screenshots/discover-web.png

-307 KB
Loading

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -915,17 +915,21 @@ 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
918+
// Scroll down past the hero so the server grid is the main focus.
919+
// First scroll to the category pills, then nudge further so the
920+
// server cards fill the viewport.
920921
try {
921922
const categoryPill = await $('[data-testid="category-pill-all"]');
922923
if (await categoryPill.isExisting()) {
923924
await categoryPill.scrollIntoView({ block: 'start' });
925+
await browser.pause(300);
926+
// Scroll down more so the server cards fill the viewport
927+
await browser.execute(() => window.scrollBy(0, 500));
924928
await browser.pause(500);
925929
}
926930
} catch {
927-
// Fallback: scroll by a fixed amount to get past the hero
928-
await browser.execute(() => window.scrollBy(0, 600));
931+
// Fallback: scroll by a large fixed amount to get past the hero
932+
await browser.execute(() => window.scrollBy(0, 900));
929933
await browser.pause(500);
930934
}
931935

0 commit comments

Comments
 (0)