@flakiness/playwright 1.1.0-alpha.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -14,6 +14,7 @@ A custom Playwright test reporter that generates Flakiness Reports from your Pla
|
|
|
14
14
|
- [Environment Detection](#environment-detection)
|
|
15
15
|
- [CI Integration](#ci-integration)
|
|
16
16
|
- [Configuration Options](#configuration-options)
|
|
17
|
+
- [`flakinessProject?: string`](#flakinessproject-string)
|
|
17
18
|
- [`endpoint?: string`](#endpoint-string)
|
|
18
19
|
- [`token?: string`](#token-string)
|
|
19
20
|
- [`outputFolder?: string`](#outputfolder-string)
|
|
@@ -62,7 +63,12 @@ npx flakiness show ./flakiness-report
|
|
|
62
63
|
|
|
63
64
|
## Uploading Reports
|
|
64
65
|
|
|
65
|
-
Reports are automatically uploaded to Flakiness.io in the `onExit()` hook
|
|
66
|
+
Reports are automatically uploaded to Flakiness.io in the `onExit()` hook. Authentication can be done in two ways:
|
|
67
|
+
|
|
68
|
+
- **Access token**: Provide a token via the `token` option or the `FLAKINESS_ACCESS_TOKEN` environment variable.
|
|
69
|
+
- **GitHub OIDC**: When running in GitHub Actions, the reporter can authenticate using GitHub's OIDC token — no access token needed. This requires two conditions:
|
|
70
|
+
1. The `flakinessProject` option must be set to your Flakiness.io project identifier (`org/project`).
|
|
71
|
+
2. The Flakiness.io project must be bound to the GitHub repository that runs the GitHub Actions workflow.
|
|
66
72
|
|
|
67
73
|
If upload fails, the report is still available locally in the output folder.
|
|
68
74
|
|
|
@@ -126,6 +132,16 @@ The reporter automatically detects CI environments and includes:
|
|
|
126
132
|
|
|
127
133
|
The reporter accepts the following options:
|
|
128
134
|
|
|
135
|
+
### `flakinessProject?: string`
|
|
136
|
+
|
|
137
|
+
The Flakiness.io project identifier in `org/project` format. Used for GitHub OIDC authentication — when set, and the Flakiness.io project is bound to the GitHub repository running the workflow, the reporter authenticates uploads via GitHub Actions OIDC token with no access token required.
|
|
138
|
+
|
|
139
|
+
```typescript
|
|
140
|
+
reporter: [
|
|
141
|
+
['@flakiness/playwright', { flakinessProject: 'my-org/my-project' }]
|
|
142
|
+
]
|
|
143
|
+
```
|
|
144
|
+
|
|
129
145
|
### `endpoint?: string`
|
|
130
146
|
|
|
131
147
|
Custom Flakiness.io endpoint URL for uploading reports. Defaults to the `FLAKINESS_ENDPOINT` environment variable, or `https://flakiness.io` if not set.
|
|
@@ -206,6 +222,7 @@ import { defineConfig } from '@playwright/test';
|
|
|
206
222
|
export default defineConfig({
|
|
207
223
|
reporter: [
|
|
208
224
|
['@flakiness/playwright', {
|
|
225
|
+
flakinessProject: 'my-org/my-project',
|
|
209
226
|
endpoint: process.env.FLAKINESS_ENDPOINT,
|
|
210
227
|
token: process.env.FLAKINESS_ACCESS_TOKEN,
|
|
211
228
|
outputFolder: './flakiness-report',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flakiness/playwright",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@flakiness/flakiness-report": "^0.25.0",
|
|
40
|
-
"@flakiness/sdk": "
|
|
40
|
+
"@flakiness/sdk": "2.0.0",
|
|
41
41
|
"chalk": "^5.6.2"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|