style(teacher): make the retry action a playful sticker
This commit is contained in:
@@ -501,7 +501,7 @@ describe('teacher side chat', () => {
|
||||
await screen.findByText('这次没有看清楚,请再试一次。');
|
||||
expect(screen.queryByText('{"intro":"未完成')).not.toBeInTheDocument();
|
||||
expect(screen.queryByRole('button', { name: suggestedQuestions[0] })).not.toBeInTheDocument();
|
||||
fireEvent.click(screen.getByRole('button', { name: '再请智能体看看', exact: true }));
|
||||
fireEvent.click(screen.getByRole('button', { name: '继续看看👀', exact: true }));
|
||||
await screen.findByText('我们可以从最近遇到的这两个地方聊起。');
|
||||
expect(api.send.mock.calls[0][2]).toMatchObject({ intent: 'suggestions' });
|
||||
expect(api.send.mock.calls[0][2].requestId).not.toBe(failed.id);
|
||||
@@ -529,10 +529,10 @@ describe('teacher side chat', () => {
|
||||
act(() => streams.get('first')!.dispatchEvent(new MessageEvent('snapshot', { data: JSON.stringify(recovered) })));
|
||||
}
|
||||
await screen.findByText('智能体已接到,但这次回复失败了');
|
||||
await waitFor(() => expect(screen.getByRole('button', { name: '再请智能体看看', exact: true })).toBeEnabled());
|
||||
await waitFor(() => expect(screen.getByRole('button', { name: '继续看看👀', exact: true })).toBeEnabled());
|
||||
expect(screen.getByLabelText('向智能体提问')).toHaveValue('我的自由提问继续留着');
|
||||
expect(api.send).toHaveBeenCalledTimes(1);
|
||||
fireEvent.click(screen.getByRole('button', { name: '再请智能体看看', exact: true }));
|
||||
fireEvent.click(screen.getByRole('button', { name: '继续看看👀', exact: true }));
|
||||
await screen.findByText('我们可以从最近遇到的这两个地方聊起。');
|
||||
expect(api.send).toHaveBeenCalledTimes(2);
|
||||
expect(api.send.mock.calls[1][2].requestId).not.toBe(originalRequest.requestId);
|
||||
|
||||
Reference in New Issue
Block a user