Skip to content

Commit

Permalink
flaky e2e fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrisse committed Jul 23, 2024
1 parent 302c601 commit e6f4dd1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/leapfrogai_ui/tests/chat.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ function countWords(str: string) {
test('it cancels responses', async ({ page, openAIClient }) => {
await loadChatPage(page);
const messages = page.getByTestId('message');
await sendMessage(page, newMessage1);
await sendMessage(page, LONG_RESPONSE_PROMPT);
await expect(messages).toHaveCount(2); // ensure new response is being received
await page.waitForTimeout(25); // let it partially complete
await page.getByTestId('cancel message').click();
await page.waitForTimeout(200); // wait to ensure new question was not sent
await expect(messages).toHaveCount(2);
Expand Down

0 comments on commit e6f4dd1

Please sign in to comment.