minor adjustments

This commit is contained in:
Vincent van der Wal
2026-08-01 16:07:32 +02:00
parent 17cf8df109
commit ae88140f79
13 changed files with 129 additions and 122 deletions
+15
View File
@@ -0,0 +1,15 @@
import { chromium } from 'playwright';
const browser = await chromium.launch();
const page = await browser.newPage({ viewport: { width: 1280, height: 950 } });
await page.goto('http://localhost:5186/en/weather/week/berlin/', { waitUntil: 'load', timeout: 120000 });
await page.waitForTimeout(14000);
// scroll right down to the footer and click a link there
await page.evaluate(() => { const m = document.querySelector('main'); m.scrollTop = m.scrollHeight; });
await page.waitForTimeout(700);
const before = await page.evaluate(() => document.querySelector('main').scrollTop);
await page.locator('footer a[href*="/weather/14-day"]').first().click();
await page.waitForTimeout(7000);
const after = await page.evaluate(() => document.querySelector('main').scrollTop);
console.log(JSON.stringify({ scrollBeforeClick: Math.round(before), scrollAfterNav: Math.round(after), url: page.url() }));
await browser.close();