|
1 | 1 | import { CurrentsConfig, currentsReporter } from "@currents/playwright"; |
2 | | -import config from "./pw.config.shared"; |
3 | 2 |
|
4 | 3 | const currentsConfig: CurrentsConfig = { |
5 | | - projectId: process.env.CURRENTS_PROJECT_ID ?? "xx", |
6 | | - recordKey: process.env.CURRENTS_RECORD_KEY ?? "yy", |
7 | | - outputFile: "currents-report.json", |
| 4 | + projectId: "bnsqNa", |
| 5 | + recordKey: "KPEvZL0LDYzcZH3U", |
8 | 6 | }; |
9 | 7 |
|
10 | | -export default { ...config, reporter: [currentsReporter(currentsConfig)] }; |
| 8 | +import { CurrentsFixtures, CurrentsWorkerFixtures } from "@currents/playwright"; |
| 9 | +import { defineConfig, devices } from "@playwright/test"; |
| 10 | + |
| 11 | +const config = defineConfig<CurrentsFixtures, CurrentsWorkerFixtures>({ |
| 12 | + timeout: 10 * 1000, |
| 13 | + |
| 14 | + fullyParallel: true, |
| 15 | + |
| 16 | + expect: { |
| 17 | + timeout: 5000, |
| 18 | + }, |
| 19 | + |
| 20 | + forbidOnly: !!process.env.CI, |
| 21 | + retries: process.env.CI ? 2 : 0, |
| 22 | + workers: process.env.CI ? 1 : undefined, |
| 23 | + reporter: [currentsReporter(currentsConfig)], |
| 24 | + |
| 25 | + use: { |
| 26 | + actionTimeout: 0, |
| 27 | + trace: "on", |
| 28 | + video: "on", |
| 29 | + screenshot: "on", |
| 30 | + // We can disable Currents fixtures if no project ID is provided |
| 31 | + currentsFixturesEnabled: !!process.env.CURRENTS_PROJECT_ID, |
| 32 | + }, |
| 33 | + |
| 34 | + projects: [ |
| 35 | + { |
| 36 | + name: "Project A", |
| 37 | + retries: 2, |
| 38 | + use: { |
| 39 | + ...devices["Desktop Chrome"], |
| 40 | + }, |
| 41 | + }, |
| 42 | + { |
| 43 | + name: "Project B", |
| 44 | + retries: 2, |
| 45 | + use: { |
| 46 | + ...devices["Desktop Chrome"], |
| 47 | + }, |
| 48 | + }, |
| 49 | + ], |
| 50 | + |
| 51 | + webServer: { |
| 52 | + command: "node ./server/index.js", |
| 53 | + port: 4346, |
| 54 | + reuseExistingServer: !process.env.CI, |
| 55 | + stdout: "ignore", |
| 56 | + stderr: "pipe", |
| 57 | + }, |
| 58 | + |
| 59 | + /* Folder for test artifacts such as screenshots, videos, traces, etc. */ |
| 60 | + outputDir: "test-results/", |
| 61 | +}); |
| 62 | + |
| 63 | +export default config; |
0 commit comments