-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.webchat.config.ts
More file actions
64 lines (62 loc) · 1.73 KB
/
Copy pathplaywright.webchat.config.ts
File metadata and controls
64 lines (62 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import { defineConfig, devices } from '@playwright/test'
const baseURL = 'http://127.0.0.1:4175'
export default defineConfig({
testDir: './e2e',
testMatch: '**/chat.spec.ts',
timeout: 30_000,
expect: { timeout: 7_500 },
fullyParallel: false,
forbidOnly: Boolean(process.env.CI),
retries: process.env.CI ? 1 : 0,
workers: 1,
reporter: process.env.CI ? [['github'], ['list']] : 'list',
use: {
baseURL,
screenshot: 'only-on-failure',
trace: 'retain-on-failure',
video: 'off',
},
webServer: [
{
command: 'npm run dev -- --mode e2e --host 127.0.0.1 --port 4175 --strictPort',
url: baseURL,
reuseExistingServer: !process.env.CI,
timeout: 120_000,
env: {
VITE_WEBCHAT_UI_ENABLED: 'true',
VITE_WEBCHAT_IMAGE_INPUT_ENABLED: 'true',
VITE_WEBCHAT_API_URL: 'http://127.0.0.1:4176/api/chat',
VITE_SUPABASE_URL: '',
VITE_SUPABASE_ANON_KEY: '',
},
},
{
command: 'node e2e/mock-webchat-server.mjs',
url: 'http://127.0.0.1:4176/health',
reuseExistingServer: !process.env.CI,
timeout: 30_000,
},
],
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'], viewport: { width: 1280, height: 720 } },
},
{
name: 'firefox',
use: { ...devices['Desktop Firefox'], viewport: { width: 1440, height: 900 } },
},
{
name: 'webkit',
use: { ...devices['Desktop Safari'], viewport: { width: 1440, height: 900 } },
},
{
name: 'mobile-chromium',
use: { ...devices['Pixel 7'], viewport: { width: 390, height: 844 } },
},
{
name: 'wide-chromium',
use: { ...devices['Desktop Chrome'], viewport: { width: 1920, height: 1080 } },
},
],
})