jan/electron/tests/e2e/thread.e2e.spec.ts
Faisal Amir c62b6e9842
fix: small leftover issues with new starter screen (#3661)
* fix: fix duplicate render progress component

* fix: minor ui issue

* chore: add manual recommend model

* chore: make button create thread invisible

* chore: fix conflict

* chore: remove selector create thread icon

* test: added unit test thread screen
2024-09-17 22:13:18 +07:00

33 lines
840 B
TypeScript

import { expect } from '@playwright/test'
import { page, test, TIMEOUT } from '../config/fixtures'
test('Select GPT model from Hub and Chat with Invalid API Key', async ({
hubPage,
}) => {
await hubPage.navigateByMenu()
await hubPage.verifyContainerVisible()
// Select the first GPT model
await page
.locator('[data-testid^="use-model-btn"][data-testid*="gpt"]')
.first()
.click()
await page.getByTestId('txt-input-chat').fill('dummy value')
await page.getByTestId('btn-send-chat').click()
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({
timeout: TIMEOUT,
})
})