Files
Genarrative/apps/ai-game-creator-shell/tests/recentProjectsModel.test.ts
T
kdletters 1e4ff4da6b
Project CI / Repository checks (pull_request) Successful in 2m40s
Project CI / Frontend tests (pull_request) Successful in 3m12s
Project CI / Backend tests (pull_request) Successful in 6m1s
Project CI / Native shell tests (pull_request) Successful in 20m9s
修复 AGC 异步操作恢复闭环
认证响应体读取加入可取消超时并释放 refresh singleflight

将 Runner 会话安装与清除移到 blocking worker 并增加 UI fence

让最近项目逐项检查且单目录超时不阻塞其它项目

将首页自动创建锁提升到 WorkspaceLauncher 生命周期

补充定向测试、跨页创建测试和异步闭环规范
2026-09-14 12:31:40 +08:00

40 lines
1.1 KiB
TypeScript

import { describe, expect, it } from 'vitest';
import { buildRecentProjectRows } from '../src/features/app-shell/model';
describe('最近项目行状态', () => {
it('已完成的项目不受其它慢目录的全局刷新状态阻塞', () => {
const rows = buildRecentProjectRows(
['C:\\projects\\ready', 'C:\\projects\\slow'],
{
'C:\\projects\\ready': {
projectPath: 'C:\\projects\\ready',
exists: true,
isDirectory: true,
isGameCreatorProject: true,
isGodotProject: false,
isCocosProject: false,
godotProjectRoot: null,
cocosProjectRoot: null,
projectName: '可打开项目',
recentRunStatus: null,
recentRunStopReason: null,
},
},
true,
);
expect(rows[0]).toMatchObject({
name: '可打开项目',
status: '本地项目',
canOpen: true,
canReveal: true,
});
expect(rows[1]).toMatchObject({
status: '检查中',
canOpen: false,
canReveal: false,
});
});
});