-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
45 lines (43 loc) · 949 Bytes
/
playwright.config.ts
File metadata and controls
45 lines (43 loc) · 949 Bytes
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
import { defineConfig, devices } from '@playwright/test'
const baseURL = process.env.PLAYWRIGHT_BASE_URL ?? 'http://127.0.0.1:4173'
const webServer = process.env.PLAYWRIGHT_BASE_URL
? undefined
: {
command: 'node test/e2e/runsInBrowsers/server.mjs',
url: baseURL,
env: {
...process.env,
PORT: new URL(baseURL).port || '4173',
},
reuseExistingServer: true,
}
export default defineConfig({
testDir: 'test/e2e/runsInBrowsers',
timeout: 30000,
use: {
baseURL,
},
webServer,
projects: [
{
name: 'chromium',
use: { browserName: 'chromium' },
},
{
name: 'firefox',
use: { browserName: 'firefox' },
},
{
name: 'webkit',
use: { browserName: 'webkit' },
},
{
name: 'mobile-chrome',
use: { ...devices['Pixel 5'] },
},
{
name: 'mobile-safari',
use: { ...devices['iPhone 12'] },
},
],
})