Skip to content

Commit bb18f84

Browse files
committed
chore: update e2e
1 parent f909728 commit bb18f84

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

electron/tests/e2e/thread.e2e.spec.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@ test('Select GPT model from Hub and Chat with Invalid API Key', async ({
1515

1616
await page.getByTestId('txt-input-chat').fill('dummy value')
1717

18-
await page.getByTestId('btn-deny-product-analytics').click({ force: true })
19-
await page.getByTestId('btn-send-chat').click({ force: true })
18+
const denyButton = page.locator('[data-testid="btn-deny-product-analytics"]')
19+
20+
if ((await denyButton.count()) > 0) {
21+
await denyButton.click({ force: true })
22+
} else {
23+
await page.getByTestId('btn-send-chat').click({ force: true })
24+
}
2025

2126
await page.waitForFunction(
2227
() => {

0 commit comments

Comments
 (0)