Files
mnote/.codex/reasonix-tasks/2026-05-21-browser-batch-a3-task474-empty-trash.md
T

67 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Reasonix Browser Test: Batch A3 task474 Local Folder Empty Trash UI
项目根目录:`/mnt/Data1T/mnote`
请先阅读并遵守:`/home/lix/.codex/skills/reasonix-browser-tester/SKILL.md`
## 角色
你是浏览器测试员,不是代码修改员。
禁止修改源码、禁止 git commit、禁止回滚文件。只允许创建测试输出目录、临时测试数据、截图和测试结果文件。
## 测试目标
验证 `task474-local-folder-empty-trash-ui-smoke.js` 在当前最新 `mnote-web` 上覆盖 local folder 垃圾箱清空 UI
- 清空页面垃圾箱按钮可点击并触发 confirm。
- 清空后 Markdown trash row 消失。
- 清空资源垃圾箱按钮可点击并触发 confirm。
- 清空后资源 trash row 消失。
- 两次清空操作都不触发非预期 main frame navigation。
- `trash-index.json` 最终为空,trash 文件已删除。
## 前置
- 被测入口:`http://127.0.0.1:3014`
- 3014 是 Codex 为本轮验证启动的最新 mnote-web 临时进程。
- 使用真实浏览器或 Playwright。
- 使用全新的 isolated browser context / userDataDir;测试开始前清空 cookies、localStorage、sessionStorage、IndexedDB、Cache Storage。
## 操作
1. 运行:
```bash
cd /mnt/Data1T/mnote
node --check scripts/task474-local-folder-empty-trash-ui-smoke.js
MNOTE_WEB_SMOKE_BASE_URL=http://127.0.0.1:3014 PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/google-chrome-stable MNOTE_KEEP_SMOKE_TMP=1 node scripts/task474-local-folder-empty-trash-ui-smoke.js
```
2. 读取 `tmp/task474-local-folder-empty-trash-ui-smoke/result.json`
3. 打开 result 中的 `root` 对应 `/trash?sourceKind=local_folder&rootUri=file://...` 页面,截图清空后的 trash workbench 状态。
4. 记录:
- `ok`
- `emptyDocuments.navDelta`
- `emptyResources.navDelta`
- `emptyDocuments.mdEntryClean`
- `emptyResources.assetEntryClean`
- `steps.length`
- 最终页面是否显示页面垃圾箱 / 资源垃圾箱为空状态或对应按钮 disabled
## 输出目录
`/mnt/Data1T/mnote/tmp/reasonix-batch-a3-browser-task474-empty-trash-2026-05-21/`
必须输出:
- `result.json`
- `final.md`
- 至少 1 张截图;失败时必须截图。
## 判定
- `PASS`:语法检查和 smoke 实跑 exit 0`result.json.ok=true`,两个 navDelta 都为 0,页面与资源 entry 均清理,且截图显示清空后的 trash workbench。
- `FAIL`:脚本退出非 0,或 no-navigation / entry 清理 / UI 清空断言失败。
- `BLOCKED`3014 不可达或浏览器无法启动。