feat: unify creation entry templates

This commit is contained in:
2026-06-03 10:24:03 +08:00
parent b0865cfa19
commit 3f742fbaca
25 changed files with 820 additions and 346 deletions

View File

@@ -6,9 +6,21 @@ import {
} from './unifiedCreationSpecs';
describe('unified creation specs', () => {
test('统一壳当前覆盖拼图、抓大鹅、跳一跳和敲木鱼', () => {
test('统一壳覆盖所有已有创作模板工作台', () => {
expect(listUnifiedCreationSpecs().map((spec) => spec.playId).sort()).toEqual(
['jump-hop', 'match3d', 'puzzle', 'wooden-fish'],
[
'baby-object-match',
'bark-battle',
'big-fish',
'creative-agent',
'jump-hop',
'match3d',
'puzzle',
'rpg',
'square-hole',
'visual-novel',
'wooden-fish',
],
);
});
@@ -22,7 +34,12 @@ describe('unified creation specs', () => {
expect([...fieldKinds].sort()).toEqual(['audio', 'image', 'select', 'text']);
});
test('四条链路都映射到统一创作、生成、结果阶段', () => {
test('主要链路都映射到统一创作、生成、结果阶段', () => {
expect(getUnifiedCreationSpec('rpg')).toMatchObject({
workspaceStage: 'agent-workspace',
generationStage: 'custom-world-generating',
resultStage: 'custom-world-result',
});
expect(getUnifiedCreationSpec('puzzle')).toMatchObject({
workspaceStage: 'puzzle-agent-workspace',
generationStage: 'puzzle-generating',
@@ -43,5 +60,20 @@ describe('unified creation specs', () => {
generationStage: 'wooden-fish-generating',
resultStage: 'wooden-fish-result',
});
expect(getUnifiedCreationSpec('bark-battle')).toMatchObject({
workspaceStage: 'bark-battle-workspace',
generationStage: 'bark-battle-generating',
resultStage: 'bark-battle-result',
});
expect(getUnifiedCreationSpec('visual-novel')).toMatchObject({
workspaceStage: 'visual-novel-agent-workspace',
generationStage: 'visual-novel-generating',
resultStage: 'visual-novel-result',
});
expect(getUnifiedCreationSpec('baby-object-match')).toMatchObject({
workspaceStage: 'baby-object-match-workspace',
generationStage: 'baby-object-match-generating',
resultStage: 'baby-object-match-result',
});
});
});