1
This commit is contained in:
@@ -60,9 +60,17 @@ function createSession(): BigFishSessionSnapshotResponse {
|
||||
level: 1,
|
||||
name: '荧潮幼体',
|
||||
oneLineFantasy: '在深海荧光裂谷中寻找第一个同伴。',
|
||||
textDescription:
|
||||
'荧潮幼体是深海谜境里的初始个体,体型最小,会先谨慎试探并寻找可吞噬目标。',
|
||||
silhouetteDirection: '圆润鱼苗',
|
||||
sizeRatio: 1,
|
||||
visualDescription:
|
||||
'带有浅青色荧光纹路的小型鱼苗,轮廓圆润,呈现弱小但灵动的开局形象。',
|
||||
visualPromptSeed: '深海荧光幼体',
|
||||
idleMotionDescription:
|
||||
'待机时轻微漂浮,尾鳍做小幅摆动,像是在观察周围海流。',
|
||||
moveMotionDescription:
|
||||
'移动时身体前探,尾鳍清晰摆尾推进,呈现连续游动感。',
|
||||
motionPromptSeed: '轻微摆尾',
|
||||
mergeSourceLevel: null,
|
||||
preyWindow: [1],
|
||||
@@ -147,6 +155,34 @@ describe('BigFishResultView', () => {
|
||||
expect(screen.getByAltText('深海谜境 场地背景')).toBeTruthy();
|
||||
});
|
||||
|
||||
test('uses level descriptions as default prompt content in asset studio', () => {
|
||||
render(
|
||||
<BigFishResultView
|
||||
session={createSession()}
|
||||
onBack={() => {}}
|
||||
onExecuteAction={() => {}}
|
||||
onStartTestRun={() => {}}
|
||||
/>,
|
||||
);
|
||||
|
||||
fireEvent.click(screen.getByRole('button', { name: '主图' }));
|
||||
expect(
|
||||
screen.getByText('带有浅青色荧光纹路的小型鱼苗,轮廓圆润,呈现弱小但灵动的开局形象。'),
|
||||
).toBeTruthy();
|
||||
fireEvent.click(screen.getByRole('button', { name: '关闭' }));
|
||||
|
||||
fireEvent.click(screen.getByRole('button', { name: '待机' }));
|
||||
expect(
|
||||
screen.getByText('待机时轻微漂浮,尾鳍做小幅摆动,像是在观察周围海流。'),
|
||||
).toBeTruthy();
|
||||
fireEvent.click(screen.getByRole('button', { name: '关闭' }));
|
||||
|
||||
fireEvent.click(screen.getByRole('button', { name: '移动' }));
|
||||
expect(
|
||||
screen.getByText('移动时身体前探,尾鳍清晰摆尾推进,呈现连续游动感。'),
|
||||
).toBeTruthy();
|
||||
});
|
||||
|
||||
test('shows publish failures in a dismissible modal', () => {
|
||||
const onDismissError = vi.fn();
|
||||
|
||||
|
||||
@@ -128,8 +128,10 @@ function BigFishAssetStudioModal({
|
||||
target.kind === 'stage_background'
|
||||
? draft.background.backgroundPromptSeed
|
||||
: target.kind === 'level_main_image'
|
||||
? target.level.visualPromptSeed
|
||||
: `${target.level.motionPromptSeed} / ${target.motionKey}`;
|
||||
? target.level.visualDescription || target.level.visualPromptSeed
|
||||
: target.motionKey === 'move_swim'
|
||||
? target.level.moveMotionDescription || target.level.motionPromptSeed
|
||||
: target.level.idleMotionDescription || target.level.motionPromptSeed;
|
||||
|
||||
const execute = () => {
|
||||
if (target.kind === 'stage_background') {
|
||||
@@ -162,7 +164,7 @@ function BigFishAssetStudioModal({
|
||||
<div className="mt-1 text-sm text-[var(--platform-text-base)]">
|
||||
{target.kind === 'stage_background'
|
||||
? draft.background.theme
|
||||
: target.level.oneLineFantasy}
|
||||
: target.level.textDescription || target.level.oneLineFantasy}
|
||||
</div>
|
||||
</div>
|
||||
<div className="space-y-4 px-4 py-4">
|
||||
|
||||
Reference in New Issue
Block a user