1e4ff4da6b
认证响应体读取加入可取消超时并释放 refresh singleflight 将 Runner 会话安装与清除移到 blocking worker 并增加 UI fence 让最近项目逐项检查且单目录超时不阻塞其它项目 将首页自动创建锁提升到 WorkspaceLauncher 生命周期 补充定向测试、跨页创建测试和异步闭环规范
40 lines
1.1 KiB
TypeScript
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,
|
|
});
|
|
});
|
|
});
|