fix: stabilize rpg creation entry and opening cg

This commit is contained in:
kdletters
2026-05-21 17:21:38 +08:00
parent 0eed942ce5
commit 41075e41a2
26 changed files with 866 additions and 47 deletions

View File

@@ -25,6 +25,17 @@ const testEntryConfig = {
description: '先选玩法类型,再进入对应创作工作台。',
},
creationTypes: [
{
id: 'rpg',
title: '文字冒险',
subtitle: '经典 RPG 体验',
badge: '可创建',
imageSrc: '/creation-type-references/rpg.webp',
visible: true,
open: true,
sortOrder: 10,
updatedAtMicros: 1,
},
{
id: 'puzzle',
title: '拼图',
@@ -253,14 +264,18 @@ test('creation hub reflects updated draft title summary and counts after rerende
const match3dButton = screen.getByRole('button', {
name: /.*3D /u,
});
const rpgButton = screen.getByRole('button', {
name: /.* RPG /u,
});
expect(puzzleButton).toBeTruthy();
expect(match3dButton).toBeTruthy();
expect(rpgButton).toBeTruthy();
expect((puzzleButton as HTMLButtonElement).disabled).toBe(false);
expect((match3dButton as HTMLButtonElement).disabled).toBe(false);
expect((rpgButton as HTMLButtonElement).disabled).toBe(false);
expect(screen.queryByRole('button', { name: //u })).toBeNull();
expect(screen.queryByText('反直觉形状分拣')).toBeNull();
expect(screen.queryByRole('button', { name: //u })).toBeNull();
expect(screen.queryByRole('button', { name: //u })).toBeNull();
expect(screen.queryByRole('button', { name: //u })).toBeNull();
await user.click(match3dButton);