Skip to content

Commit

Permalink
chore: test wait timeout on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Van-QA committed Apr 11, 2024
1 parent 9abea80 commit 09080a9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion electron/tests/e2e/thread.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ test('Select GPT model from Hub and Chat with Invalid API Key', async ({ hubPage
.getByTestId('btn-send-chat')
.click()

await page.waitForSelector('[data-testid$="-loader"]', { state: 'hidden', timeout: TIMEOUT });
await page.waitForFunction(() => {
const loaders = document.querySelectorAll('[data-testid$="loader"]');
return !loaders.length;
}, { timeout: TIMEOUT });

const APIKeyError = page.getByTestId('invalid-API-key-error')
await expect(APIKeyError).toBeVisible({
Expand Down

0 comments on commit 09080a9

Please sign in to comment.