chore: checkpoint current workspace changes
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# XCUI TEST_SPEC
|
||||
|
||||
日期: `2026-04-06`
|
||||
日期: `2026-04-09`
|
||||
|
||||
## 1. 目标
|
||||
|
||||
@@ -44,8 +44,14 @@ tests/UI/
|
||||
- `Editor`
|
||||
- 面向编辑器 UI 的测试。
|
||||
- 例如 editor host、editor shell、editor-only widget、editor domain 集成。
|
||||
- 当前阶段采用固定代码样式:Editor 默认样式、palette、metrics 与视觉语义由代码层固定维护,不再为 Editor 主题解析单独扩测试主线。
|
||||
|
||||
当前阶段的资源化方向约束:
|
||||
- `Core` / `Runtime` 可以继续推进资源化、热重载与资源驱动验证。
|
||||
- `Editor` 当前不以主题资源解析作为主线,验证重点放在 editor-only 结构、状态机、交互和固定代码样式。
|
||||
|
||||
禁止把 `Runtime` 和 `Editor` 混在同一个测试目录里。
|
||||
当前正式验证入口固定为 `tests/UI`,不得把 `new_editor` 当作当前验证树的替代入口。
|
||||
|
||||
## 3. Unit 规范
|
||||
|
||||
@@ -72,6 +78,7 @@ tests/UI/
|
||||
- 每次只暴露当前批次需要检查的操作区域,不做大杂烩面板。
|
||||
- 界面中的操作提示默认使用中文,必要时可混用 `hover`、`focus`、`active`、`capture` 等术语。
|
||||
- 测哪一层,就把场景放到哪一层的 `integration/` 目录下。
|
||||
- `Editor` 集成验证当前只覆盖 editor-only 基础层;在 `Core / Editor` 基础层未收口前,不在 `new_editor` 中提前做业务面板验证。
|
||||
|
||||
`integration` 测试不负责:
|
||||
|
||||
@@ -165,12 +172,12 @@ Editor 集成测试只承载 editor-only 场景,不再承载共享 Core primit
|
||||
|
||||
- `F12` 手动截图。
|
||||
- 截图只允许截当前 exe 自己的渲染结果。
|
||||
- 截图输出到当前 scenario 自己的 `captures/` 目录。
|
||||
- 截图只允许输出到当前构建目录下、当前 exe 自己的 `Debug/captures/<scenario>/` 目录。
|
||||
|
||||
输出格式:
|
||||
|
||||
- `captures/latest.png`
|
||||
- `captures/history/<timestamp>_<index>_<reason>.png`
|
||||
- `build/.../Debug/captures/<scenario>/latest.png`
|
||||
- `build/.../Debug/captures/<scenario>/history/<timestamp>_<index>_<reason>.png`
|
||||
|
||||
原则:
|
||||
|
||||
@@ -185,15 +192,19 @@ XCUI 必须坚持自底向上的建设顺序:
|
||||
2. 先补对应 `unit`。
|
||||
3. 再补一个聚焦的 `integration` exe。
|
||||
4. 人工检查通过后再继续向上推进。
|
||||
5. 基础层稳定后,才允许把能力接入 `new_editor` 宿主做装配冒烟;不反向把 `new_editor` 当作验证入口。
|
||||
|
||||
禁止事项:
|
||||
|
||||
- 先堆 editor 具体面板,再回头补底层。
|
||||
- 把 `new_editor` 当作 XCUI 主测试入口。
|
||||
- 在基础层未完成前,把业务面板直接塞进 `new_editor` 作为主推进路径。
|
||||
- 把一个验证 exe 做成综合试验场。
|
||||
- 为了赶进度写跨层耦合的临时代码。
|
||||
|
||||
## 9. 当前入口约定
|
||||
|
||||
当前 XCUI 的正式验证入口是 `tests/UI`。
|
||||
`new_editor` 不是后续 XCUI 测试体系的主入口,也不应继续承载新的测试场景扩展。
|
||||
当前 XCUI 的正式验证入口是 `tests/UI`,其下的 `Core / Runtime / Editor` 三层测试树是唯一有效的当前验证体系。
|
||||
`new_editor` 只作为未来重建 editor 的产品宿主,不是当前测试入口,也不继续承载新的测试场景扩展。
|
||||
`tests/UI/TEST_SPEC.md` 负责顶层测试分层、职责边界和执行规则。
|
||||
`tests/UI/Editor/integration/README.md` 负责 Editor 集成验证的当前入口说明、场景清单、构建运行和截图约定。
|
||||
|
||||
Reference in New Issue
Block a user