@wdio/allure-reporter 9.31.2 → 9.31.4
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/build/common/api.d.ts +26 -1
- package/build/common/api.d.ts.map +1 -1
- package/build/index.cjs +19 -0
- package/build/index.js +20 -0
- package/build/state.d.ts.map +1 -1
- package/package.json +3 -3
package/build/common/api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StepContext } from 'allure-js-commons';
|
|
1
|
+
import type { StepContext, StatusDetails } from 'allure-js-commons';
|
|
2
2
|
import { ContentType, Status } from 'allure-js-commons';
|
|
3
3
|
/**
|
|
4
4
|
* Assign label to test
|
|
@@ -115,6 +115,28 @@ export declare function addAttachment(name: string, content: string | Buffer | o
|
|
|
115
115
|
* @param {string} value - argument value
|
|
116
116
|
*/
|
|
117
117
|
export declare function addArgument(name: string, value: string): Promise<void>;
|
|
118
|
+
/**
|
|
119
|
+
* Add a global error to the report (not tied to any specific test)
|
|
120
|
+
* @name addGlobalError
|
|
121
|
+
* @param {StatusDetails} details - error details with optional message and trace
|
|
122
|
+
*/
|
|
123
|
+
export declare function addGlobalError(details: StatusDetails): Promise<void>;
|
|
124
|
+
/**
|
|
125
|
+
* Add a global attachment to the report (not tied to any specific test)
|
|
126
|
+
* @name addGlobalAttachment
|
|
127
|
+
* @param {string} name - attachment name
|
|
128
|
+
* @param {string | Buffer} content - attachment content
|
|
129
|
+
* @param {string} contentType - attachment MIME type
|
|
130
|
+
*/
|
|
131
|
+
export declare function addGlobalAttachment(name: string, content: string | Buffer, contentType?: ContentType | string): Promise<void>;
|
|
132
|
+
/**
|
|
133
|
+
* Add a global attachment from a file path to the report (not tied to any specific test)
|
|
134
|
+
* @name addGlobalAttachmentFromPath
|
|
135
|
+
* @param {string} name - attachment name
|
|
136
|
+
* @param {string} path - path to the file
|
|
137
|
+
* @param {string} [contentType='text/plain'] - attachment MIME type
|
|
138
|
+
*/
|
|
139
|
+
export declare function addGlobalAttachmentFromPath(name: string, path: string, contentType?: ContentType | string): Promise<void>;
|
|
118
140
|
/**
|
|
119
141
|
* Add history id to the test, which won't be re-calculated in the end
|
|
120
142
|
* @name addHistoryId
|
|
@@ -190,6 +212,9 @@ declare const _default: {
|
|
|
190
212
|
addEnvironment: typeof addEnvironment;
|
|
191
213
|
addDescription: typeof addDescription;
|
|
192
214
|
addAttachment: typeof addAttachment;
|
|
215
|
+
addGlobalError: typeof addGlobalError;
|
|
216
|
+
addGlobalAttachment: typeof addGlobalAttachment;
|
|
217
|
+
addGlobalAttachmentFromPath: typeof addGlobalAttachmentFromPath;
|
|
193
218
|
startStep: typeof startStep;
|
|
194
219
|
endStep: typeof endStep;
|
|
195
220
|
addStep: typeof addStep;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/common/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/common/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACnE,OAAO,EAGH,WAAW,EAgBX,MAAM,EAQT,MAAM,mBAAmB,CAAA;AAgB1B;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAEpD;AAED;;;;;;GAMG;AACH,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,iBAEtE;AAED;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,EAAE,EAAE,MAAM,iBAE3C;AAED;;;;GAIG;AACH,wBAAsB,UAAU,CAAE,WAAW,EAAE,MAAM,iBAEpD;AAED;;;;GAIG;AACH,wBAAsB,WAAW,CA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WAAW,GAAG,MAAyB,iBAGrI;AAED;;;;;;GAMG;AACH,wBAAsB,2BAA2B,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,GAAE,WAAW,GAAG,MAAyB,iBAEjI;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAAE,EAAE,EAAE,MAAM,iBAE7C;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAAE,EAAE,EAAE,MAAM,iBAE9C;AAED;;;;GAIG;AACH,wBAAsB,SAAS,CAAE,KAAK,EAAE,MAAM,iBAG7C;AAED;;;;GAIG;AACH,wBAAsB,OAAO,CAAE,MAAM,GAAE,MAAsB,iBAM5D;AAED;;;;;;;;;GASG;AACH,wBAAsB,OAAO,CACzB,KAAK,EAAE,MAAM,EACb,UAAU,GAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,WAAW,CAAA;CAAE,GAAG,SAAqB,EAC1F,MAAM,GAAE,MAAsB,iBAmBjC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,IAAI,CAAC,CAAC,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAE7G;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED,wBA0BC"}
|
package/build/index.cjs
CHANGED
|
@@ -28,6 +28,9 @@ __export(api_exports, {
|
|
|
28
28
|
addEnvironment: () => addEnvironment,
|
|
29
29
|
addEpic: () => addEpic,
|
|
30
30
|
addFeature: () => addFeature,
|
|
31
|
+
addGlobalAttachment: () => addGlobalAttachment,
|
|
32
|
+
addGlobalAttachmentFromPath: () => addGlobalAttachmentFromPath,
|
|
33
|
+
addGlobalError: () => addGlobalError,
|
|
31
34
|
addHistoryId: () => addHistoryId,
|
|
32
35
|
addIssue: () => addIssue,
|
|
33
36
|
addLabel: () => addLabel,
|
|
@@ -144,6 +147,16 @@ async function addAttachment(name, content, type) {
|
|
|
144
147
|
async function addArgument(name, value) {
|
|
145
148
|
await (0, import_allure_js_commons.parameter)(name, value);
|
|
146
149
|
}
|
|
150
|
+
async function addGlobalError(details) {
|
|
151
|
+
await (0, import_allure_js_commons.globalError)(details);
|
|
152
|
+
}
|
|
153
|
+
async function addGlobalAttachment(name, content, contentType = import_allure_js_commons.ContentType.TEXT) {
|
|
154
|
+
const buf = Buffer.isBuffer(content) ? content : Buffer.from(content, "utf8");
|
|
155
|
+
await (0, import_allure_js_commons.globalAttachment)(name, buf, { contentType });
|
|
156
|
+
}
|
|
157
|
+
async function addGlobalAttachmentFromPath(name, path, contentType = import_allure_js_commons.ContentType.TEXT) {
|
|
158
|
+
await (0, import_allure_js_commons.globalAttachmentPath)(name, path, { contentType });
|
|
159
|
+
}
|
|
147
160
|
async function addHistoryId(id) {
|
|
148
161
|
await (0, import_allure_js_commons.historyId)(id);
|
|
149
162
|
}
|
|
@@ -194,6 +207,9 @@ var api_default = {
|
|
|
194
207
|
addEnvironment,
|
|
195
208
|
addDescription,
|
|
196
209
|
addAttachment,
|
|
210
|
+
addGlobalError,
|
|
211
|
+
addGlobalAttachment,
|
|
212
|
+
addGlobalAttachmentFromPath,
|
|
197
213
|
startStep,
|
|
198
214
|
endStep,
|
|
199
215
|
addStep,
|
|
@@ -209,6 +225,9 @@ var api_default = {
|
|
|
209
225
|
addEnvironment,
|
|
210
226
|
addEpic,
|
|
211
227
|
addFeature,
|
|
228
|
+
addGlobalAttachment,
|
|
229
|
+
addGlobalAttachmentFromPath,
|
|
230
|
+
addGlobalError,
|
|
212
231
|
addHistoryId,
|
|
213
232
|
addIssue,
|
|
214
233
|
addLabel,
|
package/build/index.js
CHANGED
|
@@ -545,6 +545,10 @@ var AllureReportState = class {
|
|
|
545
545
|
default:
|
|
546
546
|
break;
|
|
547
547
|
}
|
|
548
|
+
if (message.type === "global_error" || message.type === "global_attachment_content" || message.type === "global_attachment_path") {
|
|
549
|
+
this.allureRuntime.applyRuntimeMessages("", [message]);
|
|
550
|
+
continue;
|
|
551
|
+
}
|
|
548
552
|
const hookUuid = this._fixturesStack.at(-1);
|
|
549
553
|
const target = hookUuid ?? this._currentTestUuid;
|
|
550
554
|
if (!target) {
|
|
@@ -853,6 +857,9 @@ import {
|
|
|
853
857
|
descriptionHtml,
|
|
854
858
|
epic,
|
|
855
859
|
feature,
|
|
860
|
+
globalAttachment as allureGlobalAttachment,
|
|
861
|
+
globalAttachmentPath as allureGlobalAttachmentPath,
|
|
862
|
+
globalError as allureGlobalError,
|
|
856
863
|
historyId,
|
|
857
864
|
issue,
|
|
858
865
|
label,
|
|
@@ -936,6 +943,16 @@ async function addAttachment(name, content, type) {
|
|
|
936
943
|
async function addArgument(name, value) {
|
|
937
944
|
await parameter(name, value);
|
|
938
945
|
}
|
|
946
|
+
async function addGlobalError(details) {
|
|
947
|
+
await allureGlobalError(details);
|
|
948
|
+
}
|
|
949
|
+
async function addGlobalAttachment(name, content, contentType = ContentType.TEXT) {
|
|
950
|
+
const buf = Buffer.isBuffer(content) ? content : Buffer.from(content, "utf8");
|
|
951
|
+
await allureGlobalAttachment(name, buf, { contentType });
|
|
952
|
+
}
|
|
953
|
+
async function addGlobalAttachmentFromPath(name, path4, contentType = ContentType.TEXT) {
|
|
954
|
+
await allureGlobalAttachmentPath(name, path4, { contentType });
|
|
955
|
+
}
|
|
939
956
|
async function addHistoryId(id) {
|
|
940
957
|
await historyId(id);
|
|
941
958
|
}
|
|
@@ -2141,6 +2158,9 @@ export {
|
|
|
2141
2158
|
addEnvironment,
|
|
2142
2159
|
addEpic,
|
|
2143
2160
|
addFeature,
|
|
2161
|
+
addGlobalAttachment,
|
|
2162
|
+
addGlobalAttachmentFromPath,
|
|
2163
|
+
addGlobalError,
|
|
2144
2164
|
addHistoryId,
|
|
2145
2165
|
addIssue,
|
|
2146
2166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U;IA2BxB,OAAO,CAAC,YAAY;YAcN,QAAQ;IAqCtB,OAAO,CAAC,mBAAmB;YAWb,UAAU;YA8BV,QAAQ;IAwCtB,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI;IAI/C,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC;YAoG9B,+BAA+B;CAgDhD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/allure-reporter",
|
|
3
|
-
"version": "9.31.
|
|
3
|
+
"version": "9.31.4",
|
|
4
4
|
"description": "A WebdriverIO reporter plugin to create Allure Test Reports",
|
|
5
5
|
"author": "Boris Osipov <osipov.boris@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-allure-reporter",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@types/node": "^20.1.0",
|
|
40
40
|
"@wdio/reporter": "9.31.2",
|
|
41
41
|
"@wdio/types": "9.31.2",
|
|
42
|
-
"allure-js-commons": "^3.
|
|
42
|
+
"allure-js-commons": "^3.10.0",
|
|
43
43
|
"csv-stringify": "^6.0.4",
|
|
44
44
|
"html-entities": "^2.6.0",
|
|
45
45
|
"strip-ansi": "^7.1.0"
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"rimraf": "^6.0.1"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "69c45e316f75ba2e40e83ef7475106ece26cf2e2"
|
|
54
54
|
}
|