Skip to content

Commit 38ac7c3

Browse files
committed
added basic playwright config
1 parent 07248b0 commit 38ac7c3

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

playwright.config.ts

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import { defineConfig, devices } from "@playwright/test";
2+
3+
/**
4+
* Read environment variables from file.
5+
* https://github.com/motdotla/dotenv
6+
*/
7+
// require('dotenv').config();
8+
9+
/**
10+
* See https://playwright.dev/docs/test-configuration.
11+
*/
12+
export default defineConfig({
13+
testDir: "./playwright",
14+
fullyParallel: true,
15+
forbidOnly: !!process.env.CI,
16+
retries: process.env.CI ? 2 : 0,
17+
workers: process.env.CI ? 1 : undefined,
18+
reporter: "html",
19+
use: {
20+
baseURL: "http://localhost:3000",
21+
trace: "on-first-retry",
22+
},
23+
24+
projects: [
25+
{
26+
name: "chromium",
27+
use: { ...devices["Desktop Chrome"] },
28+
},
29+
30+
{
31+
name: "firefox",
32+
use: { ...devices["Desktop Firefox"] },
33+
},
34+
35+
{
36+
name: "webkit",
37+
use: { ...devices["Desktop Safari"] },
38+
},
39+
],
40+
41+
/* Run your local dev server before starting the tests */
42+
webServer: {
43+
command: "npm run start",
44+
url: "http://localhost:3000",
45+
reuseExistingServer: !process.env.CI,
46+
},
47+
});

0 commit comments

Comments
 (0)