playwright-ctrf-json-reporter 0.0.26 → 0.0.27
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 +1 -0
- package/dist/generate-report.d.ts +1 -0
- package/dist/generate-report.js +6 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -122,6 +122,7 @@ reporter: [
|
|
|
122
122
|
repositoryName: "ctrf-json", // Optional: Specify the repository name.
|
|
123
123
|
repositoryUrl: "https://gh.io", // Optional: Specify the repository url.
|
|
124
124
|
branchName: "main", // Optional: Specify the branch name.
|
|
125
|
+
commit: "abc123", // Optional: Specify the commit id.
|
|
125
126
|
testEnvironment: "staging" // Optional: Specify the test environment (e.g. staging, production).
|
|
126
127
|
}]
|
|
127
128
|
],
|
|
@@ -18,6 +18,7 @@ interface ReporterConfigOptions {
|
|
|
18
18
|
repositoryName?: string | undefined;
|
|
19
19
|
repositoryUrl?: string | undefined;
|
|
20
20
|
branchName?: string | undefined;
|
|
21
|
+
commit?: string | undefined;
|
|
21
22
|
testEnvironment?: string | undefined;
|
|
22
23
|
}
|
|
23
24
|
declare class GenerateCtrfReport implements Reporter {
|
package/dist/generate-report.js
CHANGED
|
@@ -8,7 +8,7 @@ const fs_1 = __importDefault(require("fs"));
|
|
|
8
8
|
const crypto_1 = __importDefault(require("crypto"));
|
|
9
9
|
class GenerateCtrfReport {
|
|
10
10
|
constructor(config) {
|
|
11
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
11
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
12
12
|
this.reporterName = 'playwright-ctrf-json-reporter';
|
|
13
13
|
this.defaultOutputFile = 'ctrf-report.json';
|
|
14
14
|
this.defaultOutputDir = 'ctrf';
|
|
@@ -30,7 +30,8 @@ class GenerateCtrfReport {
|
|
|
30
30
|
repositoryName: (_q = config === null || config === void 0 ? void 0 : config.repositoryName) !== null && _q !== void 0 ? _q : undefined,
|
|
31
31
|
repositoryUrl: (_r = config === null || config === void 0 ? void 0 : config.repositoryUrl) !== null && _r !== void 0 ? _r : undefined,
|
|
32
32
|
branchName: (_s = config === null || config === void 0 ? void 0 : config.branchName) !== null && _s !== void 0 ? _s : undefined,
|
|
33
|
-
|
|
33
|
+
commit: (_t = config === null || config === void 0 ? void 0 : config.commit) !== null && _t !== void 0 ? _t : undefined,
|
|
34
|
+
testEnvironment: (_u = config === null || config === void 0 ? void 0 : config.testEnvironment) !== null && _u !== void 0 ? _u : undefined,
|
|
34
35
|
};
|
|
35
36
|
this.ctrfReport = {
|
|
36
37
|
reportFormat: 'CTRF',
|
|
@@ -228,6 +229,9 @@ class GenerateCtrfReport {
|
|
|
228
229
|
if (reporterConfigOptions.branchName !== undefined) {
|
|
229
230
|
this.ctrfEnvironment.branchName = reporterConfigOptions.branchName;
|
|
230
231
|
}
|
|
232
|
+
if (reporterConfigOptions.commit !== undefined) {
|
|
233
|
+
this.ctrfEnvironment.commit = reporterConfigOptions.commit;
|
|
234
|
+
}
|
|
231
235
|
if (reporterConfigOptions.testEnvironment !== undefined) {
|
|
232
236
|
this.ctrfEnvironment.testEnvironment =
|
|
233
237
|
reporterConfigOptions.testEnvironment;
|