docs(acceptance): 首页改版生产发布记录与线上多端验收

- 记录 acb6b673 发布、镜像/备份锚点与 14 路由 200
- 补线上多端探针 report-production 与 prod 截图
- 探针先 eager 加载再滚屏,避免把懒加载未触发误报成破图
This commit is contained in:
zhangxiang committed 2026-10-20 11:24:16 +08:00
1 parent acb6b67357
commit ba05b2e57b
10 files changed
+1975 -4

No files matched your search

@@ -53,14 +53,21 @@ async function settle(page) {
});
return wrappers.every(el => parseFloat(getComputedStyle(el).opacity) > 0.99);
}, { timeout: 12000 }).catch(() => {});
// 线上 CDN 的懒加载图在「快速滚到底再回顶」时不会全部触发;先把 loading 改 eager,
// 再等首页图全部 complete。否则会把「还没轮到加载」误报成破图。
await page.evaluate(() => document.querySelectorAll('img').forEach((i) => { i.loading = 'eager'; }));
await page.evaluate(async () => {
for (let y = 0; y < document.body.scrollHeight; y += 500) {
window.scrollTo(0, y);
await new Promise(r => setTimeout(r, 120));
await new Promise(r => setTimeout(r, 150));
}
window.scrollTo(0, 0);
});
await page.waitForTimeout(900);
await page.waitForFunction(() => {
const imgs = [...document.querySelectorAll('img')].filter((i) => i.src.includes('/images/home/') || i.src.includes('/logo'));
return imgs.every((i) => i.complete && i.naturalWidth > 0);
}, { timeout: 20000 }).catch(() => {});
await page.waitForTimeout(300);
await page.evaluate(() => document.fonts?.ready);
await page.evaluate(() => document.querySelectorAll('img').forEach(i => { if (!i.complete) i.loading = 'eager'; }));
await page.waitForTimeout(800);