test(image-vectorize): 真站 e2e 断言顶栏顺序与统一配色

This commit is contained in:
qiqi committed 2026-11-09 23:47:46 +08:00
1 parent 89c8e0a1d8
commit b6d10339f6
1 file changed
+9
+9
View File
@@ -139,6 +139,15 @@ check('样式注入生效(CSP unsafe-inline)', await page.evaluate(() => {
return Boolean(s && s.textContent.indexOf('.vz-') >= 0)
}))
// 用户 2026-11-09:取消与保存为节点互换,四颗按钮同一套描边配色(绿色主按钮已去掉)。
// 这条同时是「线上真的是新版」的活体证据 —— 光看版本号挡不住产物没重建。
check('顶栏顺序 保存为节点→复制→下载→取消,四颗同色', await page.evaluate(() => {
const btns = [...document.querySelectorAll('.vz-header .vz-btn')]
if (btns.map((b) => b.dataset.act).join(',') !== 'save,copy,svg,cancel') return false
const colors = new Set(btns.map((b) => getComputedStyle(b).backgroundColor + '|' + getComputedStyle(b).color))
return colors.size === 1
}))
// ---------- 5) 真站 CSP 下引擎能跑 ----------
const paths = await poll(async () => {
// 统计项是「元素」,合并模式下会带后缀「(N 孤岛合并)」,只取前面的数字