allure-js-commons 3.0.9 → 3.2.0
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/dist/cjs/sdk/index.js +6 -0
- package/dist/cjs/sdk/index.js.map +1 -1
- package/dist/cjs/sdk/reporter/ReporterRuntime.js +94 -16
- package/dist/cjs/sdk/reporter/ReporterRuntime.js.map +1 -1
- package/dist/cjs/sdk/reporter/index.js +14 -0
- package/dist/cjs/sdk/reporter/index.js.map +1 -1
- package/dist/cjs/sdk/reporter/types.js.map +1 -1
- package/dist/cjs/sdk/reporter/utils.js.map +1 -1
- package/dist/cjs/sdk/utils.js +98 -33
- package/dist/cjs/sdk/utils.js.map +1 -1
- package/dist/esm/sdk/index.js +1 -1
- package/dist/esm/sdk/index.js.map +1 -1
- package/dist/esm/sdk/reporter/ReporterRuntime.js +91 -15
- package/dist/esm/sdk/reporter/ReporterRuntime.js.map +1 -1
- package/dist/esm/sdk/reporter/index.js +1 -1
- package/dist/esm/sdk/reporter/index.js.map +1 -1
- package/dist/esm/sdk/reporter/types.js.map +1 -1
- package/dist/esm/sdk/reporter/utils.js.map +1 -1
- package/dist/esm/sdk/utils.js +94 -32
- package/dist/esm/sdk/utils.js.map +1 -1
- package/dist/types/sdk/index.d.ts +1 -1
- package/dist/types/sdk/reporter/ReporterRuntime.d.ts +41 -1
- package/dist/types/sdk/reporter/index.d.ts +1 -1
- package/dist/types/sdk/reporter/types.d.ts +3 -2
- package/dist/types/sdk/utils.d.ts +18 -3
- package/package.json +3 -3
package/dist/cjs/sdk/index.js
CHANGED
|
@@ -15,6 +15,12 @@ Object.defineProperty(exports, "getMessageAndTraceFromError", {
|
|
|
15
15
|
return _utils.getMessageAndTraceFromError;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
+
Object.defineProperty(exports, "getMetadataLabel", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _utils.getMetadataLabel;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
18
24
|
Object.defineProperty(exports, "getStatusFromError", {
|
|
19
25
|
enumerable: true,
|
|
20
26
|
get: function get() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_utils","require"],"sources":["../../../src/sdk/index.ts"],"sourcesContent":["export type {\n AllureResults,\n Category,\n EnvironmentInfo,\n ExecutorInfo,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeAttachmentContentMessage,\n RuntimeAttachmentPathMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n TestPlanV1Test,\n TestPlanV1,\n} from \"./types.js\";\nexport {\n getStatusFromError,\n getMessageAndTraceFromError,\n isMetadataTag,\n extractMetadataFromString,\n isAllStepsEnded,\n isAnyStepFailed,\n getUnfinishedStepsMessages,\n hasStepMessage,\n isPromise,\n hasLabel,\n stripAnsi,\n serialize,\n} from \"./utils.js\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_utils","require"],"sources":["../../../src/sdk/index.ts"],"sourcesContent":["export type {\n AllureResults,\n Category,\n EnvironmentInfo,\n ExecutorInfo,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeAttachmentContentMessage,\n RuntimeAttachmentPathMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n TestPlanV1Test,\n TestPlanV1,\n} from \"./types.js\";\nexport {\n getStatusFromError,\n getMessageAndTraceFromError,\n isMetadataTag,\n getMetadataLabel,\n extractMetadataFromString,\n isAllStepsEnded,\n isAnyStepFailed,\n getUnfinishedStepsMessages,\n hasStepMessage,\n isPromise,\n hasLabel,\n stripAnsi,\n serialize,\n} from \"./utils.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,IAAAA,MAAA,GAAAC,OAAA","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.ReporterRuntime = void 0;
|
|
6
|
+
exports.ShallowStepsStack = exports.ReporterRuntime = exports.DefaultStepStack = void 0;
|
|
7
7
|
var _path = require("path");
|
|
8
8
|
var _model = require("../../model.js");
|
|
9
9
|
var _LifecycleState = require("./LifecycleState.js");
|
|
@@ -15,13 +15,74 @@ var _attachments = require("./utils/attachments.js");
|
|
|
15
15
|
var _loader = require("./writer/loader.js");
|
|
16
16
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
17
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
|
+
function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
|
|
18
19
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
19
20
|
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
20
|
-
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
21
|
-
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
22
21
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
23
22
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
24
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
23
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
24
|
+
function _classPrivateGetter(s, r, a) { return a(_assertClassBrand(s, r)); }
|
|
25
|
+
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
26
|
+
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } /* eslint max-lines: 0 */
|
|
27
|
+
var _runningSteps = /*#__PURE__*/new WeakMap();
|
|
28
|
+
var _ShallowStepsStack_brand = /*#__PURE__*/new WeakSet();
|
|
29
|
+
/**
|
|
30
|
+
* Simpler steps stack implementation that contains only the current steps without root nodes
|
|
31
|
+
* Useful, when you need to create steps without binding them to a specific test or fixture
|
|
32
|
+
* @example
|
|
33
|
+
* ```js
|
|
34
|
+
* const stack = new ShallowStepsStack();
|
|
35
|
+
*
|
|
36
|
+
* stack.startStep({ name: "step 1" });
|
|
37
|
+
* stack.startStep({ name: "step 1.1" });
|
|
38
|
+
* stack.stopStep({ status: Status.FAILED });
|
|
39
|
+
* stack.stopStep({ status: Status.PASSED });
|
|
40
|
+
* stack.steps // => [{ name: "step 1", status: Status.PASSED, steps: [{ name: "step 1.1", status: Status.FAILED }] }]
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
class ShallowStepsStack {
|
|
44
|
+
constructor() {
|
|
45
|
+
_classPrivateMethodInitSpec(this, _ShallowStepsStack_brand);
|
|
46
|
+
_defineProperty(this, "steps", []);
|
|
47
|
+
_classPrivateFieldInitSpec(this, _runningSteps, []);
|
|
48
|
+
}
|
|
49
|
+
startStep(step) {
|
|
50
|
+
var stepResult = _objectSpread(_objectSpread({}, (0, _factory.createStepResult)()), step);
|
|
51
|
+
if (_classPrivateGetter(_ShallowStepsStack_brand, this, _get_currentStep)) {
|
|
52
|
+
_classPrivateGetter(_ShallowStepsStack_brand, this, _get_currentStep).steps.push(stepResult);
|
|
53
|
+
} else {
|
|
54
|
+
this.steps.push(stepResult);
|
|
55
|
+
}
|
|
56
|
+
_classPrivateFieldGet(_runningSteps, this).push(stepResult);
|
|
57
|
+
}
|
|
58
|
+
updateStep(updateFunc) {
|
|
59
|
+
if (!_classPrivateGetter(_ShallowStepsStack_brand, this, _get_currentStep)) {
|
|
60
|
+
// eslint-disable-next-line no-console
|
|
61
|
+
console.error("There is no running step in the stack to update!");
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
updateFunc(_classPrivateGetter(_ShallowStepsStack_brand, this, _get_currentStep));
|
|
65
|
+
}
|
|
66
|
+
stopStep(opts) {
|
|
67
|
+
if (!_classPrivateGetter(_ShallowStepsStack_brand, this, _get_currentStep)) {
|
|
68
|
+
// eslint-disable-next-line no-console
|
|
69
|
+
console.error("There is no running step in the stack to stop!");
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
var {
|
|
73
|
+
stop,
|
|
74
|
+
duration = 0
|
|
75
|
+
} = opts !== null && opts !== void 0 ? opts : {};
|
|
76
|
+
this.updateStep(result => {
|
|
77
|
+
result.stop = (stop !== null && stop !== void 0 ? stop : result.start) ? result.start + duration : undefined;
|
|
78
|
+
});
|
|
79
|
+
_classPrivateFieldGet(_runningSteps, this).pop();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.ShallowStepsStack = ShallowStepsStack;
|
|
83
|
+
function _get_currentStep(_this) {
|
|
84
|
+
return _classPrivateFieldGet(_runningSteps, _this)[_classPrivateFieldGet(_runningSteps, _this).length - 1];
|
|
85
|
+
}
|
|
25
86
|
class DefaultStepStack {
|
|
26
87
|
constructor() {
|
|
27
88
|
_defineProperty(this, "stepsByRoot", new Map());
|
|
@@ -67,6 +128,7 @@ class DefaultStepStack {
|
|
|
67
128
|
this.stepsByRoot.set(rootUuid, newValue);
|
|
68
129
|
}
|
|
69
130
|
}
|
|
131
|
+
exports.DefaultStepStack = DefaultStepStack;
|
|
70
132
|
var _handleMetadataMessage = /*#__PURE__*/new WeakMap();
|
|
71
133
|
var _handleStepMetadataMessage = /*#__PURE__*/new WeakMap();
|
|
72
134
|
var _handleStartStepMessage = /*#__PURE__*/new WeakMap();
|
|
@@ -79,14 +141,14 @@ var _writeContainer = /*#__PURE__*/new WeakMap();
|
|
|
79
141
|
var _calculateTimings = /*#__PURE__*/new WeakMap();
|
|
80
142
|
class ReporterRuntime {
|
|
81
143
|
constructor(_ref) {
|
|
82
|
-
var
|
|
144
|
+
var _this2 = this;
|
|
83
145
|
var {
|
|
84
146
|
writer,
|
|
85
147
|
listeners = [],
|
|
86
148
|
environmentInfo,
|
|
87
149
|
categories,
|
|
88
150
|
links: _links,
|
|
89
|
-
globalLabels
|
|
151
|
+
globalLabels = {}
|
|
90
152
|
} = _ref;
|
|
91
153
|
_defineProperty(this, "state", new _LifecycleState.LifecycleState());
|
|
92
154
|
_defineProperty(this, "notifier", void 0);
|
|
@@ -161,9 +223,9 @@ class ReporterRuntime {
|
|
|
161
223
|
var testResult = _objectSpread(_objectSpread({}, (0, _factory.createTestResult)(uuid)), {}, {
|
|
162
224
|
start: Date.now()
|
|
163
225
|
}, (0, _utils.deepClone)(result));
|
|
164
|
-
|
|
226
|
+
_this2.notifier.beforeTestResultStart(testResult);
|
|
165
227
|
scopeUuids.forEach(scopeUuid => {
|
|
166
|
-
var scope =
|
|
228
|
+
var scope = _this2.state.getScope(scopeUuid);
|
|
167
229
|
if (!scope) {
|
|
168
230
|
// eslint-disable-next-line no-console
|
|
169
231
|
console.error("count not link test to the scope: no scope with uuid ".concat(uuid, " is found"));
|
|
@@ -171,8 +233,8 @@ class ReporterRuntime {
|
|
|
171
233
|
}
|
|
172
234
|
scope.tests.push(uuid);
|
|
173
235
|
});
|
|
174
|
-
|
|
175
|
-
|
|
236
|
+
_this2.state.setTestResult(uuid, testResult, scopeUuids);
|
|
237
|
+
_this2.notifier.afterTestResultStart(testResult);
|
|
176
238
|
return uuid;
|
|
177
239
|
});
|
|
178
240
|
_defineProperty(this, "updateTest", (uuid, updateFunc) => {
|
|
@@ -196,11 +258,6 @@ class ReporterRuntime {
|
|
|
196
258
|
}
|
|
197
259
|
var testResult = wrapped.value;
|
|
198
260
|
this.notifier.beforeTestResultStop(testResult);
|
|
199
|
-
(_testResult$testCaseI = testResult.testCaseId) !== null && _testResult$testCaseI !== void 0 ? _testResult$testCaseI : testResult.testCaseId = (0, _utils.getTestResultTestCaseId)(testResult);
|
|
200
|
-
(_testResult$historyId = testResult.historyId) !== null && _testResult$historyId !== void 0 ? _testResult$historyId : testResult.historyId = (0, _utils.getTestResultHistoryId)(testResult);
|
|
201
|
-
var startStop = _classPrivateFieldGet(_calculateTimings, this).call(this, testResult.start, opts === null || opts === void 0 ? void 0 : opts.stop, opts === null || opts === void 0 ? void 0 : opts.duration);
|
|
202
|
-
testResult.start = startStop.start;
|
|
203
|
-
testResult.stop = startStop.stop;
|
|
204
261
|
var scopeUuids = wrapped.scopeUuids;
|
|
205
262
|
scopeUuids.forEach(scopeUuid => {
|
|
206
263
|
var scope = this.state.getScope(scopeUuid);
|
|
@@ -223,6 +280,11 @@ class ReporterRuntime {
|
|
|
223
280
|
}
|
|
224
281
|
});
|
|
225
282
|
testResult.labels = [...this.globalLabels, ...testResult.labels];
|
|
283
|
+
(_testResult$testCaseI = testResult.testCaseId) !== null && _testResult$testCaseI !== void 0 ? _testResult$testCaseI : testResult.testCaseId = (0, _utils.getTestResultTestCaseId)(testResult);
|
|
284
|
+
(_testResult$historyId = testResult.historyId) !== null && _testResult$historyId !== void 0 ? _testResult$historyId : testResult.historyId = (0, _utils.getTestResultHistoryId)(testResult);
|
|
285
|
+
var startStop = _classPrivateFieldGet(_calculateTimings, this).call(this, testResult.start, opts === null || opts === void 0 ? void 0 : opts.stop, opts === null || opts === void 0 ? void 0 : opts.duration);
|
|
286
|
+
testResult.start = startStop.start;
|
|
287
|
+
testResult.stop = startStop.stop;
|
|
226
288
|
this.notifier.afterTestResultStop(testResult);
|
|
227
289
|
});
|
|
228
290
|
_defineProperty(this, "writeTest", uuid => {
|
|
@@ -590,7 +652,23 @@ class ReporterRuntime {
|
|
|
590
652
|
this.categories = categories;
|
|
591
653
|
this.environmentInfo = environmentInfo;
|
|
592
654
|
this.linkConfig = _links;
|
|
593
|
-
|
|
655
|
+
if (Array.isArray(globalLabels)) {
|
|
656
|
+
this.globalLabels = globalLabels;
|
|
657
|
+
} else if (Object.keys(globalLabels).length) {
|
|
658
|
+
this.globalLabels = Object.entries(globalLabels).flatMap(_ref3 => {
|
|
659
|
+
var [name, value] = _ref3;
|
|
660
|
+
if (Array.isArray(value)) {
|
|
661
|
+
return value.map(v => ({
|
|
662
|
+
name,
|
|
663
|
+
value: v
|
|
664
|
+
}));
|
|
665
|
+
}
|
|
666
|
+
return {
|
|
667
|
+
name,
|
|
668
|
+
value
|
|
669
|
+
};
|
|
670
|
+
});
|
|
671
|
+
}
|
|
594
672
|
}
|
|
595
673
|
}
|
|
596
674
|
exports.ReporterRuntime = ReporterRuntime;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReporterRuntime.js","names":["_path","require","_model","_LifecycleState","_Notifier","_factory","_testplan","_utils","_attachments","_loader","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","set","has","TypeError","_classPrivateFieldGet","s","get","_assertClassBrand","n","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","String","Number","DefaultStepStack","constructor","Map","stepsByRoot","clear","rootsByStep","rootUuid","maybeValue","delete","stepUuid","removeStep","newValue","_handleMetadataMessage","WeakMap","_handleStepMetadataMessage","_handleStartStepMessage","_handleStopStepMessage","_handleAttachmentContentMessage","_handleAttachmentPathMessage","_findParent","_writeFixturesOfScope","_writeContainer","_calculateTimings","ReporterRuntime","_ref","_this","writer","listeners","environmentInfo","categories","links","globalLabels","LifecycleState","uuid","randomUuid","state","setScope","updateFunc","scope","getScope","console","error","concat","deleteScope","scopeUuid","type","fixtureResult","wrappedFixture","setFixtureResult","createFixtureResult","start","Date","now","fixtures","fixture","getFixtureResult","opts","startStop","stop","duration","stage","Stage","FINISHED","result","scopeUuids","undefined","testResult","createTestResult","deepClone","notifier","beforeTestResultStart","tests","setTestResult","afterTestResultStart","getTestResult","beforeTestResultUpdate","afterTestResultUpdate","_testResult$testCaseI","_testResult$historyId","wrapped","getWrappedTestResult","beforeTestResultStop","testCaseId","getTestResultTestCaseId","historyId","getTestResultHistoryId","labels","parameters","description","_testResult$descripti","descriptionHtml","_testResult$descripti2","afterTestResultStop","hasSkipLabel","deleteTestResult","beforeTestResultWrite","writeResult","afterTestResultWrite","stepStack","currentStep","parentStepUuid","parent","JSON","stringify","stepResult","createStepResult","steps","setStepResult","addStep","step","getStepResult","beforeStepStop","afterStepStop","attachmentName","attachmentContentOrPath","options","_options$fileExtensio","isPath","fileExtension","extname","attachmentFileName","buildAttachmentFileName","contentType","writeAttachmentFromPath","writeAttachment","attachment","name","source","wrapInStep","timestamp","attachments","writeEnvironmentInfo","serializedCategories","map","c","messageRegex","RegExp","traceRegex","writeCategoriesDefinitions","messages","message","data","getWrappedFixtureResult","displayName","updateFixture","updateScope","linkConfig","formatLinks","updateTest","updateStep","startStep","status","statusDetails","stopStep","Buffer","from","content","encoding","path","root","getExecutionItem","_ref2","writtenFixtures","Set","deleteFixtureResult","add","befores","afters","writeGroup","children","normalisedDuration","Math","max","round","resolveWriter","Notifier","exports"],"sources":["../../../../src/sdk/reporter/ReporterRuntime.ts"],"sourcesContent":["/* eslint max-lines: 0 */\nimport { extname } from \"path\";\nimport {\n type Attachment,\n type AttachmentOptions,\n type FixtureResult,\n type Label,\n Stage,\n type StepResult,\n type TestResult,\n} from \"../../model.js\";\nimport type {\n Category,\n EnvironmentInfo,\n RuntimeAttachmentContentMessage,\n RuntimeAttachmentPathMessage,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n} from \"../types.js\";\nimport { LifecycleState } from \"./LifecycleState.js\";\nimport { Notifier } from \"./Notifier.js\";\nimport { createFixtureResult, createStepResult, createTestResult } from \"./factory.js\";\nimport { hasSkipLabel } from \"./testplan.js\";\nimport type {\n FixtureResultWrapper,\n FixtureType,\n LinkConfig,\n ReporterRuntimeConfig,\n TestScope,\n Writer,\n} from \"./types.js\";\nimport { deepClone, formatLinks, getTestResultHistoryId, getTestResultTestCaseId, randomUuid } from \"./utils.js\";\nimport { buildAttachmentFileName } from \"./utils/attachments.js\";\nimport { resolveWriter } from \"./writer/loader.js\";\n\ninterface StepStack {\n clear(): void;\n\n removeRoot(rootUuid: string): void;\n\n currentStep(rootUuid: string): string | undefined;\n\n addStep(rootUuid: string, stepUuid: string): void;\n\n removeStep(stepUuid: string): void;\n}\n\nclass DefaultStepStack implements StepStack {\n private stepsByRoot: Map<string, string[]> = new Map();\n private rootsByStep: Map<string, string> = new Map();\n\n clear = (): void => {\n this.stepsByRoot.clear();\n this.rootsByStep.clear();\n };\n\n removeRoot = (rootUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n this.stepsByRoot.delete(rootUuid);\n if (maybeValue) {\n maybeValue.forEach((stepUuid) => this.rootsByStep.delete(stepUuid));\n }\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n return maybeValue[maybeValue.length - 1];\n };\n\n addStep = (rootUuid: string, stepUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n this.stepsByRoot.set(rootUuid, [stepUuid]);\n } else {\n maybeValue.push(stepUuid);\n }\n this.rootsByStep.set(stepUuid, rootUuid);\n };\n\n removeStep(stepUuid: string) {\n const rootUuid = this.rootsByStep.get(stepUuid);\n if (!rootUuid) {\n return;\n }\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n const newValue = maybeValue.filter((value) => value !== stepUuid);\n this.stepsByRoot.set(rootUuid, newValue);\n }\n}\n\nexport class ReporterRuntime {\n private readonly state = new LifecycleState();\n private notifier: Notifier;\n private stepStack: StepStack = new DefaultStepStack();\n writer: Writer;\n categories?: Category[];\n environmentInfo?: EnvironmentInfo;\n linkConfig?: LinkConfig;\n globalLabels: Label[] = [];\n\n constructor({ writer, listeners = [], environmentInfo, categories, links, globalLabels }: ReporterRuntimeConfig) {\n this.writer = resolveWriter(writer);\n this.notifier = new Notifier({ listeners });\n this.categories = categories;\n this.environmentInfo = environmentInfo;\n this.linkConfig = links;\n this.globalLabels = globalLabels ?? [];\n }\n\n startScope = (): string => {\n const uuid = randomUuid();\n this.state.setScope(uuid);\n return uuid;\n };\n\n updateScope = (uuid: string, updateFunc: (scope: TestScope) => void): void => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not update scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(scope);\n };\n\n writeScope = (uuid: string) => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not write scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n this.#writeFixturesOfScope(scope);\n this.state.deleteScope(scope.uuid);\n };\n\n startFixture = (scopeUuid: string, type: FixtureType, fixtureResult: Partial<FixtureResult>): string | undefined => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not start fixture: no scope with uuid ${scopeUuid} is found`);\n return;\n }\n\n const uuid = randomUuid();\n const wrappedFixture = this.state.setFixtureResult(scopeUuid, uuid, type, {\n ...createFixtureResult(),\n start: Date.now(),\n ...fixtureResult,\n });\n\n scope.fixtures.push(wrappedFixture);\n return uuid;\n };\n\n updateFixture = (uuid: string, updateFunc: (result: FixtureResult) => void): void => {\n const fixture = this.state.getFixtureResult(uuid);\n\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not update fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(fixture);\n };\n\n stopFixture = (uuid: string, opts?: { stop?: number; duration?: number }): void => {\n const fixture = this.state.getFixtureResult(uuid);\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not stop fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n const startStop = this.#calculateTimings(fixture.start, opts?.stop, opts?.duration);\n fixture.start = startStop.start;\n fixture.stop = startStop.stop;\n\n fixture.stage = Stage.FINISHED;\n };\n\n startTest = (result: Partial<TestResult>, scopeUuids: string[] = []): string => {\n const uuid = randomUuid();\n const testResult: TestResult = {\n ...createTestResult(uuid),\n start: Date.now(),\n ...deepClone(result),\n };\n\n this.notifier.beforeTestResultStart(testResult);\n\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not link test to the scope: no scope with uuid ${uuid} is found`);\n return;\n }\n scope.tests.push(uuid);\n });\n\n this.state.setTestResult(uuid, testResult, scopeUuids);\n this.notifier.afterTestResultStart(testResult);\n return uuid;\n };\n\n updateTest = (uuid: string, updateFunc: (result: TestResult) => void): void => {\n const testResult = this.state.getTestResult(uuid);\n\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not update test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n this.notifier.beforeTestResultUpdate(testResult);\n updateFunc(testResult);\n this.notifier.afterTestResultUpdate(testResult);\n };\n\n stopTest = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const wrapped = this.state.getWrappedTestResult(uuid);\n if (!wrapped) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n const testResult = wrapped.value;\n\n this.notifier.beforeTestResultStop(testResult);\n\n testResult.testCaseId ??= getTestResultTestCaseId(testResult);\n testResult.historyId ??= getTestResultHistoryId(testResult);\n\n const startStop = this.#calculateTimings(testResult.start, opts?.stop, opts?.duration);\n\n testResult.start = startStop.start;\n testResult.stop = startStop.stop;\n\n const scopeUuids = wrapped.scopeUuids;\n\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n\n if (scope?.labels) {\n testResult.labels = [...testResult.labels, ...scope.labels];\n }\n\n if (scope?.links) {\n testResult.links = [...testResult.links, ...scope.links];\n }\n\n if (scope?.parameters) {\n testResult.parameters = [...testResult.parameters, ...scope.parameters];\n }\n\n if (scope?.description) {\n testResult.description = testResult.description ?? scope.description;\n }\n\n if (scope?.descriptionHtml) {\n testResult.descriptionHtml = testResult.descriptionHtml ?? scope.descriptionHtml;\n }\n });\n\n testResult.labels = [...this.globalLabels, ...testResult.labels];\n\n this.notifier.afterTestResultStop(testResult);\n };\n\n writeTest = (uuid: string) => {\n const testResult = this.state.getTestResult(uuid);\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not write test result: no test with uuid ${uuid} is found`);\n return;\n }\n\n if (hasSkipLabel(testResult.labels)) {\n this.state.deleteTestResult(uuid);\n return;\n }\n\n this.notifier.beforeTestResultWrite(testResult);\n\n this.writer.writeResult(testResult);\n this.state.deleteTestResult(uuid);\n\n this.notifier.afterTestResultWrite(testResult);\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n return this.stepStack.currentStep(rootUuid);\n };\n\n startStep = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n result: Partial<StepResult>,\n ): string | undefined => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not start test step: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n const stepResult: StepResult = {\n ...createStepResult(),\n start: Date.now(),\n ...result,\n };\n parent.steps.push(stepResult);\n const stepUuid = randomUuid();\n this.state.setStepResult(stepUuid, stepResult);\n\n this.stepStack.addStep(rootUuid, stepUuid);\n\n return stepUuid;\n };\n\n updateStep = (uuid: string, updateFunc: (stepResult: StepResult) => void) => {\n const step = this.state.getStepResult(uuid)!;\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not update test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(step);\n };\n\n stopStep = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const step = this.state.getStepResult(uuid);\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n this.notifier.beforeStepStop(step);\n\n const startStop = this.#calculateTimings(step.start, opts?.stop, opts?.duration);\n step.start = startStop.start;\n step.stop = startStop.stop;\n\n step.stage = Stage.FINISHED;\n\n this.stepStack.removeStep(uuid);\n\n this.notifier.afterStepStop(step);\n };\n\n writeAttachment = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n attachmentName: string,\n attachmentContentOrPath: Buffer | string,\n options: AttachmentOptions & { wrapInStep?: boolean; timestamp?: number },\n ) => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not write test attachment: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n\n const isPath = typeof attachmentContentOrPath === \"string\";\n const fileExtension = options.fileExtension ?? (isPath ? extname(attachmentContentOrPath) : undefined);\n const attachmentFileName = buildAttachmentFileName({\n contentType: options.contentType,\n fileExtension,\n });\n\n if (isPath) {\n this.writer.writeAttachmentFromPath(attachmentFileName, attachmentContentOrPath);\n } else {\n this.writer.writeAttachment(attachmentFileName, attachmentContentOrPath);\n }\n\n const attachment: Attachment = {\n name: attachmentName,\n source: attachmentFileName,\n type: options.contentType,\n };\n\n if (options.wrapInStep) {\n const { timestamp = Date.now() } = options;\n parent.steps.push({\n name: attachmentName,\n attachments: [attachment],\n start: timestamp,\n stop: timestamp,\n } as StepResult);\n } else {\n parent.attachments.push(attachment);\n }\n };\n\n writeEnvironmentInfo = () => {\n if (!this.environmentInfo) {\n return;\n }\n\n this.writer.writeEnvironmentInfo(this.environmentInfo);\n };\n\n writeCategoriesDefinitions = () => {\n if (!this.categories) {\n return;\n }\n\n const serializedCategories = this.categories.map((c) => {\n if (c.messageRegex instanceof RegExp) {\n c.messageRegex = c.messageRegex.source;\n }\n\n if (c.traceRegex instanceof RegExp) {\n c.traceRegex = c.traceRegex.source;\n }\n\n return c;\n });\n\n this.writer.writeCategoriesDefinitions(serializedCategories);\n };\n\n applyRuntimeMessages = (rootUuid: string, messages: RuntimeMessage[]) => {\n messages.forEach((message) => {\n switch (message.type) {\n case \"metadata\":\n this.#handleMetadataMessage(rootUuid, message.data);\n return;\n case \"step_metadata\":\n this.#handleStepMetadataMessage(rootUuid, message.data);\n return;\n case \"step_start\":\n this.#handleStartStepMessage(rootUuid, message.data);\n return;\n case \"step_stop\":\n this.#handleStopStepMessage(rootUuid, message.data);\n return;\n case \"attachment_content\":\n this.#handleAttachmentContentMessage(rootUuid, message.data);\n return;\n case \"attachment_path\":\n this.#handleAttachmentPathMessage(rootUuid, message.data);\n return;\n default:\n // eslint-disable-next-line no-console\n console.error(`could not apply runtime messages: unknown message ${JSON.stringify(message)}`);\n return;\n }\n });\n };\n\n #handleMetadataMessage = (rootUuid: string, message: RuntimeMetadataMessage[\"data\"]) => {\n // only display name could be set to fixture.\n const fixtureResult = this.state.getWrappedFixtureResult(rootUuid);\n const { links, labels, parameters, displayName, testCaseId, historyId, description, descriptionHtml } = message;\n\n if (fixtureResult) {\n if (displayName) {\n this.updateFixture(rootUuid, (result) => {\n result.name = displayName;\n });\n }\n\n if (historyId) {\n // eslint-disable-next-line no-console\n console.error(\"historyId can't be changed within test fixtures\");\n }\n if (testCaseId) {\n // eslint-disable-next-line no-console\n console.error(\"testCaseId can't be changed within test fixtures\");\n }\n\n if (links || labels || parameters || description || descriptionHtml) {\n // in some frameworks, afterEach methods can be executed before test stop event, while\n // in others after. To remove the possible undetermined behaviour we only allow\n // using runtime metadata API in before hooks.\n if (fixtureResult.type === \"after\") {\n // eslint-disable-next-line no-console\n console.error(\"metadata messages isn't supported for after test fixtures\");\n return;\n }\n\n this.updateScope(fixtureResult.scopeUuid, (scope) => {\n if (links) {\n scope.links = [...scope.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n scope.labels = [...scope.labels, ...labels];\n }\n if (parameters) {\n scope.parameters = [...scope.parameters, ...parameters];\n }\n if (description) {\n scope.description = description;\n }\n if (descriptionHtml) {\n scope.descriptionHtml = descriptionHtml;\n }\n });\n }\n\n return;\n }\n\n this.updateTest(rootUuid, (result) => {\n if (links) {\n result.links = [...result.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n result.labels = [...result.labels, ...labels];\n }\n if (parameters) {\n result.parameters = [...result.parameters, ...parameters];\n }\n if (displayName) {\n result.name = displayName;\n }\n if (testCaseId) {\n result.testCaseId = testCaseId;\n }\n if (historyId) {\n result.historyId = historyId;\n }\n if (description) {\n result.description = description;\n }\n if (descriptionHtml) {\n result.descriptionHtml = descriptionHtml;\n }\n });\n };\n\n #handleStepMetadataMessage = (rootUuid: string, message: RuntimeStepMetadataMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step metadata message: no step is running\");\n return;\n }\n const { name, parameters } = message;\n this.updateStep(stepUuid, (stepResult) => {\n if (name) {\n stepResult.name = name;\n }\n if (parameters) {\n stepResult.parameters = [...stepResult.parameters, ...parameters];\n }\n });\n };\n\n #handleStartStepMessage = (rootUuid: string, message: RuntimeStartStepMessage[\"data\"]) => {\n this.startStep(rootUuid, undefined, { ...message });\n };\n\n #handleStopStepMessage = (rootUuid: string, message: RuntimeStopStepMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step stop message: no step is running\");\n return;\n }\n this.updateStep(stepUuid, (result) => {\n if (message.status && !result.status) {\n result.status = message.status;\n }\n if (message.statusDetails) {\n result.statusDetails = { ...result.statusDetails, ...message.statusDetails };\n }\n });\n this.stopStep(stepUuid, { stop: message.stop });\n };\n\n #handleAttachmentContentMessage = (rootUuid: string, message: RuntimeAttachmentContentMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, Buffer.from(message.content, message.encoding), {\n encoding: message.encoding,\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #handleAttachmentPathMessage = (rootUuid: string, message: RuntimeAttachmentPathMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, message.path, {\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #findParent = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n ): FixtureResult | TestResult | StepResult | undefined => {\n const root = this.state.getExecutionItem(rootUuid);\n if (!root) {\n return;\n }\n\n if (parentStepUuid === null) {\n return root;\n } else if (parentStepUuid === undefined) {\n const stepUuid = this.currentStep(rootUuid);\n return stepUuid ? this.state.getStepResult(stepUuid) : root;\n } else {\n return this.state.getStepResult(parentStepUuid);\n }\n };\n\n #writeFixturesOfScope = ({ fixtures, tests }: TestScope) => {\n const writtenFixtures = new Set<string>();\n if (tests.length) {\n for (const wrappedFixture of fixtures) {\n if (!writtenFixtures.has(wrappedFixture.uuid)) {\n this.#writeContainer(tests, wrappedFixture);\n this.state.deleteFixtureResult(wrappedFixture.uuid);\n writtenFixtures.add(wrappedFixture.uuid);\n }\n }\n }\n };\n\n #writeContainer = (tests: string[], wrappedFixture: FixtureResultWrapper) => {\n const fixture = wrappedFixture.value;\n const befores = wrappedFixture.type === \"before\" ? [wrappedFixture.value] : [];\n const afters = wrappedFixture.type === \"after\" ? [wrappedFixture.value] : [];\n this.writer.writeGroup({\n uuid: wrappedFixture.uuid,\n name: fixture.name,\n children: [...new Set(tests)],\n befores,\n afters,\n });\n };\n\n #calculateTimings = (\n start?: number,\n stop?: number,\n duration?: number,\n ): {\n start?: number;\n stop?: number;\n } => {\n const result: { start?: number; stop?: number } = { start, stop };\n if (duration) {\n const normalisedDuration = Math.max(0, duration);\n if (result.stop !== undefined) {\n result.start = result.stop - normalisedDuration;\n } else if (result.start !== undefined) {\n result.stop = result.start + normalisedDuration;\n } else {\n result.stop = Date.now();\n result.start = result.stop - normalisedDuration;\n }\n } else {\n if (result.stop === undefined) {\n result.stop = Date.now();\n }\n if (result.start === undefined) {\n result.start = result.stop;\n }\n }\n return {\n start: result.start ? Math.round(result.start) : undefined,\n stop: result.stop ? Math.round(result.stop) : undefined,\n };\n };\n}\n"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAoBA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AASA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAA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,IAAI,EAAEK,MAAM,CAACL,IAAI,GAAGiH,IAAI,CAACE,KAAK,CAAC9G,MAAM,CAACL,IAAI,CAAC,GAAGO;MAChD,CAAC;IACH,CAAC;IAlkBC,IAAI,CAACvC,MAAM,GAAG,IAAAoJ,qBAAa,EAACpJ,MAAM,CAAC;IACnC,IAAI,CAAC2C,QAAQ,GAAG,IAAI0G,kBAAQ,CAAC;MAAEpJ;IAAU,CAAC,CAAC;IAC3C,IAAI,CAACE,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACD,eAAe,GAAGA,eAAe;IACtC,IAAI,CAACsH,UAAU,GAAGpH,MAAK;IACvB,IAAI,CAACC,YAAY,GAAGA,YAAY,aAAZA,YAAY,cAAZA,YAAY,GAAI,EAAE;EACxC;AA6jBF;AAACiJ,OAAA,CAAAzJ,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ReporterRuntime.js","names":["_path","require","_model","_LifecycleState","_Notifier","_factory","_testplan","_utils","_attachments","_loader","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_classPrivateMethodInitSpec","a","_checkPrivateRedeclaration","add","_classPrivateFieldInitSpec","set","has","TypeError","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","String","Number","_classPrivateGetter","s","_assertClassBrand","_classPrivateFieldGet","get","n","_runningSteps","WeakMap","_ShallowStepsStack_brand","WeakSet","ShallowStepsStack","constructor","startStep","step","stepResult","createStepResult","_get_currentStep","steps","updateStep","updateFunc","console","error","stopStep","opts","stop","duration","result","start","undefined","pop","exports","_this","DefaultStepStack","Map","stepsByRoot","clear","rootsByStep","rootUuid","maybeValue","delete","stepUuid","removeStep","newValue","_handleMetadataMessage","_handleStepMetadataMessage","_handleStartStepMessage","_handleStopStepMessage","_handleAttachmentContentMessage","_handleAttachmentPathMessage","_findParent","_writeFixturesOfScope","_writeContainer","_calculateTimings","ReporterRuntime","_ref","_this2","writer","listeners","environmentInfo","categories","links","globalLabels","LifecycleState","uuid","randomUuid","state","setScope","scope","getScope","concat","deleteScope","scopeUuid","type","fixtureResult","wrappedFixture","setFixtureResult","createFixtureResult","Date","now","fixtures","fixture","getFixtureResult","startStop","stage","Stage","FINISHED","scopeUuids","testResult","createTestResult","deepClone","notifier","beforeTestResultStart","tests","setTestResult","afterTestResultStart","getTestResult","beforeTestResultUpdate","afterTestResultUpdate","_testResult$testCaseI","_testResult$historyId","wrapped","getWrappedTestResult","beforeTestResultStop","labels","parameters","description","_testResult$descripti","descriptionHtml","_testResult$descripti2","testCaseId","getTestResultTestCaseId","historyId","getTestResultHistoryId","afterTestResultStop","hasSkipLabel","deleteTestResult","beforeTestResultWrite","writeResult","afterTestResultWrite","stepStack","currentStep","parentStepUuid","parent","JSON","stringify","setStepResult","addStep","getStepResult","beforeStepStop","afterStepStop","attachmentName","attachmentContentOrPath","options","_options$fileExtensio","isPath","fileExtension","extname","attachmentFileName","buildAttachmentFileName","contentType","writeAttachmentFromPath","writeAttachment","attachment","name","source","wrapInStep","timestamp","attachments","writeEnvironmentInfo","serializedCategories","map","c","messageRegex","RegExp","traceRegex","writeCategoriesDefinitions","messages","message","data","getWrappedFixtureResult","displayName","updateFixture","updateScope","linkConfig","formatLinks","updateTest","status","statusDetails","Buffer","from","content","encoding","path","root","getExecutionItem","_ref2","writtenFixtures","Set","deleteFixtureResult","befores","afters","writeGroup","children","normalisedDuration","Math","max","round","resolveWriter","Notifier","Array","isArray","entries","flatMap","_ref3","v"],"sources":["../../../../src/sdk/reporter/ReporterRuntime.ts"],"sourcesContent":["/* eslint max-lines: 0 */\nimport { extname } from \"path\";\nimport {\n type Attachment,\n type AttachmentOptions,\n type FixtureResult,\n type Label,\n Stage,\n type StepResult,\n type TestResult,\n} from \"../../model.js\";\nimport type {\n Category,\n EnvironmentInfo,\n RuntimeAttachmentContentMessage,\n RuntimeAttachmentPathMessage,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n} from \"../types.js\";\nimport { LifecycleState } from \"./LifecycleState.js\";\nimport { Notifier } from \"./Notifier.js\";\nimport { createFixtureResult, createStepResult, createTestResult } from \"./factory.js\";\nimport { hasSkipLabel } from \"./testplan.js\";\nimport type {\n FixtureResultWrapper,\n FixtureType,\n LinkConfig,\n ReporterRuntimeConfig,\n TestScope,\n Writer,\n} from \"./types.js\";\nimport { deepClone, formatLinks, getTestResultHistoryId, getTestResultTestCaseId, randomUuid } from \"./utils.js\";\nimport { buildAttachmentFileName } from \"./utils/attachments.js\";\nimport { resolveWriter } from \"./writer/loader.js\";\n\nexport interface StepStack {\n clear(): void;\n\n removeRoot(rootUuid: string): void;\n\n currentStep(rootUuid: string): string | undefined;\n\n addStep(rootUuid: string, stepUuid: string): void;\n\n removeStep(stepUuid: string): void;\n}\n\n/**\n * Simpler steps stack implementation that contains only the current steps without root nodes\n * Useful, when you need to create steps without binding them to a specific test or fixture\n * @example\n * ```js\n * const stack = new ShallowStepsStack();\n *\n * stack.startStep({ name: \"step 1\" });\n * stack.startStep({ name: \"step 1.1\" });\n * stack.stopStep({ status: Status.FAILED });\n * stack.stopStep({ status: Status.PASSED });\n * stack.steps // => [{ name: \"step 1\", status: Status.PASSED, steps: [{ name: \"step 1.1\", status: Status.FAILED }] }]\n * ```\n */\nexport class ShallowStepsStack {\n steps: StepResult[] = [];\n\n #runningSteps: StepResult[] = [];\n\n get #currentStep() {\n return this.#runningSteps[this.#runningSteps.length - 1];\n }\n\n startStep(step: Partial<StepResult>) {\n const stepResult: StepResult = {\n ...createStepResult(),\n ...step,\n };\n\n if (this.#currentStep) {\n this.#currentStep.steps.push(stepResult);\n } else {\n this.steps.push(stepResult);\n }\n\n this.#runningSteps.push(stepResult);\n }\n\n updateStep(updateFunc: (result: StepResult) => void) {\n if (!this.#currentStep) {\n // eslint-disable-next-line no-console\n console.error(\"There is no running step in the stack to update!\");\n return;\n }\n\n updateFunc(this.#currentStep);\n }\n\n stopStep(opts?: { stop?: number; duration?: number }) {\n if (!this.#currentStep) {\n // eslint-disable-next-line no-console\n console.error(\"There is no running step in the stack to stop!\");\n return;\n }\n\n const { stop, duration = 0 } = opts ?? {};\n\n this.updateStep((result) => {\n result.stop = stop ?? result.start ? result.start! + duration : undefined;\n });\n\n this.#runningSteps.pop();\n }\n}\n\nexport class DefaultStepStack implements StepStack {\n private stepsByRoot: Map<string, string[]> = new Map();\n private rootsByStep: Map<string, string> = new Map();\n\n clear = (): void => {\n this.stepsByRoot.clear();\n this.rootsByStep.clear();\n };\n\n removeRoot = (rootUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n this.stepsByRoot.delete(rootUuid);\n if (maybeValue) {\n maybeValue.forEach((stepUuid) => this.rootsByStep.delete(stepUuid));\n }\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n return maybeValue[maybeValue.length - 1];\n };\n\n addStep = (rootUuid: string, stepUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n this.stepsByRoot.set(rootUuid, [stepUuid]);\n } else {\n maybeValue.push(stepUuid);\n }\n this.rootsByStep.set(stepUuid, rootUuid);\n };\n\n removeStep(stepUuid: string) {\n const rootUuid = this.rootsByStep.get(stepUuid);\n if (!rootUuid) {\n return;\n }\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n const newValue = maybeValue.filter((value) => value !== stepUuid);\n this.stepsByRoot.set(rootUuid, newValue);\n }\n}\n\nexport class ReporterRuntime {\n private readonly state = new LifecycleState();\n private notifier: Notifier;\n private stepStack: StepStack = new DefaultStepStack();\n writer: Writer;\n categories?: Category[];\n environmentInfo?: EnvironmentInfo;\n linkConfig?: LinkConfig;\n globalLabels: Label[] = [];\n\n constructor({\n writer,\n listeners = [],\n environmentInfo,\n categories,\n links,\n globalLabels = {},\n }: ReporterRuntimeConfig) {\n this.writer = resolveWriter(writer);\n this.notifier = new Notifier({ listeners });\n this.categories = categories;\n this.environmentInfo = environmentInfo;\n this.linkConfig = links;\n\n if (Array.isArray(globalLabels)) {\n this.globalLabels = globalLabels;\n } else if (Object.keys(globalLabels).length) {\n this.globalLabels = Object.entries(globalLabels).flatMap(([name, value]) => {\n if (Array.isArray(value)) {\n return value.map((v) => ({ name, value: v }));\n }\n\n return {\n name,\n value,\n };\n });\n }\n }\n\n startScope = (): string => {\n const uuid = randomUuid();\n this.state.setScope(uuid);\n return uuid;\n };\n\n updateScope = (uuid: string, updateFunc: (scope: TestScope) => void): void => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not update scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(scope);\n };\n\n writeScope = (uuid: string) => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not write scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n this.#writeFixturesOfScope(scope);\n this.state.deleteScope(scope.uuid);\n };\n\n startFixture = (scopeUuid: string, type: FixtureType, fixtureResult: Partial<FixtureResult>): string | undefined => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not start fixture: no scope with uuid ${scopeUuid} is found`);\n return;\n }\n\n const uuid = randomUuid();\n const wrappedFixture = this.state.setFixtureResult(scopeUuid, uuid, type, {\n ...createFixtureResult(),\n start: Date.now(),\n ...fixtureResult,\n });\n\n scope.fixtures.push(wrappedFixture);\n return uuid;\n };\n\n updateFixture = (uuid: string, updateFunc: (result: FixtureResult) => void): void => {\n const fixture = this.state.getFixtureResult(uuid);\n\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not update fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(fixture);\n };\n\n stopFixture = (uuid: string, opts?: { stop?: number; duration?: number }): void => {\n const fixture = this.state.getFixtureResult(uuid);\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not stop fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n const startStop = this.#calculateTimings(fixture.start, opts?.stop, opts?.duration);\n fixture.start = startStop.start;\n fixture.stop = startStop.stop;\n\n fixture.stage = Stage.FINISHED;\n };\n\n startTest = (result: Partial<TestResult>, scopeUuids: string[] = []): string => {\n const uuid = randomUuid();\n const testResult: TestResult = {\n ...createTestResult(uuid),\n start: Date.now(),\n ...deepClone(result),\n };\n\n this.notifier.beforeTestResultStart(testResult);\n\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not link test to the scope: no scope with uuid ${uuid} is found`);\n return;\n }\n scope.tests.push(uuid);\n });\n\n this.state.setTestResult(uuid, testResult, scopeUuids);\n this.notifier.afterTestResultStart(testResult);\n return uuid;\n };\n\n updateTest = (uuid: string, updateFunc: (result: TestResult) => void): void => {\n const testResult = this.state.getTestResult(uuid);\n\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not update test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n this.notifier.beforeTestResultUpdate(testResult);\n updateFunc(testResult);\n this.notifier.afterTestResultUpdate(testResult);\n };\n\n stopTest = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const wrapped = this.state.getWrappedTestResult(uuid);\n if (!wrapped) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n const testResult = wrapped.value;\n\n this.notifier.beforeTestResultStop(testResult);\n\n const scopeUuids = wrapped.scopeUuids;\n\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n\n if (scope?.labels) {\n testResult.labels = [...testResult.labels, ...scope.labels];\n }\n\n if (scope?.links) {\n testResult.links = [...testResult.links, ...scope.links];\n }\n\n if (scope?.parameters) {\n testResult.parameters = [...testResult.parameters, ...scope.parameters];\n }\n\n if (scope?.description) {\n testResult.description = testResult.description ?? scope.description;\n }\n\n if (scope?.descriptionHtml) {\n testResult.descriptionHtml = testResult.descriptionHtml ?? scope.descriptionHtml;\n }\n });\n\n testResult.labels = [...this.globalLabels, ...testResult.labels];\n\n testResult.testCaseId ??= getTestResultTestCaseId(testResult);\n testResult.historyId ??= getTestResultHistoryId(testResult);\n\n const startStop = this.#calculateTimings(testResult.start, opts?.stop, opts?.duration);\n\n testResult.start = startStop.start;\n testResult.stop = startStop.stop;\n\n this.notifier.afterTestResultStop(testResult);\n };\n\n writeTest = (uuid: string) => {\n const testResult = this.state.getTestResult(uuid);\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not write test result: no test with uuid ${uuid} is found`);\n return;\n }\n\n if (hasSkipLabel(testResult.labels)) {\n this.state.deleteTestResult(uuid);\n return;\n }\n\n this.notifier.beforeTestResultWrite(testResult);\n\n this.writer.writeResult(testResult);\n this.state.deleteTestResult(uuid);\n\n this.notifier.afterTestResultWrite(testResult);\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n return this.stepStack.currentStep(rootUuid);\n };\n\n startStep = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n result: Partial<StepResult>,\n ): string | undefined => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not start test step: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n const stepResult: StepResult = {\n ...createStepResult(),\n start: Date.now(),\n ...result,\n };\n parent.steps.push(stepResult);\n const stepUuid = randomUuid();\n this.state.setStepResult(stepUuid, stepResult);\n\n this.stepStack.addStep(rootUuid, stepUuid);\n\n return stepUuid;\n };\n\n updateStep = (uuid: string, updateFunc: (stepResult: StepResult) => void) => {\n const step = this.state.getStepResult(uuid)!;\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not update test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(step);\n };\n\n stopStep = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const step = this.state.getStepResult(uuid);\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n this.notifier.beforeStepStop(step);\n\n const startStop = this.#calculateTimings(step.start, opts?.stop, opts?.duration);\n step.start = startStop.start;\n step.stop = startStop.stop;\n\n step.stage = Stage.FINISHED;\n\n this.stepStack.removeStep(uuid);\n\n this.notifier.afterStepStop(step);\n };\n\n writeAttachment = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n attachmentName: string,\n attachmentContentOrPath: Buffer | string,\n options: AttachmentOptions & { wrapInStep?: boolean; timestamp?: number },\n ) => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not write test attachment: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n\n const isPath = typeof attachmentContentOrPath === \"string\";\n const fileExtension = options.fileExtension ?? (isPath ? extname(attachmentContentOrPath) : undefined);\n const attachmentFileName = buildAttachmentFileName({\n contentType: options.contentType,\n fileExtension,\n });\n\n if (isPath) {\n this.writer.writeAttachmentFromPath(attachmentFileName, attachmentContentOrPath);\n } else {\n this.writer.writeAttachment(attachmentFileName, attachmentContentOrPath);\n }\n\n const attachment: Attachment = {\n name: attachmentName,\n source: attachmentFileName,\n type: options.contentType,\n };\n\n if (options.wrapInStep) {\n const { timestamp = Date.now() } = options;\n parent.steps.push({\n name: attachmentName,\n attachments: [attachment],\n start: timestamp,\n stop: timestamp,\n } as StepResult);\n } else {\n parent.attachments.push(attachment);\n }\n };\n\n writeEnvironmentInfo = () => {\n if (!this.environmentInfo) {\n return;\n }\n\n this.writer.writeEnvironmentInfo(this.environmentInfo);\n };\n\n writeCategoriesDefinitions = () => {\n if (!this.categories) {\n return;\n }\n\n const serializedCategories = this.categories.map((c) => {\n if (c.messageRegex instanceof RegExp) {\n c.messageRegex = c.messageRegex.source;\n }\n\n if (c.traceRegex instanceof RegExp) {\n c.traceRegex = c.traceRegex.source;\n }\n\n return c;\n });\n\n this.writer.writeCategoriesDefinitions(serializedCategories);\n };\n\n applyRuntimeMessages = (rootUuid: string, messages: RuntimeMessage[]) => {\n messages.forEach((message) => {\n switch (message.type) {\n case \"metadata\":\n this.#handleMetadataMessage(rootUuid, message.data);\n return;\n case \"step_metadata\":\n this.#handleStepMetadataMessage(rootUuid, message.data);\n return;\n case \"step_start\":\n this.#handleStartStepMessage(rootUuid, message.data);\n return;\n case \"step_stop\":\n this.#handleStopStepMessage(rootUuid, message.data);\n return;\n case \"attachment_content\":\n this.#handleAttachmentContentMessage(rootUuid, message.data);\n return;\n case \"attachment_path\":\n this.#handleAttachmentPathMessage(rootUuid, message.data);\n return;\n default:\n // eslint-disable-next-line no-console\n console.error(`could not apply runtime messages: unknown message ${JSON.stringify(message)}`);\n return;\n }\n });\n };\n\n #handleMetadataMessage = (rootUuid: string, message: RuntimeMetadataMessage[\"data\"]) => {\n // only display name could be set to fixture.\n const fixtureResult = this.state.getWrappedFixtureResult(rootUuid);\n const { links, labels, parameters, displayName, testCaseId, historyId, description, descriptionHtml } = message;\n\n if (fixtureResult) {\n if (displayName) {\n this.updateFixture(rootUuid, (result) => {\n result.name = displayName;\n });\n }\n\n if (historyId) {\n // eslint-disable-next-line no-console\n console.error(\"historyId can't be changed within test fixtures\");\n }\n if (testCaseId) {\n // eslint-disable-next-line no-console\n console.error(\"testCaseId can't be changed within test fixtures\");\n }\n\n if (links || labels || parameters || description || descriptionHtml) {\n // in some frameworks, afterEach methods can be executed before test stop event, while\n // in others after. To remove the possible undetermined behaviour we only allow\n // using runtime metadata API in before hooks.\n if (fixtureResult.type === \"after\") {\n // eslint-disable-next-line no-console\n console.error(\"metadata messages isn't supported for after test fixtures\");\n return;\n }\n\n this.updateScope(fixtureResult.scopeUuid, (scope) => {\n if (links) {\n scope.links = [...scope.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n scope.labels = [...scope.labels, ...labels];\n }\n if (parameters) {\n scope.parameters = [...scope.parameters, ...parameters];\n }\n if (description) {\n scope.description = description;\n }\n if (descriptionHtml) {\n scope.descriptionHtml = descriptionHtml;\n }\n });\n }\n\n return;\n }\n\n this.updateTest(rootUuid, (result) => {\n if (links) {\n result.links = [...result.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n result.labels = [...result.labels, ...labels];\n }\n if (parameters) {\n result.parameters = [...result.parameters, ...parameters];\n }\n if (displayName) {\n result.name = displayName;\n }\n if (testCaseId) {\n result.testCaseId = testCaseId;\n }\n if (historyId) {\n result.historyId = historyId;\n }\n if (description) {\n result.description = description;\n }\n if (descriptionHtml) {\n result.descriptionHtml = descriptionHtml;\n }\n });\n };\n\n #handleStepMetadataMessage = (rootUuid: string, message: RuntimeStepMetadataMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step metadata message: no step is running\");\n return;\n }\n const { name, parameters } = message;\n this.updateStep(stepUuid, (stepResult) => {\n if (name) {\n stepResult.name = name;\n }\n if (parameters) {\n stepResult.parameters = [...stepResult.parameters, ...parameters];\n }\n });\n };\n\n #handleStartStepMessage = (rootUuid: string, message: RuntimeStartStepMessage[\"data\"]) => {\n this.startStep(rootUuid, undefined, { ...message });\n };\n\n #handleStopStepMessage = (rootUuid: string, message: RuntimeStopStepMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step stop message: no step is running\");\n return;\n }\n this.updateStep(stepUuid, (result) => {\n if (message.status && !result.status) {\n result.status = message.status;\n }\n if (message.statusDetails) {\n result.statusDetails = { ...result.statusDetails, ...message.statusDetails };\n }\n });\n this.stopStep(stepUuid, { stop: message.stop });\n };\n\n #handleAttachmentContentMessage = (rootUuid: string, message: RuntimeAttachmentContentMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, Buffer.from(message.content, message.encoding), {\n encoding: message.encoding,\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #handleAttachmentPathMessage = (rootUuid: string, message: RuntimeAttachmentPathMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, message.path, {\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #findParent = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n ): FixtureResult | TestResult | StepResult | undefined => {\n const root = this.state.getExecutionItem(rootUuid);\n if (!root) {\n return;\n }\n\n if (parentStepUuid === null) {\n return root;\n } else if (parentStepUuid === undefined) {\n const stepUuid = this.currentStep(rootUuid);\n return stepUuid ? this.state.getStepResult(stepUuid) : root;\n } else {\n return this.state.getStepResult(parentStepUuid);\n }\n };\n\n #writeFixturesOfScope = ({ fixtures, tests }: TestScope) => {\n const writtenFixtures = new Set<string>();\n if (tests.length) {\n for (const wrappedFixture of fixtures) {\n if (!writtenFixtures.has(wrappedFixture.uuid)) {\n this.#writeContainer(tests, wrappedFixture);\n this.state.deleteFixtureResult(wrappedFixture.uuid);\n writtenFixtures.add(wrappedFixture.uuid);\n }\n }\n }\n };\n\n #writeContainer = (tests: string[], wrappedFixture: FixtureResultWrapper) => {\n const fixture = wrappedFixture.value;\n const befores = wrappedFixture.type === \"before\" ? [wrappedFixture.value] : [];\n const afters = wrappedFixture.type === \"after\" ? [wrappedFixture.value] : [];\n this.writer.writeGroup({\n uuid: wrappedFixture.uuid,\n name: fixture.name,\n children: [...new Set(tests)],\n befores,\n afters,\n });\n };\n\n #calculateTimings = (\n start?: number,\n stop?: number,\n duration?: number,\n ): {\n start?: number;\n stop?: number;\n } => {\n const result: { start?: number; stop?: number } = { start, stop };\n if (duration) {\n const normalisedDuration = Math.max(0, duration);\n if (result.stop !== undefined) {\n result.start = result.stop - normalisedDuration;\n } else if (result.start !== undefined) {\n result.stop = result.start + normalisedDuration;\n } else {\n result.stop = Date.now();\n result.start = result.stop - normalisedDuration;\n }\n } else {\n if (result.stop === undefined) {\n result.stop = Date.now();\n }\n if (result.start === undefined) {\n result.start = result.stop;\n }\n }\n return {\n start: result.start ? Math.round(result.start) : undefined,\n stop: result.stop ? Math.round(result.stop) : undefined,\n };\n };\n}\n"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAoBA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AASA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AAAmD,SAAAS,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IA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,CAAC,KAAM;YAAEnD,IAAI;YAAEzJ,KAAK,EAAE4M;UAAE,CAAC,CAAC,CAAC;QAC/C;QAEA,OAAO;UACLnD,IAAI;UACJzJ;QACF,CAAC;MACH,CAAC,CAAC;IACJ;EACF;AA6jBF;AAACwC,OAAA,CAAAuB,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -7,7 +7,9 @@ var _exportNames = {
|
|
|
7
7
|
ALLURE_METADATA_CONTENT_TYPE: true,
|
|
8
8
|
ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE: true,
|
|
9
9
|
LifecycleState: true,
|
|
10
|
+
DefaultStepStack: true,
|
|
10
11
|
ReporterRuntime: true,
|
|
12
|
+
ShallowStepsStack: true,
|
|
11
13
|
InMemoryWriter: true,
|
|
12
14
|
FileSystemWriter: true,
|
|
13
15
|
MessageWriter: true,
|
|
@@ -33,6 +35,12 @@ Object.defineProperty(exports, "ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE", {
|
|
|
33
35
|
return _types.ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE;
|
|
34
36
|
}
|
|
35
37
|
});
|
|
38
|
+
Object.defineProperty(exports, "DefaultStepStack", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function get() {
|
|
41
|
+
return _ReporterRuntime.DefaultStepStack;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
36
44
|
Object.defineProperty(exports, "FileSystemWriter", {
|
|
37
45
|
enumerable: true,
|
|
38
46
|
get: function get() {
|
|
@@ -69,6 +77,12 @@ Object.defineProperty(exports, "ReporterRuntime", {
|
|
|
69
77
|
return _ReporterRuntime.ReporterRuntime;
|
|
70
78
|
}
|
|
71
79
|
});
|
|
80
|
+
Object.defineProperty(exports, "ShallowStepsStack", {
|
|
81
|
+
enumerable: true,
|
|
82
|
+
get: function get() {
|
|
83
|
+
return _ReporterRuntime.ShallowStepsStack;
|
|
84
|
+
}
|
|
85
|
+
});
|
|
72
86
|
Object.defineProperty(exports, "getEnvironmentLabels", {
|
|
73
87
|
enumerable: true,
|
|
74
88
|
get: function get() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_types","require","_utils","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_testplan","_factory","_LifecycleState","_ReporterRuntime","_InMemoryWriter","_FileSystemWriter","_MessageWriter","_MessageReader","_labels","_envInfo"],"sources":["../../../../src/sdk/reporter/index.ts"],"sourcesContent":["export type * from \"./types.js\";\nexport { ALLURE_METADATA_CONTENT_TYPE, ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE } from \"./types.js\";\nexport * from \"./utils.js\";\nexport * from \"./testplan.js\";\nexport * from \"./factory.js\";\nexport { LifecycleState } from \"./LifecycleState.js\";\nexport { ReporterRuntime } from \"./ReporterRuntime.js\";\nexport { InMemoryWriter } from \"./writer/InMemoryWriter.js\";\nexport { FileSystemWriter } from \"./writer/FileSystemWriter.js\";\nexport { MessageWriter } from \"./writer/MessageWriter.js\";\nexport { MessageReader } from \"./writer/MessageReader.js\";\nexport {\n getEnvironmentLabels,\n getHostLabel,\n getThreadLabel,\n getPackageLabel,\n getLanguageLabel,\n getFrameworkLabel,\n} from \"./utils/labels.js\";\nexport { parseEnvInfo, stringifyEnvInfo } from \"./utils/envInfo.js\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_types","require","_utils","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_testplan","_factory","_LifecycleState","_ReporterRuntime","_InMemoryWriter","_FileSystemWriter","_MessageWriter","_MessageReader","_labels","_envInfo"],"sources":["../../../../src/sdk/reporter/index.ts"],"sourcesContent":["export type * from \"./types.js\";\nexport { ALLURE_METADATA_CONTENT_TYPE, ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE } from \"./types.js\";\nexport * from \"./utils.js\";\nexport * from \"./testplan.js\";\nexport * from \"./factory.js\";\nexport { LifecycleState } from \"./LifecycleState.js\";\nexport { type StepStack, DefaultStepStack, ReporterRuntime, ShallowStepsStack } from \"./ReporterRuntime.js\";\nexport { InMemoryWriter } from \"./writer/InMemoryWriter.js\";\nexport { FileSystemWriter } from \"./writer/FileSystemWriter.js\";\nexport { MessageWriter } from \"./writer/MessageWriter.js\";\nexport { MessageReader } from \"./writer/MessageReader.js\";\nexport {\n getEnvironmentLabels,\n getHostLabel,\n getThreadLabel,\n getPackageLabel,\n getLanguageLabel,\n getFrameworkLabel,\n} from \"./utils/labels.js\";\nexport { parseEnvInfo, stringifyEnvInfo } from \"./utils/envInfo.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,SAAA,GAAAd,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAW,SAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,SAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAC,SAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AACA,IAAAU,QAAA,GAAAf,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAY,QAAA,EAAAX,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAU,QAAA,CAAAV,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAE,QAAA,CAAAV,GAAA;IAAA;EAAA;AAAA;AACA,IAAAW,eAAA,GAAAhB,OAAA;AACA,IAAAiB,gBAAA,GAAAjB,OAAA;AACA,IAAAkB,eAAA,GAAAlB,OAAA;AACA,IAAAmB,iBAAA,GAAAnB,OAAA;AACA,IAAAoB,cAAA,GAAApB,OAAA;AACA,IAAAqB,cAAA,GAAArB,OAAA;AACA,IAAAsB,OAAA,GAAAtB,OAAA;AAQA,IAAAuB,QAAA,GAAAvB,OAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["ALLURE_METADATA_CONTENT_TYPE","exports","ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE"],"sources":["../../../../src/sdk/reporter/types.ts"],"sourcesContent":["import type {\n FixtureResult,\n Label,\n Link,\n LinkType,\n Parameter,\n StepResult,\n TestResult,\n TestResultContainer,\n} from \"../../model.js\";\nimport type { Category, EnvironmentInfo } from \"../types.js\";\n\nexport const ALLURE_METADATA_CONTENT_TYPE = \"application/vnd.allure.metadata+json\";\nexport const ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE = \"application/vnd.allure.message+json\";\n\nexport interface LifecycleListener {\n beforeTestResultStart?: (result: TestResult) => void;\n\n afterTestResultStart?: (result: TestResult) => void;\n\n beforeTestResultStop?: (result: TestResult) => void;\n\n afterTestResultStop?: (result: TestResult) => void;\n\n beforeTestResultUpdate?: (result: TestResult) => void;\n\n afterTestResultUpdate?: (result: TestResult) => void;\n\n beforeTestResultWrite?: (result: TestResult) => void;\n\n afterTestResultWrite?: (result: TestResult) => void;\n\n beforeStepStop?: (result: StepResult) => void;\n\n afterStepStop?: (result: StepResult) => void;\n}\n\nexport type LinkTemplate = string | ((url: string) => string);\n\nexport type LinkTypeOptions = {\n urlTemplate: LinkTemplate;\n nameTemplate?: LinkTemplate;\n};\n\nexport type LinkConfig<TOpts extends LinkTypeOptions = LinkTypeOptions> = Partial<Record<LinkType, TOpts>> &\n Record<string, TOpts>;\n\nexport type WriterDescriptor = [cls: string, ...args: readonly unknown[]] | string;\n\nexport interface ReporterConfig {\n readonly resultsDir?: string;\n readonly links?: LinkConfig;\n readonly globalLabels?: Label[];\n readonly listeners?: LifecycleListener[];\n readonly environmentInfo?: EnvironmentInfo;\n readonly categories?: Category[];\n}\n\nexport interface ReporterRuntimeConfig extends Omit<ReporterConfig, \"resultsDir\"> {\n readonly writer: Writer | WriterDescriptor;\n}\n\nexport interface Writer {\n writeResult(result: TestResult): void;\n\n writeGroup(result: TestResultContainer): void;\n\n writeAttachment(distFileName: string, content: Buffer): void;\n\n writeAttachmentFromPath(distFileName: string, from: string): void;\n\n writeEnvironmentInfo(info: EnvironmentInfo): void;\n\n writeCategoriesDefinitions(categories: Category[]): void;\n}\n\nexport type TestScope = {\n uuid: string;\n tests: string[];\n fixtures: FixtureResultWrapper[];\n labels: Label[];\n links: Link[];\n parameters: Parameter[];\n description?: string;\n descriptionHtml?: string;\n};\n\nexport type FixtureType = \"before\" | \"after\";\n\nexport type FixtureResultWrapper = {\n uuid: string;\n value: FixtureResult;\n type: FixtureType;\n scopeUuid: string;\n};\n\nexport type TestResultWrapper = {\n value: TestResult;\n scopeUuids: string[];\n};\n"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"types.js","names":["ALLURE_METADATA_CONTENT_TYPE","exports","ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE"],"sources":["../../../../src/sdk/reporter/types.ts"],"sourcesContent":["import type {\n FixtureResult,\n Label,\n LabelName,\n Link,\n LinkType,\n Parameter,\n StepResult,\n TestResult,\n TestResultContainer,\n} from \"../../model.js\";\nimport type { Category, EnvironmentInfo } from \"../types.js\";\n\nexport const ALLURE_METADATA_CONTENT_TYPE = \"application/vnd.allure.metadata+json\";\nexport const ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE = \"application/vnd.allure.message+json\";\n\nexport interface LifecycleListener {\n beforeTestResultStart?: (result: TestResult) => void;\n\n afterTestResultStart?: (result: TestResult) => void;\n\n beforeTestResultStop?: (result: TestResult) => void;\n\n afterTestResultStop?: (result: TestResult) => void;\n\n beforeTestResultUpdate?: (result: TestResult) => void;\n\n afterTestResultUpdate?: (result: TestResult) => void;\n\n beforeTestResultWrite?: (result: TestResult) => void;\n\n afterTestResultWrite?: (result: TestResult) => void;\n\n beforeStepStop?: (result: StepResult) => void;\n\n afterStepStop?: (result: StepResult) => void;\n}\n\nexport type LinkTemplate = string | ((url: string) => string);\n\nexport type LinkTypeOptions = {\n urlTemplate: LinkTemplate;\n nameTemplate?: LinkTemplate;\n};\n\nexport type LinkConfig<TOpts extends LinkTypeOptions = LinkTypeOptions> = Partial<Record<LinkType, TOpts>> &\n Record<string, TOpts>;\n\nexport type WriterDescriptor = [cls: string, ...args: readonly unknown[]] | string;\n\nexport type GlobalLabelsConfig = Partial<Record<LabelName, string | string[]>> & Record<string, string | string[]>;\n\nexport interface ReporterConfig {\n readonly resultsDir?: string;\n readonly links?: LinkConfig;\n readonly globalLabels?: Label[] | GlobalLabelsConfig;\n readonly listeners?: LifecycleListener[];\n readonly environmentInfo?: EnvironmentInfo;\n readonly categories?: Category[];\n}\n\nexport interface ReporterRuntimeConfig extends Omit<ReporterConfig, \"resultsDir\"> {\n readonly writer: Writer | WriterDescriptor;\n}\n\nexport interface Writer {\n writeResult(result: TestResult): void;\n\n writeGroup(result: TestResultContainer): void;\n\n writeAttachment(distFileName: string, content: Buffer): void;\n\n writeAttachmentFromPath(distFileName: string, from: string): void;\n\n writeEnvironmentInfo(info: EnvironmentInfo): void;\n\n writeCategoriesDefinitions(categories: Category[]): void;\n}\n\nexport type TestScope = {\n uuid: string;\n tests: string[];\n fixtures: FixtureResultWrapper[];\n labels: Label[];\n links: Link[];\n parameters: Parameter[];\n description?: string;\n descriptionHtml?: string;\n};\n\nexport type FixtureType = \"before\" | \"after\";\n\nexport type FixtureResultWrapper = {\n uuid: string;\n value: FixtureResult;\n type: FixtureType;\n scopeUuid: string;\n};\n\nexport type TestResultWrapper = {\n value: TestResult;\n scopeUuids: string[];\n};\n"],"mappings":";;;;;;AAaO,IAAMA,4BAA4B,GAAAC,OAAA,CAAAD,4BAAA,GAAG,sCAAsC;AAC3E,IAAME,mCAAmC,GAAAD,OAAA,CAAAC,mCAAA,GAAG,qCAAqC","ignoreList":[]}
|