-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaywright.config.js
44 lines (40 loc) · 998 Bytes
/
playwright.config.js
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
import { devices, defineConfig } from '@playwright/test';
import path from "path"
const port = process.env.PORT || 4500
const testDir = './test2'
export default defineConfig({
projects: [
{
name: 'Chromium',
use: {...devices['Desktop Chrome']},
testMatch: path.join(testDir, "browser.spec.ts")
},
{
name: 'Firefox',
use: {...devices['Desktop Firefox']},
testMatch: path.join(testDir, "browser.spec.ts")
},
{
name: 'WebKit',
use: {...devices['Desktop Safari']},
testMatch: path.join(testDir, "browser.spec.ts")
},
{
name: 'Node',
testMatch: path.join(testDir, "node.spec.ts")
},
],
// Global configuration options
use: {
headless: true,
baseURL: `http://127.0.0.1:${port}`,
testDir: testDir,
},
webServer: {
command: `PORT=${port} node dummyServer.js`,
url: `http://127.0.0.1:${port}`,
reuseExistingServer: true,
stdout: 'pipe',
stderr: 'pipe',
},
})