diff --git a/scripts/smoke.ts b/scripts/smoke.ts index 5279c6ba0..a769f045b 100644 --- a/scripts/smoke.ts +++ b/scripts/smoke.ts @@ -9,22 +9,35 @@ async function run() { const browser = await puppeteer.launch({ headless: true, executablePath: process.env.PUPPETEER_EXECUTABLE_PATH || undefined, - args: ['--no-sandbox', '--disable-setuid-sandbox'], + args: [ + '--no-sandbox', + '--disable-setuid-sandbox', + '--disable-dev-shm-usage', + '--disable-gpu', + '--ignore-certificate-errors', + '--disable-web-security', + '--disable-features=IsolateOrigins,site-per-process', + ], }); const page = await browser.newPage(); try { // 1. Login via Gatekeeper console.log('🔑 Authenticating...'); - await page.goto(targetUrl, { waitUntil: 'networkidle2' }); + await page.goto(targetUrl, { waitUntil: 'domcontentloaded', timeout: 60000 }); + + console.log(` Waiting for potential Gatekeeper redirect...`); + await new Promise((resolve) => setTimeout(resolve, 3000)); const isGatekeeper = await page.$('input[name="password"]'); if (isGatekeeper) { await page.type('input[name="password"]', gatekeeperPassword); await Promise.all([ - page.waitForNavigation({ waitUntil: 'networkidle2' }), + page.waitForNavigation({ waitUntil: 'domcontentloaded' }), page.click('button[type="submit"]'), ]); + console.log(` Waiting for Login -> Home redirect...`); + await new Promise((resolve) => setTimeout(resolve, 3000)); } // 2. Check Key Pages & Assets