1
This commit is contained in:
@@ -147,6 +147,25 @@ test('adventure panel does not show deferred hint for non-continue options with
|
||||
expect(html).not.toContain('剧情推理完成,继续后显示新的冒险选项');
|
||||
});
|
||||
|
||||
test('adventure panel renders compact function tags before option text', () => {
|
||||
const chatOption = createOption('npc_chat', '继续追问桥上的旧账');
|
||||
const questOption = createOption('npc_quest_accept', '接下断桥客的委托');
|
||||
const giftOption = createOption('npc_gift', '把玉牌递给柳无声');
|
||||
const currentStory: StoryMoment = {
|
||||
text: '你看向眼前的人。',
|
||||
options: [chatOption, questOption, giftOption],
|
||||
};
|
||||
|
||||
const html = renderPanel(currentStory, [chatOption, questOption, giftOption]);
|
||||
|
||||
expect(html).toContain('聊天');
|
||||
expect(html).toContain('继续追问桥上的旧账');
|
||||
expect(html).toContain('任务');
|
||||
expect(html).toContain('接下断桥客的委托');
|
||||
expect(html).toContain('送礼');
|
||||
expect(html).toContain('把玉牌递给柳无声');
|
||||
});
|
||||
|
||||
test('adventure panel shows npc chat custom input and exit button in chat mode', () => {
|
||||
const optionA = createOption('npc_chat', '先听对方把话说完');
|
||||
const optionB = createOption('npc_chat', '顺着这个问题继续追问');
|
||||
@@ -181,7 +200,7 @@ test('adventure panel shows npc chat custom input and exit button in chat mode',
|
||||
expect(html).toContain('退出聊天');
|
||||
expect(html).toContain('输入你想对 TA 说的话');
|
||||
expect(html).toContain('发送');
|
||||
expect(html).not.toContain('换一换');
|
||||
expect(html).toContain('换一换');
|
||||
expect(html).not.toContain('关系升温');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user