Skip to content

Commit

Permalink
test: fix playwright tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sinedied committed Mar 5, 2024
1 parent e94ad3b commit 09dc529
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
22 changes: 11 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions tests/e2e/webapp.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,12 @@ test.describe('default', () => {
await page.goto('/');
await page.getByTestId('default-question').nth(0).click();

await page.route('/chat', (route) =>
await page.route('/chat', async (route) => {
await new Promise((resolve) => setTimeout(resolve, 5000));
route.fulfill({
status: -1,
}),
);
status: 200,
});
});

await expect(page.getByTestId('loading-indicator')).not.toBeVisible();
await page.getByTestId('submit-question-button').click();
Expand Down

0 comments on commit 09dc529

Please sign in to comment.