forked from fairnesscoop/permacoop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaywright.config.ts
36 lines (32 loc) · 945 Bytes
/
playwright.config.ts
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
import * as path from 'path';
import { config } from 'dotenv';
import { type PlaywrightTestConfig, devices } from "@playwright/test";
config({ path: path.resolve(process.cwd(), '.env.local') });
config({ path: path.resolve(process.cwd(), '.env') });
const port = 3038;
const pwConfig: PlaywrightTestConfig = {
testDir: "./e2e",
retries: 0,
timeout: 10 * 1000,
use: {
baseURL: `http://localhost:${port}`,
browserName: "firefox",
headless: true,
screenshot: "only-on-failure",
video: "on-first-retry",
},
projects: [
{ name: 'setup', testMatch: /.*\.setup\.js/ },
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
dependencies: ['setup'],
},
],
webServer: {
command: `make start-dist DATABASE_NAME=${process.env.DATABASE_NAME + '_test'} PORT=${port}`,
reuseExistingServer: !process.env.CI,
url: `http://localhost:${port}`,
},
};
export default pwConfig;