test(前端): 清理 16e2c9a5 死代码删除后的孤儿用例,补 4.0.42 更新日志

- 删除 17 个被测模块已不存在的测试(api-field-schemas / build-chunk-planner /
  polling-state-machine 等),套件 94 -> 77 文件
- polling-unknown-status 只保留仍接线的 useTaskProgressLoop 两条,去掉状态机用例
- endpoints 快照重钉 218 -> 215(漂移恰好等于外观专利 parsed-payload/queue-payload/
  activate 三个下线端点,无新增、无取值变化)
- brand-rows-version-wiring 的轻量失败回退断言改用 [^}] 锁进 catch 体内:
  原窗口会跨过 catch 右花括号读到后面正常分支的 return { taskIds, force: true },
  删掉回退也照样绿;五处变异(三页 heavyIds = ids + 外观页两种写法)现全部转红
- appearance-patent-failed-status 改为断言公共映射 taskStatusClass('FAILED')
This commit is contained in:
2026-10-02 15:09:08 +08:00
parent bb4a3f2d46
commit 1737903ec7
23 changed files with 25 additions and 2741 deletions
@@ -35,11 +35,14 @@ test('已接线的品牌工具页仍使用结果行版本跳过重型 batch', ()
test('轻量请求失败必须回退为全量拉取(不得因此少拉任务)', () => {
// 多任务页:catch 里把 heavyIds 还原成全部任务
// 回退必须写在 catch 体内:用 [^}] 锁住,否则窗口会跨过 catch 的右花括号,
// 把后面正常分支的 return(如 { taskIds, force: true })当成回退,断言恒真。
for (const page of ['BrandQueryAsinTab.vue', 'BrandWithdrawTab.vue', 'BrandPatrolDeleteTab.vue']) {
assert.match(sourceOf(page), /catch\s*\{[\s\S]{0,200}?heavyIds = ids/, `${page} 缺少轻量失败回退`)
assert.match(sourceOf(page), /catch\s*\{[^}]{0,200}?heavyIds = ids/, `${page} 缺少轻量失败回退`)
}
assert.match(sourceOf('BrandAppearancePatentTab.vue'), /catch\s*\{[\s\S]{0,200}?heavyIds = taskIds/,
'BrandAppearancePatentTab 缺少轻量失败回退')
assert.match(sourceOf('BrandAppearancePatentTab.vue'),
/catch\s*\{[^}]{0,240}?(heavyIds = taskIds|return \{ taskIds,)/,
'BrandAppearancePatentTab 缺少轻量失败回退(catch 里必须把全部任务交给重型 batch)')
// 单任务页:catch 里不能有 return(直接落到批量拉取)
const shopDataCrawl = sourceOf('BrandShopDataCrawlTab.vue')