1
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
2026-04-20 21:06:48 +08:00
parent 1c72066bab
commit 75944b1f1f
102 changed files with 9648 additions and 1540 deletions

View File

@@ -157,9 +157,13 @@ test('adventure panel shows npc chat custom input and exit button in chat mode',
dialogue: [
{ speaker: 'player', text: '你刚才那句话是什么意思?' },
{ speaker: 'npc', speakerName: '柳无声', text: '意思是这件事还没结束。' },
{ speaker: 'system', text: '关系升温 好感 +3', affinityDelta: 3 },
],
options: [optionA, optionB, optionC],
npcAffinityEffect: {
eventId: 'effect-liu-1',
npcId: 'npc-liu',
delta: 3,
},
npcChatState: {
npcId: 'npc-liu',
npcName: '柳无声',
@@ -178,6 +182,7 @@ test('adventure panel shows npc chat custom input and exit button in chat mode',
expect(html).toContain('输入你想对 TA 说的话');
expect(html).toContain('发送');
expect(html).not.toContain('换一换');
expect(html).not.toContain('关系升温');
});
test('adventure panel hides custom input and shows quest offer actions during npc quest offer mode', () => {
@@ -243,3 +248,19 @@ test('adventure panel hides custom input and shows quest offer actions during np
expect(html).not.toContain('发送');
expect(html).not.toContain('输入你想对 TA 说的话');
});
test('adventure panel renders narrative story text without italics and hides option detail text', () => {
const option = createOption('idle_observe_signs', '观察风里残下的痕迹');
option.detailText = '这段说明不应该继续出现在 UI 里。';
const currentStory: StoryMoment = {
text: '风从桥洞里灌过来,你把注意力重新放回脚下与前路。',
options: [option],
};
const html = renderPanel(currentStory, [option]);
expect(html).toContain('font-serif');
expect(html).not.toContain('italic');
expect(html).toContain('text-[15px]');
expect(html).not.toContain('这段说明不应该继续出现在 UI 里。');
});