chore: add wait time for loader
This commit is contained in:
parent
cdab762a6a
commit
9abea8067b
@ -1,7 +1,7 @@
|
||||
import { expect } from '@playwright/test'
|
||||
import { page, test, TIMEOUT } from '../config/fixtures'
|
||||
|
||||
test('Select GPT model for chat via Use model button from Jan Hub', async ({ hubPage }) => {
|
||||
test('Select GPT model from Hub and Chat with Invalid API Key', async ({ hubPage }) => {
|
||||
await hubPage.navigateByMenu()
|
||||
await hubPage.verifyContainerVisible()
|
||||
|
||||
@ -23,6 +23,8 @@ test('Select GPT model for chat via Use model button from Jan Hub', async ({ hub
|
||||
.getByTestId('btn-send-chat')
|
||||
.click()
|
||||
|
||||
await page.waitForSelector('[data-testid$="-loader"]', { state: 'hidden', timeout: TIMEOUT });
|
||||
|
||||
const APIKeyError = page.getByTestId('invalid-API-key-error')
|
||||
await expect(APIKeyError).toBeVisible({
|
||||
timeout: TIMEOUT,
|
||||
|
||||
@ -31,6 +31,7 @@ export default function GenerateResponse() {
|
||||
<div
|
||||
className="absolute left-0 top-0 h-full bg-gray-200"
|
||||
style={{ width: `${loader}%` }}
|
||||
data-testid="response-loader"
|
||||
/>
|
||||
<span className="relative z-10">Generating response...</span>
|
||||
</div>
|
||||
|
||||
@ -40,6 +40,7 @@ export default function ModelStart() {
|
||||
<div
|
||||
className="absolute left-0 top-0 h-full bg-blue-200"
|
||||
style={{ width: `${loader}%` }}
|
||||
data-testid="model-loader"
|
||||
/>
|
||||
<span className="relative z-10">
|
||||
{stateModel.state === 'start' ? 'Starting' : 'Stopping'}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user