修正运行不可用提示的过期测试契约
Project CI / AI game creator shell Rust shard 1/4 (pull_request) Successful in 5m28s
Project CI / AI game creator shell Rust shard 2/4 (pull_request) Successful in 5m54s
Project CI / AI game creator shell Rust shard 3/4 (pull_request) Successful in 5m32s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m0s
Project CI / Backend tests (pull_request) Failing after 11s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m17s
Project CI / AI game creator shell Rust shard 4/4 (pull_request) Successful in 5m52s
Project CI / Repository checks (pull_request) Failing after 11s
Project CI / Frontend tests (pull_request) Successful in 5m46s
Project CI / AI game creator shell web tests (pull_request) Successful in 4m15s
Project CI / Native shell tests (pull_request) Successful in 9m21s

恢复运行提示与资源选择解耦的业务逻辑
更新界面源码契约测试,保留资源选中交互回归
补充运行提示及无障碍关联的验收口径
This commit is contained in:
2026-09-17 11:51:14 +08:00
parent 7f9dce5f79
commit 9d374a57b1
3 changed files with 3 additions and 3 deletions
@@ -6260,8 +6260,7 @@ export default function ProjectDevelopmentView({
setMode('run');
}
const showRunUnavailableHint =
!runAvailable && selectedResourceIds.length === 0 && !uiEditorRoute;
const showRunUnavailableHint = !runAvailable && !uiEditorRoute;
const renderResourceBookCard = useCallback(
(
@@ -5979,7 +5979,7 @@ export function registerProjectWorkbenchFoundationTests() {
expect(chatWalletSlots).toHaveLength(1);
expect(projectDevelopmentSource).toMatch(/walletEntry=\{walletEntry\}/);
expect(projectDevelopmentSource).toMatch(
/const showRunUnavailableHint\s*=\s*!runAvailable\s*&&\s*selectedResourceIds\.length === 0\s*&&\s*!uiEditorRoute/s,
/const showRunUnavailableHint\s*=\s*!runAvailable\s*&&\s*!uiEditorRoute\s*;/s,
);
expect(projectDevelopmentSource).toMatch(
/aria-describedby=\{\s*showRunUnavailableHint\s*\?\s*'run-unavailable-hint'\s*:\s*undefined\s*\}/s,
@@ -14,6 +14,7 @@
## 验证
- 定向 Vitest:窗口工作台、画布交互、布局与原有导航用例。
- 运行提示的源码契约与交互回归同时覆盖:提示仅取决于运行能力和 UI 编辑器路由,不依赖资源选择;选中资源后提示及 `aria-describedby` 保留,点击运行仍不能进入不可用视图。
- AGC `tsc --noEmit``npm run check:encoding``npm run check:doc-index``git diff --check`
- 真实客户端首次进入和触摸板操作无法以 jsdom 代替;未实测时保持待验收。