const { chromium } = require('playwright');
(async () => {
  const b = await chromium.launch();
  const p = await b.newPage({ viewport: { width: 1100, height: 1600 }, deviceScaleFactor: 2 });
  await p.goto('http://localhost:8081/', { waitUntil: 'networkidle' });
  // primera sección de tarjetas (artículos de la semana)
  const sec = p.locator('.fea-grid').first();
  await sec.scrollIntoViewIfNeeded();
  await sec.screenshot({ path: '/tmp/portada_grid.png' });
  console.log('ok');
  await b.close();
})();
