test: 门户守卫测试对齐任务模型物理合并
e2a93e2 将 screenshot_collect 并入单任务双阶段(先发布后回收截图)时漏改
koc-portal/tests,两条源码守卫断言失配导致 CI 失败:
- note-index 完成态改为仅看 publish_url 的单分支断言
- 截图任务用例改为合并后的回收截图模型:recoveryEnabled 守卫、
先回填发布链接再传截图的门槛、批次回收进度、回收示例图,
并加 doesNotMatch 防止回退 screenshot_collect/isScreenshotTask 旧模型
This commit is contained in:
@@ -106,7 +106,7 @@ test("keeps claiming minimal and backfill one-to-one", async () => {
|
||||
assert.match(page, /placeholder="填写截图中的曝光量"\s*\/>/);
|
||||
assert.match(page, /placeholder="填写截图中的阅读量"\s*\/>/);
|
||||
assert.doesNotMatch(page, /recognizeCreatorMetrics/);
|
||||
assert.match(page, /note-index \$\{\(isScreenshotTask \? item\.result_submitted_at : item\.publish_url\) \? "done" : ""\}/);
|
||||
assert.match(page, /note-index \$\{item\.publish_url \? "done" : ""\}/);
|
||||
assert.match(packageJson, /"fflate":\s*"0\.7\.4"/);
|
||||
assert.doesNotMatch(packageJson, /tesseract\.js/);
|
||||
assert.match(layout, /逐篇查看笔记详情并一一回填/);
|
||||
@@ -118,18 +118,24 @@ test("keeps claiming minimal and backfill one-to-one", async () => {
|
||||
await access(new URL("../public/favicon.svg", import.meta.url));
|
||||
});
|
||||
|
||||
test("renders screenshot-only tasks with anonymous delegation and multi-image uploads", async () => {
|
||||
test("renders merged task recovery screenshots with anonymous delegation and multi-image uploads", async () => {
|
||||
const [page, styles] = await Promise.all([
|
||||
readFile(new URL("../app/page.tsx", import.meta.url), "utf8"),
|
||||
readFile(new URL("../app/globals.css", import.meta.url), "utf8"),
|
||||
]);
|
||||
|
||||
assert.match(page, /screenshot_collect/);
|
||||
assert.match(page, /小红书搜索关键词/);
|
||||
assert.match(page, /上传小红书 AI 总结截图/);
|
||||
assert.match(page, /payload\.task\.recoveryEnabled/);
|
||||
assert.doesNotMatch(page, /screenshot_collect|isScreenshotTask/);
|
||||
assert.match(page, /上传发布后的笔记截图/);
|
||||
assert.match(page, /recoveryInstructions \|\| "请提交发布后的笔记截图"/);
|
||||
assert.match(page, /回收示例截图/);
|
||||
assert.match(page, /submit_screenshot_result/);
|
||||
assert.match(page, /submitRecoveryScreenshots/);
|
||||
assert.match(page, /请先回填这篇笔记的发布链接,再提交回收截图/);
|
||||
assert.match(page, /回填发布链接后,这里会开放回收截图上传。/);
|
||||
assert.match(page, /截图已收/);
|
||||
assert.match(page, /更新回收截图/);
|
||||
assert.match(page, /"task-result"/);
|
||||
assert.match(page, /不需要填写发布链接或其他数据/);
|
||||
assert.match(page, /multiple/);
|
||||
assert.match(page, /taskResultScreenshots/);
|
||||
assert.match(page, /task-result-thumb/);
|
||||
@@ -138,6 +144,7 @@ test("renders screenshot-only tasks with anonymous delegation and multi-image up
|
||||
assert.match(styles, /\.task-result-gallery/);
|
||||
assert.match(styles, /\.image-lightbox/);
|
||||
assert.match(styles, /\.evidence-preview-button/);
|
||||
assert.match(styles, /\.recovery-progress/);
|
||||
});
|
||||
|
||||
test("shows D1 and MySQL UTC timestamps in Beijing time", () => {
|
||||
|
||||
Reference in New Issue
Block a user