spb/countryatlas
Public
TypeScript 57%
Python 38.6%
JavaScript 3.6%
CSS 0.6%
1import { chromium } from '/Users/simon-pierreboucher/Desktop/uqo-eval/node_modules/playwright/index.mjs';2const BASE='http://localhost:8290';3const shots=[['/',390,'home-m'],['/',1440,'home-d'],['/countries/canada',390,'can-m'],['/countries/canada',1440,'can-d'],['/countries/canada/economy',390,'eco-m'],['/countries',390,'list-m']];4const b=await chromium.launch();5for(const [p,w,n] of shots){const ctx=await b.newContext({viewport:{width:w,height:w<768?844:900},isMobile:w<768,hasTouch:w<768});const pg=await ctx.newPage();6await pg.goto(BASE+p,{waitUntil:'networkidle'});await pg.waitForTimeout(800);7await pg.screenshot({path:`/tmp/ca-${n}.png`,fullPage:true});const h=await pg.evaluate(()=>document.documentElement.scrollHeight);console.log(n,h);await ctx.close();}8await b.close();9