Skip to content

Commit 17a9b21

Browse files
committed
chore: demo
1 parent 5d1f439 commit 17a9b21

File tree

4 files changed

+59
-10
lines changed

4 files changed

+59
-10
lines changed

.github/workflows/test-basic-reporter.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
3030
- uses: actions/setup-node@v4
3131
with:
32-
node-version: "18.x"
32+
node-version: "22.x"
3333

3434
- name: Install dependencies
3535
run: |
@@ -39,9 +39,5 @@ jobs:
3939
- name: Run Basic Tests
4040
continue-on-error: false
4141
working-directory: ./basic
42-
env:
43-
CURRENTS_PROJECT_ID: bnsqNa
44-
CURRENTS_RECORD_KEY: ${{ secrets.CURRENTS_RECORD_KEY }}
45-
CURRENTS_CI_BUILD_ID: reporter-${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt }}
4642
run: |
4743
npx playwright test --shard=${{ matrix.shard }}/${{ strategy.job-total }} --config ./playwright.config.reporter.ts
File renamed without changes.
File renamed without changes.
Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,63 @@
11
import { CurrentsConfig, currentsReporter } from "@currents/playwright";
2-
import config from "./pw.config.shared";
32

43
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",
86
};
97

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

Comments
 (0)