diff --git a/scripts/smoke.ts b/scripts/smoke.ts index 5279c6ba0..232a09fd0 100644 --- a/scripts/smoke.ts +++ b/scripts/smoke.ts @@ -32,7 +32,10 @@ async function run() { for (const p of pages) { console.log(`📄 Checking ${p}...`); const res = await page.goto(`${targetUrl}${p}`, { waitUntil: 'domcontentloaded' }); - if (res?.status() !== 200) throw new Error(`Page ${p} returned ${res?.status()}`); + const status = res?.status(); + if (status !== 200 && status !== 304 && status !== 307 && status !== 308) { + throw new Error(`Page ${p} returned ${status}`); + } // Check for broken images (using in-page fetch to preserve session and avoid heavy navigation) const images = await page.$$eval('img', (imgs) => imgs.map((img) => img.src).filter(Boolean));