Skip to content

Commit 9a2c58d

Browse files
authored
Merge pull request #204 from piyush97/fix/misc
enhanced OG
2 parents 454e1f7 + 1521032 commit 9a2c58d

23 files changed

+4026
-107
lines changed

playwright.config.ts

Lines changed: 20 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,36 @@
1-
import { defineConfig, devices } from '@playwright/test';
1+
import { defineConfig, devices } from "@playwright/test";
22

3-
/**
4-
* @see https://playwright.dev/docs/test-configuration
5-
*/
63
export default defineConfig({
7-
testDir: './tests',
8-
// Run tests in files in parallel
4+
testDir: "./tests",
95
fullyParallel: true,
10-
// Fail the build on CI if you accidentally left test.only in the source code
116
forbidOnly: !!process.env.CI,
12-
// Retry on CI only
137
retries: process.env.CI ? 2 : 0,
14-
// Opt out of parallel tests on CI
158
workers: process.env.CI ? 1 : undefined,
16-
// Reporter to use
17-
reporter: 'html',
18-
// Shared settings for all the projects below
9+
reporter: [
10+
["html", { outputFolder: "test-reports/playwright-html-report" }],
11+
["json", { outputFile: "test-reports/playwright-results.json" }],
12+
["list"],
13+
],
1914
use: {
20-
// Base URL to use in actions like `await page.goto('/')`
21-
baseURL: 'http://localhost:4321',
22-
// Collect trace when retrying the failed test
23-
trace: 'on-first-retry',
24-
// Take screenshot on failure
25-
screenshot: 'only-on-failure',
26-
// Record video on failure
27-
video: 'retain-on-failure',
15+
baseURL: "http://localhost:4322",
16+
trace: "on-first-retry",
17+
screenshot: "only-on-failure",
18+
video: "retain-on-failure",
19+
},
20+
timeout: 60000,
21+
expect: {
22+
timeout: 30000,
2823
},
29-
30-
// Configure projects for major browsers
3124
projects: [
3225
{
33-
name: 'chromium',
34-
use: { ...devices['Desktop Chrome'] },
35-
},
36-
{
37-
name: 'firefox',
38-
use: { ...devices['Desktop Firefox'] },
39-
},
40-
{
41-
name: 'webkit',
42-
use: { ...devices['Desktop Safari'] },
43-
},
44-
// Test against mobile viewports
45-
{
46-
name: 'Mobile Chrome',
47-
use: { ...devices['Pixel 5'] },
48-
},
49-
{
50-
name: 'Mobile Safari',
51-
use: { ...devices['iPhone 12'] },
26+
name: "chromium",
27+
use: { ...devices["Desktop Chrome"] },
5228
},
5329
],
54-
55-
// Run your local dev server before starting the tests
5630
webServer: {
57-
command: 'npm run dev',
58-
url: 'http://localhost:4321',
31+
command: "npm run dev",
32+
url: "http://localhost:4321",
5933
reuseExistingServer: !process.env.CI,
6034
timeout: 120 * 1000,
6135
},
62-
});
36+
});

0 commit comments

Comments
 (0)