diff --git a/src/widgets/Xpert.test.jsx b/src/widgets/Xpert.test.jsx index 99bfb100..8b917db9 100644 --- a/src/widgets/Xpert.test.jsx +++ b/src/widgets/Xpert.test.jsx @@ -174,9 +174,9 @@ test('loading message appears in the sidebar while the response loads', async () // API skipped straight to rendering the response message. await fireEvent.click(screen.getByRole('button', { name: 'submit' })); - waitFor(async () => { - await screen.findByText('Xpert is thinking'); - await screen.findByText(responseMessage.content); + waitFor(() => { + screen.getByText('Xpert is thinking'); + screen.getByText(responseMessage.content); }); }); test('response text appears as message in the sidebar', async () => {