Skip to content

Commit b73f26f

Browse files
committed
test(e2e): fix playwright config
1 parent 0724119 commit b73f26f

File tree

3 files changed

+59
-29
lines changed

3 files changed

+59
-29
lines changed

e2e/package-lock.json

Lines changed: 41 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

e2e/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"@types/node": "^22.14.1"
1313
},
1414
"dependencies": {
15-
"dotenv": "^16.5.0"
15+
"dotenv": "^16.5.0",
16+
"playwright": "^1.56.1"
1617
}
1718
}

e2e/playwright.config.ts

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import { defineConfig, devices } from '@playwright/test';
22

3-
import dotenv from 'dotenv';
4-
dotenv.config();
5-
63
/**
74
* Read environment variables from file.
85
* https://github.com/motdotla/dotenv
96
*/
10-
// import dotenv from 'dotenv';
11-
// import path from 'path';
12-
// dotenv.config({ path: path.resolve(__dirname, '.env') });
7+
// @ts-ignore
8+
import dotenv from 'dotenv';
9+
// @ts-ignore
10+
import path from 'path';
11+
dotenv.config({ path: path.resolve(__dirname, '.env') });
1312

1413
/**
1514
* See https://playwright.dev/docs/test-configuration.
@@ -23,7 +22,7 @@ export default defineConfig({
2322
/* Retry on CI only */
2423
retries: process.env.CI ? 2 : 0,
2524
/* Opt out of parallel tests on CI. */
26-
workers: process.env.CI ? 1 : undefined,
25+
workers: 3, // process.env.CI ? 1 : undefined,
2726
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
2827
reporter: 'html',
2928
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
@@ -40,18 +39,18 @@ export default defineConfig({
4039
projects: [
4140
{
4241
name: 'chromium',
43-
use: { ...devices['Desktop Chrome'] },
44-
},
45-
46-
{
47-
name: 'firefox',
48-
use: { ...devices['Desktop Firefox'] },
42+
use: { ...devices['Desktop Chrome'], channel: 'chromium' },
4943
},
5044

51-
{
52-
name: 'webkit',
53-
use: { ...devices['Desktop Safari'] },
54-
},
45+
// {
46+
// name: 'firefox',
47+
// use: { ...devices['Desktop Firefox'] },
48+
// },
49+
//
50+
// {
51+
// name: 'webkit',
52+
// use: { ...devices['Desktop Safari'] },
53+
// },
5554

5655
/* Test against mobile viewports. */
5756
// {

0 commit comments

Comments
 (0)