test(e2e): LOD 用例让 fit 落在 lite 区间,断言跟随实测 scale

根因(3 条同一原因,测试假设过期,非产品缺陷):
- 用例用 40 列 × 200px 铺开,注释写「fit ≈0.18 ≥ 15% ⇒ 必须是 lite」;
- 停靠栏把可用宽度从 ~1384 压到 ~1014 后,实测 fit = 0.127(<15%)
  ⇒ 应用按设计整片降成 plain(300 个 .iwb-lod-plain),lite 断言全部失效。
- 实测对照:40 列 → scale 0.127 / plain 300;24 列 → scale 0.213 / lite 300。

修法:
1. COLS 40 → 24:fit ≈0.213,既 <64px/节点(触发 LOD)又 ≥15%(应为 lite),三个方向都还能守。
2. ① 的档位断言改为跟随实测 scale(<15% ⇒ 期望 plain,≥15% ⇒ 期望 lite),
   避免以后视口/停靠栏再变时静默失效。

验证:iwb-lod 5/5 全绿(此前 3 红);基线已知红 20 → 17 条。
This commit is contained in:
qiqi authored and qiqi@local committed 2026-11-27 06:40:06 +08:00
1 parent c16068be2a
commit 319598ef65
2 files changed
+11 -14

No files matched your search

+2 -10
View File
@@ -1,5 +1,5 @@
{
"$comment": "e2e 已知失败清单。用途:把「长期红」与「新红」分开,避免门禁信号被噪声淹没。维护:修好一条就删一条;新红由 scripts/e2e-known-red-report.js 报出来。kind=unknown 表示尚未逐条判定。退役清单见 retired。 2026-11-27 追记:iwb-picker 9/9 已修复(初始默认视口被误持久化导致 doFit 被跳过),已移出清单。 2026-11-27 追记:iwb-private-gate 4 条(.iwb-ctxmenu 未排除子菜单 + 设置页默认页变化)与 iwb-connect-menu ⑤(同一 strict 问题)已修,移出清单。",
"$comment": "e2e 已知失败清单。用途:把「长期红」与「新红」分开,避免门禁信号被噪声淹没。维护:修好一条就删一条;新红由 scripts/e2e-known-red-report.js 报出来。kind=unknown 表示尚未逐条判定。退役清单见 retired。 2026-11-27 追记:iwb-picker 9/9 已修复(初始默认视口被误持久化导致 doFit 被跳过),已移出清单。 2026-11-27 追记:iwb-private-gate 4 条(.iwb-ctxmenu 未排除子菜单 + 设置页默认页变化)与 iwb-connect-menu ⑤(同一 strict 问题)已修,移出清单。 2026-11-27 追记:iwb-lod 3 条已修(列数 40→24,让 fit 落在 lite 区间;断言改为跟随实测 scale),移出清单。",
"measuredAt": "2026-11-27",
"measuredVersion": "3.26.107",
"measuredCommit": "64f37e1",
@@ -7,7 +7,7 @@
"specs": 52,
"tests": 195,
"passed": 162,
"failed": 20
"failed": 17
},
"baseUrl": {
"clipboard-audit": "http://127.0.0.1:8799",
@@ -62,14 +62,6 @@
"reason": "收藏节点组原图快照用例超时,待定位",
"since": "2026-11-27 实测"
},
{
"spec": "tests/iwb-lod.spec.js",
"knownFailures": 3,
"total": 5,
"kind": "unknown",
"reason": "LOD 阈值相关断言失败,可能与取景缩放变化有关,待判定",
"since": "2026-11-27 实测"
},
{
"spec": "tests/iwb-resize-perf.spec.js",
"knownFailures": 1,