Files
mintel.me/scripts/visual_debug.mjs
Marc Mintel 49abaaf2fd
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🏗️ Build (push) Successful in 16m45s
Build & Deploy / 🚀 Deploy (push) Successful in 19s
Build & Deploy / 🧪 QA (push) Successful in 1m9s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 3m9s
Build & Deploy / 🔔 Notify (push) Successful in 2s
fix(web): increase build memory to 8GB and support smooth-scroll in IframeSection
2026-04-10 11:37:09 +02:00

37 lines
1.5 KiB
JavaScript

import puppeteer from 'puppeteer';
(async () => {
// Launch browser
const browser = await puppeteer.launch({ headless: true });
const page = await browser.newPage();
// Set viewport
await page.setViewport({ width: 1920, height: 1080 });
try {
console.log("Navigating to case study page...");
await page.goto('https://mintel.me/case-studies/klz-cables', { waitUntil: 'networkidle2' });
console.log("Waiting a bit for iframes to load...");
await new Promise(r => setTimeout(r, 5000));
// Let's get console logs from the page too
page.on('console', msg => console.log('PAGE LOG:', msg.text()));
console.log("Taking screenshot...");
await page.screenshot({ path: '/Users/marcmintel/Projects/mintel.me/screenshot_case_study.png', fullPage: true });
// Also take a screenshot of the actual showcase HTML page directly to compare
console.log("Navigating directly to showcase HTML...");
await page.goto('https://mintel.me/showcase/klz-cables.com/power-cables-medium-voltage-cables.html', { waitUntil: 'networkidle2' });
await new Promise(r => setTimeout(r, 3000));
await page.screenshot({ path: '/Users/marcmintel/Projects/mintel.me/screenshot_showcase.png', fullPage: true });
console.log("Done!");
} catch (e) {
console.error("Error:", e);
} finally {
await browser.close();
}
})();