Skip to content

Commit 0587712

Browse files
committed
update: playwright.config.ts — test on chromium
1 parent 5992e1d commit 0587712

File tree

1 file changed

+1
-55
lines changed

1 file changed

+1
-55
lines changed

playwright.config.ts

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,24 @@
11
import { defineConfig, devices } from '@playwright/test';
22

3-
/**
4-
* Read environment variables from file.
5-
* https://github.com/motdotla/dotenv
6-
*/
7-
// import dotenv from 'dotenv';
8-
// import path from 'path';
9-
// dotenv.config({ path: path.resolve(path.dirname("/"), '.env') });
10-
11-
123
const localhost = "http://localhost:8080"
13-
/**
14-
* See https://playwright.dev/docs/test-configuration.
15-
*/
4+
165
export default defineConfig({
176
testDir: './tests',
18-
/* Run tests in files in parallel */
197
fullyParallel: true,
20-
/* Fail the build on CI if you accidentally left test.only in the source code. */
218
forbidOnly: !!process.env.CI,
22-
/* Retry on CI only */
239
retries: process.env.CI ? 2 : 0,
24-
/* Opt out of parallel tests on CI. */
2510
workers: process.env.CI ? 1 : undefined,
26-
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
2711
reporter: [['html', { open: 'never' }]],
28-
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
2912
use: {
30-
/* Base URL to use in actions like `await page.goto('/')`. */
3113
baseURL: localhost,
32-
33-
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
3414
trace: 'on-first-retry',
3515
},
36-
37-
/* Configure projects for major browsers */
3816
projects: [
3917
{
4018
name: 'chromium',
4119
use: { ...devices['Desktop Chrome'] },
4220
},
43-
44-
{
45-
name: 'firefox',
46-
use: { ...devices['Desktop Firefox'] },
47-
},
48-
49-
{
50-
name: 'webkit',
51-
use: { ...devices['Desktop Safari'] },
52-
},
53-
54-
/* Test against mobile viewports. */
55-
// {
56-
// name: 'Mobile Chrome',
57-
// use: { ...devices['Pixel 5'] },
58-
// },
59-
// {
60-
// name: 'Mobile Safari',
61-
// use: { ...devices['iPhone 12'] },
62-
// },
63-
64-
/* Test against branded browsers. */
65-
// {
66-
// name: 'Microsoft Edge',
67-
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
68-
// },
69-
// {
70-
// name: 'Google Chrome',
71-
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
72-
// },
7321
],
74-
75-
/* Run your local dev server before starting the tests */
7622
webServer: {
7723
command: 'npm run dev',
7824
url: localhost,

0 commit comments

Comments
 (0)