fix(ci): allow cached and redirected statuses (304, 307, 308) in smoke test page check
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 4m39s
Build & Deploy / 🧪 QA (push) Successful in 2m31s
Build & Deploy / 🏗️ Build (push) Successful in 5m23s
Build & Deploy / 🚀 Deploy (push) Successful in 50s
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 3s
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 4m39s
Build & Deploy / 🧪 QA (push) Successful in 2m31s
Build & Deploy / 🏗️ Build (push) Successful in 5m23s
Build & Deploy / 🚀 Deploy (push) Successful in 50s
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 3s
This commit is contained in:
@@ -32,7 +32,10 @@ async function run() {
|
|||||||
for (const p of pages) {
|
for (const p of pages) {
|
||||||
console.log(`📄 Checking ${p}...`);
|
console.log(`📄 Checking ${p}...`);
|
||||||
const res = await page.goto(`${targetUrl}${p}`, { waitUntil: 'domcontentloaded' });
|
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)
|
// 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));
|
const images = await page.$$eval('img', (imgs) => imgs.map((img) => img.src).filter(Boolean));
|
||||||
|
|||||||
Reference in New Issue
Block a user