1
This commit is contained in:
@@ -63,3 +63,31 @@ test('filters empty recommended replies and avoids duplicate key warnings', () =
|
||||
|
||||
expect(duplicateKeyCalls).toHaveLength(0);
|
||||
});
|
||||
|
||||
test('renders a streaming assistant bubble without timestamps', () => {
|
||||
if (!Element.prototype.scrollIntoView) {
|
||||
Element.prototype.scrollIntoView = () => {};
|
||||
}
|
||||
|
||||
render(
|
||||
<CustomWorldAgentThread
|
||||
messages={[
|
||||
{
|
||||
id: 'message-1',
|
||||
role: 'user',
|
||||
kind: 'chat',
|
||||
text: '我想做一个潮湿压抑的海上世界。',
|
||||
createdAt: '2026-04-16T10:01:00.000Z',
|
||||
relatedOperationId: null,
|
||||
},
|
||||
]}
|
||||
streamingReplyText="那我先顺着这个方向收一下,开场时你更想让玩家撞上什么麻烦"
|
||||
isStreamingReply
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(
|
||||
screen.getByText(/那我先顺着这个方向收一下/u),
|
||||
).toBeTruthy();
|
||||
expect(screen.queryByText('10:01')).toBeNull();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user