allure-js-commons 3.15.0 → 3.16.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/README.md +1 -1
- package/dist/cjs/sdk/reporter/Notifier.js +1 -3
- package/dist/cjs/sdk/reporter/Notifier.js.map +1 -1
- package/dist/cjs/sdk/reporter/ReporterRuntime.js +42 -41
- package/dist/cjs/sdk/reporter/ReporterRuntime.js.map +1 -1
- package/dist/cjs/sdk/reporter/testplan.js +14 -17
- package/dist/cjs/sdk/reporter/testplan.js.map +1 -1
- package/dist/cjs/sdk/reporter/utils/envInfo.js +10 -1
- package/dist/cjs/sdk/reporter/utils/envInfo.js.map +1 -1
- package/dist/cjs/sdk/reporter/utils.js +17 -13
- package/dist/cjs/sdk/reporter/utils.js.map +1 -1
- package/dist/cjs/sdk/reporter/writer/MessageReader.js +15 -6
- package/dist/cjs/sdk/reporter/writer/MessageReader.js.map +1 -1
- package/dist/cjs/sdk/types.js.map +1 -1
- package/dist/cjs/sdk/utils.js +40 -27
- package/dist/cjs/sdk/utils.js.map +1 -1
- package/dist/esm/sdk/reporter/Notifier.js +1 -3
- package/dist/esm/sdk/reporter/Notifier.js.map +1 -1
- package/dist/esm/sdk/reporter/ReporterRuntime.js +42 -41
- package/dist/esm/sdk/reporter/ReporterRuntime.js.map +1 -1
- package/dist/esm/sdk/reporter/testplan.js +14 -17
- package/dist/esm/sdk/reporter/testplan.js.map +1 -1
- package/dist/esm/sdk/reporter/utils/envInfo.js +10 -1
- package/dist/esm/sdk/reporter/utils/envInfo.js.map +1 -1
- package/dist/esm/sdk/reporter/utils.js +17 -13
- package/dist/esm/sdk/reporter/utils.js.map +1 -1
- package/dist/esm/sdk/reporter/writer/MessageReader.js +15 -6
- package/dist/esm/sdk/reporter/writer/MessageReader.js.map +1 -1
- package/dist/esm/sdk/types.js.map +1 -1
- package/dist/esm/sdk/utils.js +40 -27
- package/dist/esm/sdk/utils.js.map +1 -1
- package/dist/types/sdk/reporter/testplan.d.ts +2 -2
- package/dist/types/sdk/types.d.ts +1 -1
- package/package.json +12 -8
package/dist/cjs/sdk/utils.js
CHANGED
|
@@ -5,6 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.uint8ArrayToBase64 = exports.toGlobalErrorMessage = exports.stripAnsi = exports.serialize = exports.limitString = exports.isPromise = exports.isMetadataTag = exports.isGlobalRuntimeMessage = exports.isAnyStepFailed = exports.isAllStepsEnded = exports.hasStepMessage = exports.hasLabel = exports.getValueFromAllureTitleMetadataMatch = exports.getUnfinishedStepsMessages = exports.getTypeFromAllureTitleMetadataMatch = exports.getStepsMessagesPair = exports.getStatusFromError = exports.getMetadataLabel = exports.getMessageAndTraceFromError = exports.getGlobalErrorDetails = exports.extractMetadataFromString = exports.excludeCircularRefsFromSet = exports.excludeCircularRefsFromMap = exports.composeReplacers = exports.allureTitleMetadataRegexpGlobal = exports.allureTitleMetadataRegexp = exports.allureMetadataRegexp = exports.allureLabelRegexp = exports.allureIdRegexp = void 0;
|
|
7
7
|
var _model = require("../model.js");
|
|
8
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
9
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
11
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
12
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
13
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
8
14
|
function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, void 0, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = RegExp(e, t); return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)(>|$)/g, function (e, r, t) { if ("" === t) return e; var p = o[r]; return Array.isArray(p) ? "$" + p.join("$") : "number" == typeof p ? "$" + p : ""; })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != typeof e[e.length - 1] && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); }
|
|
9
15
|
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
10
16
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
@@ -53,9 +59,9 @@ var getStatusFromError = error => {
|
|
|
53
59
|
*/
|
|
54
60
|
exports.getStatusFromError = getStatusFromError;
|
|
55
61
|
var ansiRegex = function ansiRegex() {
|
|
56
|
-
var {
|
|
57
|
-
onlyFirst =
|
|
58
|
-
|
|
62
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
63
|
+
_ref$onlyFirst = _ref.onlyFirst,
|
|
64
|
+
onlyFirst = _ref$onlyFirst === void 0 ? false : _ref$onlyFirst;
|
|
59
65
|
var pattern = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
60
66
|
return new RegExp(pattern, onlyFirst ? undefined : "g");
|
|
61
67
|
};
|
|
@@ -87,10 +93,8 @@ var actualAndExpected = (value, serializeValue) => {
|
|
|
87
93
|
/** Extract error details, optionally using an adapter-specific serializer for assertion values. */
|
|
88
94
|
var getMessageAndTraceFromError = exports.getMessageAndTraceFromError = function getMessageAndTraceFromError(error) {
|
|
89
95
|
var serializeValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : serialize;
|
|
90
|
-
var
|
|
91
|
-
|
|
92
|
-
stack
|
|
93
|
-
} = error;
|
|
96
|
+
var message = error.message,
|
|
97
|
+
stack = error.stack;
|
|
94
98
|
return _objectSpread({
|
|
95
99
|
message: message ? stripAnsi(message) : undefined,
|
|
96
100
|
trace: stack ? stripAnsi(stack) : undefined
|
|
@@ -105,10 +109,11 @@ var getMessageAndTraceFromError = exports.getMessageAndTraceFromError = function
|
|
|
105
109
|
* @returns {StatusDetails & { status: ErrorStatus }} Serialized details with the explicit or inferred status.
|
|
106
110
|
*/
|
|
107
111
|
var getGlobalErrorDetails = exports.getGlobalErrorDetails = function getGlobalErrorDetails() {
|
|
108
|
-
for (var _len = arguments.length,
|
|
109
|
-
|
|
112
|
+
for (var _len = arguments.length, _ref2 = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
113
|
+
_ref2[_key] = arguments[_key];
|
|
110
114
|
}
|
|
111
|
-
var
|
|
115
|
+
var status = _ref2[0],
|
|
116
|
+
details = _ref2[1];
|
|
112
117
|
var error = typeof status === "string" ? details !== null && details !== void 0 ? details : {} : status;
|
|
113
118
|
var resolvedStatus = typeof status === "string" ? status : getStatusFromError(error);
|
|
114
119
|
var extracted = getMessageAndTraceFromError(error);
|
|
@@ -119,12 +124,10 @@ var getGlobalErrorDetails = exports.getGlobalErrorDetails = function getGlobalEr
|
|
|
119
124
|
status: resolvedStatus
|
|
120
125
|
});
|
|
121
126
|
};
|
|
122
|
-
var toGlobalErrorMessage =
|
|
123
|
-
var
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
status
|
|
127
|
-
} = _ref2;
|
|
127
|
+
var toGlobalErrorMessage = _ref3 => {
|
|
128
|
+
var name = _ref3.name,
|
|
129
|
+
details = _ref3.details,
|
|
130
|
+
status = _ref3.status;
|
|
128
131
|
return {
|
|
129
132
|
type: "global_error",
|
|
130
133
|
data: _objectSpread(_objectSpread({}, details), {}, {
|
|
@@ -175,7 +178,10 @@ var getMetadataLabel = (tag, value) => {
|
|
|
175
178
|
if (!type) {
|
|
176
179
|
return undefined;
|
|
177
180
|
}
|
|
178
|
-
var
|
|
181
|
+
var _type$split = type.split("."),
|
|
182
|
+
_type$split2 = _slicedToArray(_type$split, 2),
|
|
183
|
+
subtype = _type$split2[0],
|
|
184
|
+
name = _type$split2[1];
|
|
179
185
|
return {
|
|
180
186
|
name: subtype === "id" ? _model.LabelName.ALLURE_ID : name,
|
|
181
187
|
value: value !== null && value !== void 0 ? value : ""
|
|
@@ -199,7 +205,10 @@ var extractMetadataFromString = title => {
|
|
|
199
205
|
if (!type || !value) {
|
|
200
206
|
continue;
|
|
201
207
|
}
|
|
202
|
-
var
|
|
208
|
+
var _type$split3 = type.split("."),
|
|
209
|
+
_type$split4 = _slicedToArray(_type$split3, 2),
|
|
210
|
+
subtype = _type$split4[0],
|
|
211
|
+
name = _type$split4[1];
|
|
203
212
|
switch (subtype) {
|
|
204
213
|
case "id":
|
|
205
214
|
labels.push({
|
|
@@ -276,11 +285,12 @@ exports.getUnfinishedStepsMessages = getUnfinishedStepsMessages;
|
|
|
276
285
|
var isPromise = obj => !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function";
|
|
277
286
|
exports.isPromise = isPromise;
|
|
278
287
|
var serialize = exports.serialize = function serialize(value) {
|
|
279
|
-
var {
|
|
280
|
-
maxDepth =
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
288
|
+
var _ref4 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
289
|
+
_ref4$maxDepth = _ref4.maxDepth,
|
|
290
|
+
maxDepth = _ref4$maxDepth === void 0 ? 0 : _ref4$maxDepth,
|
|
291
|
+
_ref4$maxLength = _ref4.maxLength,
|
|
292
|
+
maxLength = _ref4$maxLength === void 0 ? 0 : _ref4$maxLength,
|
|
293
|
+
replacer = _ref4.replacer;
|
|
284
294
|
return limitString(typeof value === "object" ? JSON.stringify(value, createSerializeReplacer(maxDepth, replacer)) : String(value), maxLength);
|
|
285
295
|
};
|
|
286
296
|
var createSerializeReplacer = (maxDepth, userDefinedReplacer) => {
|
|
@@ -305,11 +315,14 @@ var composeReplacers = (first, second) => function (k, v) {
|
|
|
305
315
|
};
|
|
306
316
|
exports.composeReplacers = composeReplacers;
|
|
307
317
|
var excludeCircularRefsFromMap = (parents, map) => {
|
|
308
|
-
return Array.from(map).filter(
|
|
309
|
-
var
|
|
318
|
+
return Array.from(map).filter(_ref5 => {
|
|
319
|
+
var _ref6 = _slicedToArray(_ref5, 1),
|
|
320
|
+
k = _ref6[0];
|
|
310
321
|
return !parents.includes(k);
|
|
311
|
-
}).map(
|
|
312
|
-
var
|
|
322
|
+
}).map(_ref7 => {
|
|
323
|
+
var _ref8 = _slicedToArray(_ref7, 2),
|
|
324
|
+
k = _ref8[0],
|
|
325
|
+
v = _ref8[1];
|
|
313
326
|
return [k, parents.includes(v) ? undefined : v];
|
|
314
327
|
});
|
|
315
328
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["_model","require","_wrapRegExp","e","r","BabelRegExp","RegExp","prototype","WeakMap","t","p","o","set","get","_setPrototypeOf","buildGroups","Object","keys","reduce","i","length","create","_inherits","exec","call","groups","indices","Symbol","replace","Array","isArray","join","arguments","slice","push","apply","TypeError","constructor","value","writable","configurable","defineProperty","setPrototypeOf","bind","__proto__","ownKeys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","enumerable","_objectSpread","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","_toPrimitive","toPrimitive","String","Number","getStatusFromError","error","_errorObject$construc","_errorObject$construc2","_errorObject$name","_errorObject$message","_errorObject$stack","Status","BROKEN","errorObject","constructorName","name","message","stack","test","inspect","FAILED","exports","ansiRegex","onlyFirst","undefined","pattern","stripAnsi","str","regex","actualAndExpected","serializeValue","comparison","matcherResult","actual","expected","getMessageAndTraceFromError","serialize","trace","getGlobalErrorDetails","_len","_ref","_key","status","details","resolvedStatus","extracted","toGlobalErrorMessage","_ref2","type","data","concat","allureMetadataRegexp","allureTitleMetadataRegexp","allureTitleMetadataRegexpGlobal","allureIdRegexp","id","allureLabelRegexp","getTypeFromAllureTitleMetadataMatch","match","getValueFromAllureTitleMetadataMatch","_match$","quotesRegexp","quoteOpenRegexp","source","quoteCloseRegexp","matchedValue","isMetadataTag","tag","getMetadataLabel","_match$groups","subtype","split","LabelName","ALLURE_ID","extractMetadataFromString","title","labels","links","metadata","matchAll","cleanTitle","replaceAll","Boolean","acc","word","trim","m","url","isAnyStepFailed","item","isFailed","steps","find","step","isAllStepsEnded","every","val","stop","hasLabel","testResult","labelName","l","hasStepMessage","messages","some","isGlobalRuntimeMessage","getStepsMessagesPair","unfinishedStepIdx","findLastIndex","getUnfinishedStepsMessages","grouppedStepsMessage","isPromise","obj","then","maxDepth","maxLength","replacer","limitString","JSON","stringify","createSerializeReplacer","userDefinedReplacer","parents","limitingReplacer","_","is","at","pop","includes","Map","excludeCircularRefsFromMap","Set","excludeCircularRefsFromSet","composeReplacers","first","second","k","v","map","from","_ref3","_ref4","substring","uint8ArrayToBase64","binary","charCode","fromCharCode","btoa"],"sources":["../../../src/sdk/utils.ts"],"sourcesContent":["import type {\n ErrorStatus,\n FixtureResult,\n GlobalErrorArgs,\n Label,\n Link,\n StatusDetails,\n StepResult,\n TestResult,\n} from \"../model.js\";\nimport { LabelName, Status } from \"../model.js\";\nimport type {\n RuntimeGlobalAttachmentContentMessage,\n RuntimeGlobalAttachmentPathMessage,\n RuntimeGlobalErrorMessage,\n RuntimeMetricResultMessage,\n RuntimeMessage,\n SerializeOptions,\n SerializerReplacerFunc,\n} from \"./types.js\";\n\nexport const getStatusFromError = (error: unknown): ErrorStatus => {\n if (!error || (typeof error !== \"object\" && typeof error !== \"function\")) {\n return Status.BROKEN;\n }\n\n const errorObject = error as Partial<Error> & Record<PropertyKey, unknown>;\n const constructorName = String(errorObject?.constructor?.name ?? \"\");\n const name = String(errorObject.name ?? \"\");\n const message = String(errorObject.message ?? \"\");\n const stack = String(errorObject.stack ?? \"\");\n\n switch (true) {\n /**\n * Native `node:assert` and `chai` (`vitest` uses it under the hood) throw `AssertionError`\n * `jest` throws `JestAssertionError` instance\n * `jasmine` throws `ExpectationFailed` instance\n * `vitest` throws `Error` for extended assertions, so we look into stack\n * `codeceptjs-expect` errors have actual/expected properties or inspect method\n */\n case /assert/gi.test(constructorName):\n case /expectation/gi.test(constructorName):\n case /assert/gi.test(name):\n case /assert/gi.test(message):\n case /@vitest\\/expect/gi.test(stack):\n case /playwright\\/lib\\/matchers\\/expect\\.js/gi.test(stack):\n case /codeceptjs-expect/gi.test(stack):\n case \"matcherResult\" in errorObject:\n case \"inspect\" in errorObject && typeof errorObject.inspect === \"function\":\n case \"actual\" in errorObject:\n case \"expected\" in errorObject:\n return Status.FAILED;\n default:\n return Status.BROKEN;\n }\n};\n\n/**\n * Source: https://github.com/chalk/ansi-regex\n */\nconst ansiRegex = ({ onlyFirst = false } = {}) => {\n const pattern = [\n \"[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)\",\n \"(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-nq-uy=><~]))\",\n ].join(\"|\");\n\n return new RegExp(pattern, onlyFirst ? undefined : \"g\");\n};\n\n/**\n * https://github.com/chalk/strip-ansi\n */\nexport const stripAnsi = (str: string): string => {\n const regex = ansiRegex();\n return str.replace(regex, \"\");\n};\n\nconst actualAndExpected = (\n value: unknown,\n serializeValue: (value: unknown) => string,\n): { actual?: string; expected?: string } => {\n if (!value || typeof value !== \"object\") {\n return {};\n }\n\n // support for jest asserts\n const comparison =\n \"matcherResult\" in value && value.matcherResult !== null && typeof value.matcherResult === \"object\"\n ? value.matcherResult\n : value;\n\n const actual =\n \"actual\" in comparison && comparison.actual !== undefined ? { actual: serializeValue(comparison.actual) } : {};\n const expected =\n \"expected\" in comparison && comparison.expected !== undefined\n ? { expected: serializeValue(comparison.expected) }\n : {};\n return {\n ...actual,\n ...expected,\n };\n};\n\n/** Extract error details, optionally using an adapter-specific serializer for assertion values. */\nexport const getMessageAndTraceFromError = (\n error:\n | Error\n | {\n message?: string;\n stack?: string;\n },\n serializeValue: (value: unknown) => string = serialize,\n): StatusDetails => {\n const { message, stack } = error;\n return {\n message: message ? stripAnsi(message) : undefined,\n trace: stack ? stripAnsi(stack) : undefined,\n ...actualAndExpected(error, serializeValue),\n };\n};\n\n/**\n * Normalize global errors before transport, while non-enumerable error properties\n * and assertion metadata are still available for extraction and classification.\n *\n * @param {GlobalErrorArgs} args - Error details, or an explicit status and optional details.\n * @returns {StatusDetails & { status: ErrorStatus }} Serialized details with the explicit or inferred status.\n */\nexport const getGlobalErrorDetails = (\n ...[status, details]: GlobalErrorArgs\n): StatusDetails & { status: ErrorStatus } => {\n const error = typeof status === \"string\" ? (details ?? {}) : status;\n const resolvedStatus = typeof status === \"string\" ? status : getStatusFromError(error);\n const extracted = getMessageAndTraceFromError(error);\n const trace = \"trace\" in error ? error.trace : undefined;\n\n return {\n ...extracted,\n message: error.message === undefined ? undefined : stripAnsi(error.message),\n trace: trace === undefined ? extracted.trace : stripAnsi(trace),\n status: resolvedStatus,\n };\n};\n\nexport const toGlobalErrorMessage = ({\n name,\n details,\n status,\n}: {\n name: string;\n details: StatusDetails;\n status: Status;\n}): RuntimeGlobalErrorMessage => ({\n type: \"global_error\",\n data: {\n ...details,\n status: status === Status.FAILED ? Status.FAILED : Status.BROKEN,\n message: details.message ? `${name} failed: ${details.message}` : `${name} failed`,\n },\n});\n\ntype AllureTitleMetadataMatch = RegExpMatchArray & {\n groups: {\n type?: string;\n v1?: string;\n v2?: string;\n v3?: string;\n v4?: string;\n };\n};\n\nexport const allureMetadataRegexp = /(?:^|\\s)@?allure\\.(?<type>\\S+)$/;\nexport const allureTitleMetadataRegexp = /(?:^|\\s)@?allure\\.(?<type>[^:=\\s]+)[:=](\"[^\"]+\"|'[^']+'|`[^`]+`|\\S+)/;\nexport const allureTitleMetadataRegexpGlobal = new RegExp(allureTitleMetadataRegexp, \"g\");\nexport const allureIdRegexp = /(?:^|\\s)@?allure\\.id[:=](?<id>\\S+)/;\nexport const allureLabelRegexp = /(?:^|\\s)@?allure\\.label\\.(?<name>[^:=\\s]+)[:=](?<value>[^\\s]+)/;\n\nexport const getTypeFromAllureTitleMetadataMatch = (match: AllureTitleMetadataMatch) => {\n return match?.[1];\n};\n\nexport const getValueFromAllureTitleMetadataMatch = (match: AllureTitleMetadataMatch) => {\n const quotesRegexp = /['\"`]/;\n const quoteOpenRegexp = new RegExp(`^${quotesRegexp.source}`);\n const quoteCloseRegexp = new RegExp(`${quotesRegexp.source}$`);\n const matchedValue = match?.[2] ?? \"\";\n\n if (quoteOpenRegexp.test(matchedValue) && quoteCloseRegexp.test(matchedValue)) {\n return matchedValue.slice(1, -1);\n }\n\n return matchedValue;\n};\n\nexport const isMetadataTag = (tag: string) => {\n return allureMetadataRegexp.test(tag);\n};\n\nexport const getMetadataLabel = (tag: string, value?: string): Label | undefined => {\n const match = tag.match(allureMetadataRegexp);\n const type = match?.groups?.type;\n\n if (!type) {\n return undefined;\n }\n\n const [subtype, name] = type.split(\".\");\n\n return {\n name: subtype === \"id\" ? LabelName.ALLURE_ID : name,\n value: value ?? \"\",\n };\n};\n\nexport const extractMetadataFromString = (\n title: string,\n): {\n labels: Label[];\n links: Link[];\n cleanTitle: string;\n} => {\n const labels = [] as Label[];\n const links = [] as Link[];\n const metadata = title.matchAll(allureTitleMetadataRegexpGlobal);\n const cleanTitle = title\n .replaceAll(allureTitleMetadataRegexpGlobal, \"\")\n .split(\" \")\n .filter(Boolean)\n .reduce((acc, word) => {\n if (/^[\\n\\r]/.test(word)) {\n return acc + word;\n }\n\n return `${acc} ${word}`;\n }, \"\")\n .trim();\n\n for (const m of metadata) {\n const match = m as AllureTitleMetadataMatch;\n const type = getTypeFromAllureTitleMetadataMatch(match);\n const value = getValueFromAllureTitleMetadataMatch(match);\n\n if (!type || !value) {\n continue;\n }\n\n const [subtype, name] = type.split(\".\");\n\n switch (subtype) {\n case \"id\":\n labels.push({ name: LabelName.ALLURE_ID, value });\n break;\n case \"label\":\n labels.push({ name, value });\n break;\n case \"link\":\n links.push({ type: name, url: value });\n break;\n }\n }\n\n return {\n labels,\n links,\n cleanTitle,\n };\n};\n\nexport const isAnyStepFailed = (item: StepResult | TestResult | FixtureResult): boolean => {\n const isFailed = item.status === Status.FAILED;\n\n if (isFailed || item.steps.length === 0) {\n return isFailed;\n }\n\n return !!item.steps.find((step) => isAnyStepFailed(step));\n};\n\nexport const isAllStepsEnded = (item: StepResult | TestResult | FixtureResult): boolean => {\n return item.steps.every((val) => val.stop && isAllStepsEnded(val));\n};\n\nexport const hasLabel = (testResult: TestResult, labelName: LabelName | string): boolean => {\n return !!testResult.labels.find((l) => l.name === labelName);\n};\n\nexport const hasStepMessage = (messages: RuntimeMessage[]) => {\n return messages.some((message) => message.type === \"step_start\" || message.type === \"step_stop\");\n};\n\nexport const isGlobalRuntimeMessage = (\n message: RuntimeMessage,\n): message is\n | RuntimeGlobalAttachmentContentMessage\n | RuntimeGlobalAttachmentPathMessage\n | RuntimeGlobalErrorMessage\n | RuntimeMetricResultMessage => {\n return (\n message.type === \"global_attachment_content\" ||\n message.type === \"global_attachment_path\" ||\n message.type === \"global_error\" ||\n message.type === \"metric_result\"\n );\n};\n\nexport const getStepsMessagesPair = (messages: RuntimeMessage[]) =>\n messages.reduce((acc, message) => {\n if (message.type !== \"step_start\" && message.type !== \"step_stop\") {\n return acc;\n }\n\n if (message.type === \"step_start\") {\n acc.push([message]);\n\n return acc;\n }\n\n const unfinishedStepIdx = acc.findLastIndex((step) => step.length === 1);\n\n if (unfinishedStepIdx === -1) {\n return acc;\n }\n\n acc[unfinishedStepIdx].push(message);\n\n return acc;\n }, [] as RuntimeMessage[][]);\n\nexport const getUnfinishedStepsMessages = (messages: RuntimeMessage[]) => {\n const grouppedStepsMessage = getStepsMessagesPair(messages);\n\n return grouppedStepsMessage.filter((step) => step.length === 1);\n};\n\nexport const isPromise = <T = any>(obj: any): obj is PromiseLike<T> =>\n !!obj && (typeof obj === \"object\" || typeof obj === \"function\") && typeof obj.then === \"function\";\n\nexport const serialize = (value: any, { maxDepth = 0, maxLength = 0, replacer }: SerializeOptions = {}): string =>\n limitString(\n typeof value === \"object\" ? JSON.stringify(value, createSerializeReplacer(maxDepth, replacer)) : String(value),\n maxLength,\n );\n\nconst createSerializeReplacer = (maxDepth: number, userDefinedReplacer: SerializeOptions[\"replacer\"]) => {\n const parents: unknown[] = [];\n const limitingReplacer = function (this: unknown, _: string, value: unknown) {\n if (typeof value !== \"object\" || value === null) {\n return value;\n }\n\n while (parents.length > 0 && !Object.is(parents.at(-1), this)) {\n parents.pop();\n }\n\n if ((maxDepth && parents.length >= maxDepth) || parents.includes(value)) {\n return undefined;\n }\n\n parents.push(value);\n\n return value instanceof Map\n ? excludeCircularRefsFromMap(parents, value)\n : value instanceof Set\n ? excludeCircularRefsFromSet(parents, value)\n : value;\n };\n return userDefinedReplacer ? composeReplacers(userDefinedReplacer, limitingReplacer) : limitingReplacer;\n};\n\nexport const composeReplacers = (\n first: SerializerReplacerFunc,\n second: SerializerReplacerFunc,\n): SerializerReplacerFunc =>\n function (k, v) {\n return second.call(this, k, first.call(this, k, v));\n };\n\nexport const excludeCircularRefsFromMap = (parents: any[], map: Map<any, any>) => {\n return Array.from(map)\n .filter(([k]) => !parents.includes(k))\n .map(([k, v]) => [k, parents.includes(v) ? undefined : v]);\n};\n\nexport const excludeCircularRefsFromSet = (parents: any[], set: Set<any>) => {\n return Array.from(set).map((v) => (parents.includes(v) ? undefined : v));\n};\n\nexport const limitString = (value: string, maxLength: number) =>\n maxLength && value.length > maxLength ? `${value.substring(0, maxLength)}...` : value;\n\nexport const uint8ArrayToBase64 = (data: Uint8Array): string => {\n let binary = \"\";\n\n for (const charCode of data) {\n binary += String.fromCharCode(charCode);\n }\n\n return btoa(binary);\n};\n"],"mappings":";;;;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AC3B+F,MAAM,IAAI9I,MAAM,CAACgJ,YAAY,CAACD,QAAQ,CAAC;EACzC;EAEA,OAAOE,IAAI,CAACH,MAAM,CAAC;AACrB,CAAC;AAAC3H,OAAA,CAAA0H,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"utils.js","names":["_model","require","_slicedToArray","r","e","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","a","_arrayLikeToArray","t","toString","call","slice","constructor","name","Array","from","test","length","n","l","Symbol","iterator","i","u","f","o","next","Object","done","push","value","return","isArray","_wrapRegExp","BabelRegExp","RegExp","prototype","WeakMap","p","set","get","_setPrototypeOf","buildGroups","keys","reduce","create","_inherits","exec","groups","indices","replace","join","arguments","apply","writable","configurable","defineProperty","setPrototypeOf","bind","__proto__","ownKeys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","enumerable","_objectSpread","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","_toPrimitive","toPrimitive","String","Number","getStatusFromError","error","_errorObject$construc","_errorObject$construc2","_errorObject$name","_errorObject$message","_errorObject$stack","Status","BROKEN","errorObject","constructorName","message","stack","inspect","FAILED","exports","ansiRegex","_ref","undefined","_ref$onlyFirst","onlyFirst","pattern","stripAnsi","str","regex","actualAndExpected","serializeValue","comparison","matcherResult","actual","expected","getMessageAndTraceFromError","serialize","trace","getGlobalErrorDetails","_len","_ref2","_key","status","details","resolvedStatus","extracted","toGlobalErrorMessage","_ref3","type","data","concat","allureMetadataRegexp","allureTitleMetadataRegexp","allureTitleMetadataRegexpGlobal","allureIdRegexp","id","allureLabelRegexp","getTypeFromAllureTitleMetadataMatch","match","getValueFromAllureTitleMetadataMatch","_match$","quotesRegexp","quoteOpenRegexp","source","quoteCloseRegexp","matchedValue","isMetadataTag","tag","getMetadataLabel","_match$groups","_type$split","split","_type$split2","subtype","LabelName","ALLURE_ID","extractMetadataFromString","title","labels","links","metadata","matchAll","cleanTitle","replaceAll","Boolean","acc","word","trim","m","_type$split3","_type$split4","url","isAnyStepFailed","item","isFailed","steps","find","step","isAllStepsEnded","every","val","stop","hasLabel","testResult","labelName","hasStepMessage","messages","some","isGlobalRuntimeMessage","getStepsMessagesPair","unfinishedStepIdx","findLastIndex","getUnfinishedStepsMessages","grouppedStepsMessage","isPromise","obj","then","_ref4","_ref4$maxDepth","maxDepth","_ref4$maxLength","maxLength","replacer","limitString","JSON","stringify","createSerializeReplacer","userDefinedReplacer","parents","limitingReplacer","_","is","at","pop","includes","Map","excludeCircularRefsFromMap","Set","excludeCircularRefsFromSet","composeReplacers","first","second","k","v","map","_ref5","_ref6","_ref7","_ref8","substring","uint8ArrayToBase64","binary","charCode","fromCharCode","btoa"],"sources":["../../../src/sdk/utils.ts"],"sourcesContent":["import type {\n ErrorStatus,\n FixtureResult,\n GlobalErrorArgs,\n Label,\n Link,\n StatusDetails,\n StepResult,\n TestResult,\n} from \"../model.js\";\nimport { LabelName, Status } from \"../model.js\";\nimport type {\n RuntimeGlobalAttachmentContentMessage,\n RuntimeGlobalAttachmentPathMessage,\n RuntimeGlobalErrorMessage,\n RuntimeMetricResultMessage,\n RuntimeMessage,\n SerializeOptions,\n SerializerReplacerFunc,\n} from \"./types.js\";\n\nexport const getStatusFromError = (error: unknown): ErrorStatus => {\n if (!error || (typeof error !== \"object\" && typeof error !== \"function\")) {\n return Status.BROKEN;\n }\n\n const errorObject = error as Partial<Error> & Record<PropertyKey, unknown>;\n const constructorName = String(errorObject?.constructor?.name ?? \"\");\n const name = String(errorObject.name ?? \"\");\n const message = String(errorObject.message ?? \"\");\n const stack = String(errorObject.stack ?? \"\");\n\n switch (true) {\n /**\n * Native `node:assert` and `chai` (`vitest` uses it under the hood) throw `AssertionError`\n * `jest` throws `JestAssertionError` instance\n * `jasmine` throws `ExpectationFailed` instance\n * `vitest` throws `Error` for extended assertions, so we look into stack\n * `codeceptjs-expect` errors have actual/expected properties or inspect method\n */\n case /assert/gi.test(constructorName):\n case /expectation/gi.test(constructorName):\n case /assert/gi.test(name):\n case /assert/gi.test(message):\n case /@vitest\\/expect/gi.test(stack):\n case /playwright\\/lib\\/matchers\\/expect\\.js/gi.test(stack):\n case /codeceptjs-expect/gi.test(stack):\n case \"matcherResult\" in errorObject:\n case \"inspect\" in errorObject && typeof errorObject.inspect === \"function\":\n case \"actual\" in errorObject:\n case \"expected\" in errorObject:\n return Status.FAILED;\n default:\n return Status.BROKEN;\n }\n};\n\n/**\n * Source: https://github.com/chalk/ansi-regex\n */\nconst ansiRegex = ({ onlyFirst = false } = {}) => {\n const pattern = [\n \"[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)\",\n \"(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-nq-uy=><~]))\",\n ].join(\"|\");\n\n return new RegExp(pattern, onlyFirst ? undefined : \"g\");\n};\n\n/**\n * https://github.com/chalk/strip-ansi\n */\nexport const stripAnsi = (str: string): string => {\n const regex = ansiRegex();\n return str.replace(regex, \"\");\n};\n\nconst actualAndExpected = (\n value: unknown,\n serializeValue: (value: unknown) => string,\n): { actual?: string; expected?: string } => {\n if (!value || typeof value !== \"object\") {\n return {};\n }\n\n // support for jest asserts\n const comparison =\n \"matcherResult\" in value && value.matcherResult !== null && typeof value.matcherResult === \"object\"\n ? value.matcherResult\n : value;\n\n const actual =\n \"actual\" in comparison && comparison.actual !== undefined ? { actual: serializeValue(comparison.actual) } : {};\n const expected =\n \"expected\" in comparison && comparison.expected !== undefined\n ? { expected: serializeValue(comparison.expected) }\n : {};\n return {\n ...actual,\n ...expected,\n };\n};\n\n/** Extract error details, optionally using an adapter-specific serializer for assertion values. */\nexport const getMessageAndTraceFromError = (\n error:\n | Error\n | {\n message?: string;\n stack?: string;\n },\n serializeValue: (value: unknown) => string = serialize,\n): StatusDetails => {\n const { message, stack } = error;\n return {\n message: message ? stripAnsi(message) : undefined,\n trace: stack ? stripAnsi(stack) : undefined,\n ...actualAndExpected(error, serializeValue),\n };\n};\n\n/**\n * Normalize global errors before transport, while non-enumerable error properties\n * and assertion metadata are still available for extraction and classification.\n *\n * @param {GlobalErrorArgs} args - Error details, or an explicit status and optional details.\n * @returns {StatusDetails & { status: ErrorStatus }} Serialized details with the explicit or inferred status.\n */\nexport const getGlobalErrorDetails = (\n ...[status, details]: GlobalErrorArgs\n): StatusDetails & { status: ErrorStatus } => {\n const error = typeof status === \"string\" ? (details ?? {}) : status;\n const resolvedStatus = typeof status === \"string\" ? status : getStatusFromError(error);\n const extracted = getMessageAndTraceFromError(error);\n const trace = \"trace\" in error ? error.trace : undefined;\n\n return {\n ...extracted,\n message: error.message === undefined ? undefined : stripAnsi(error.message),\n trace: trace === undefined ? extracted.trace : stripAnsi(trace),\n status: resolvedStatus,\n };\n};\n\nexport const toGlobalErrorMessage = ({\n name,\n details,\n status,\n}: {\n name: string;\n details: StatusDetails;\n status: Status;\n}): RuntimeGlobalErrorMessage => ({\n type: \"global_error\",\n data: {\n ...details,\n status: status === Status.FAILED ? Status.FAILED : Status.BROKEN,\n message: details.message ? `${name} failed: ${details.message}` : `${name} failed`,\n },\n});\n\ntype AllureTitleMetadataMatch = RegExpMatchArray & {\n groups: {\n type?: string;\n v1?: string;\n v2?: string;\n v3?: string;\n v4?: string;\n };\n};\n\nexport const allureMetadataRegexp = /(?:^|\\s)@?allure\\.(?<type>\\S+)$/;\nexport const allureTitleMetadataRegexp = /(?:^|\\s)@?allure\\.(?<type>[^:=\\s]+)[:=](\"[^\"]+\"|'[^']+'|`[^`]+`|\\S+)/;\nexport const allureTitleMetadataRegexpGlobal = new RegExp(allureTitleMetadataRegexp, \"g\");\nexport const allureIdRegexp = /(?:^|\\s)@?allure\\.id[:=](?<id>\\S+)/;\nexport const allureLabelRegexp = /(?:^|\\s)@?allure\\.label\\.(?<name>[^:=\\s]+)[:=](?<value>[^\\s]+)/;\n\nexport const getTypeFromAllureTitleMetadataMatch = (match: AllureTitleMetadataMatch) => {\n return match?.[1];\n};\n\nexport const getValueFromAllureTitleMetadataMatch = (match: AllureTitleMetadataMatch) => {\n const quotesRegexp = /['\"`]/;\n const quoteOpenRegexp = new RegExp(`^${quotesRegexp.source}`);\n const quoteCloseRegexp = new RegExp(`${quotesRegexp.source}$`);\n const matchedValue = match?.[2] ?? \"\";\n\n if (quoteOpenRegexp.test(matchedValue) && quoteCloseRegexp.test(matchedValue)) {\n return matchedValue.slice(1, -1);\n }\n\n return matchedValue;\n};\n\nexport const isMetadataTag = (tag: string) => {\n return allureMetadataRegexp.test(tag);\n};\n\nexport const getMetadataLabel = (tag: string, value?: string): Label | undefined => {\n const match = tag.match(allureMetadataRegexp);\n const type = match?.groups?.type;\n\n if (!type) {\n return undefined;\n }\n\n const [subtype, name] = type.split(\".\");\n\n return {\n name: subtype === \"id\" ? LabelName.ALLURE_ID : name,\n value: value ?? \"\",\n };\n};\n\nexport const extractMetadataFromString = (\n title: string,\n): {\n labels: Label[];\n links: Link[];\n cleanTitle: string;\n} => {\n const labels = [] as Label[];\n const links = [] as Link[];\n const metadata = title.matchAll(allureTitleMetadataRegexpGlobal);\n const cleanTitle = title\n .replaceAll(allureTitleMetadataRegexpGlobal, \"\")\n .split(\" \")\n .filter(Boolean)\n .reduce((acc, word) => {\n if (/^[\\n\\r]/.test(word)) {\n return acc + word;\n }\n\n return `${acc} ${word}`;\n }, \"\")\n .trim();\n\n for (const m of metadata) {\n const match = m as AllureTitleMetadataMatch;\n const type = getTypeFromAllureTitleMetadataMatch(match);\n const value = getValueFromAllureTitleMetadataMatch(match);\n\n if (!type || !value) {\n continue;\n }\n\n const [subtype, name] = type.split(\".\");\n\n switch (subtype) {\n case \"id\":\n labels.push({ name: LabelName.ALLURE_ID, value });\n break;\n case \"label\":\n labels.push({ name, value });\n break;\n case \"link\":\n links.push({ type: name, url: value });\n break;\n }\n }\n\n return {\n labels,\n links,\n cleanTitle,\n };\n};\n\nexport const isAnyStepFailed = (item: StepResult | TestResult | FixtureResult): boolean => {\n const isFailed = item.status === Status.FAILED;\n\n if (isFailed || item.steps.length === 0) {\n return isFailed;\n }\n\n return !!item.steps.find((step) => isAnyStepFailed(step));\n};\n\nexport const isAllStepsEnded = (item: StepResult | TestResult | FixtureResult): boolean => {\n return item.steps.every((val) => val.stop && isAllStepsEnded(val));\n};\n\nexport const hasLabel = (testResult: TestResult, labelName: LabelName | string): boolean => {\n return !!testResult.labels.find((l) => l.name === labelName);\n};\n\nexport const hasStepMessage = (messages: RuntimeMessage[]) => {\n return messages.some((message) => message.type === \"step_start\" || message.type === \"step_stop\");\n};\n\nexport const isGlobalRuntimeMessage = (\n message: RuntimeMessage,\n): message is\n | RuntimeGlobalAttachmentContentMessage\n | RuntimeGlobalAttachmentPathMessage\n | RuntimeGlobalErrorMessage\n | RuntimeMetricResultMessage => {\n return (\n message.type === \"global_attachment_content\" ||\n message.type === \"global_attachment_path\" ||\n message.type === \"global_error\" ||\n message.type === \"metric_result\"\n );\n};\n\nexport const getStepsMessagesPair = (messages: RuntimeMessage[]) =>\n messages.reduce((acc, message) => {\n if (message.type !== \"step_start\" && message.type !== \"step_stop\") {\n return acc;\n }\n\n if (message.type === \"step_start\") {\n acc.push([message]);\n\n return acc;\n }\n\n const unfinishedStepIdx = acc.findLastIndex((step) => step.length === 1);\n\n if (unfinishedStepIdx === -1) {\n return acc;\n }\n\n acc[unfinishedStepIdx].push(message);\n\n return acc;\n }, [] as RuntimeMessage[][]);\n\nexport const getUnfinishedStepsMessages = (messages: RuntimeMessage[]) => {\n const grouppedStepsMessage = getStepsMessagesPair(messages);\n\n return grouppedStepsMessage.filter((step) => step.length === 1);\n};\n\nexport const isPromise = <T = any>(obj: any): obj is PromiseLike<T> =>\n !!obj && (typeof obj === \"object\" || typeof obj === \"function\") && typeof obj.then === \"function\";\n\nexport const serialize = (value: any, { maxDepth = 0, maxLength = 0, replacer }: SerializeOptions = {}): string =>\n limitString(\n typeof value === \"object\" ? JSON.stringify(value, createSerializeReplacer(maxDepth, replacer)) : String(value),\n maxLength,\n );\n\nconst createSerializeReplacer = (maxDepth: number, userDefinedReplacer: SerializeOptions[\"replacer\"]) => {\n const parents: unknown[] = [];\n const limitingReplacer = function (this: unknown, _: string, value: unknown) {\n if (typeof value !== \"object\" || value === null) {\n return value;\n }\n\n while (parents.length > 0 && !Object.is(parents.at(-1), this)) {\n parents.pop();\n }\n\n if ((maxDepth && parents.length >= maxDepth) || parents.includes(value)) {\n return undefined;\n }\n\n parents.push(value);\n\n return value instanceof Map\n ? excludeCircularRefsFromMap(parents, value)\n : value instanceof Set\n ? excludeCircularRefsFromSet(parents, value)\n : value;\n };\n return userDefinedReplacer ? composeReplacers(userDefinedReplacer, limitingReplacer) : limitingReplacer;\n};\n\nexport const composeReplacers = (\n first: SerializerReplacerFunc,\n second: SerializerReplacerFunc,\n): SerializerReplacerFunc =>\n function (k, v) {\n return second.call(this, k, first.call(this, k, v));\n };\n\nexport const excludeCircularRefsFromMap = (parents: any[], map: Map<any, any>) => {\n return Array.from(map)\n .filter(([k]) => !parents.includes(k))\n .map(([k, v]) => [k, parents.includes(v) ? undefined : v]);\n};\n\nexport const excludeCircularRefsFromSet = (parents: any[], set: Set<any>) => {\n return Array.from(set).map((v) => (parents.includes(v) ? undefined : v));\n};\n\nexport const limitString = (value: string, maxLength: number) =>\n maxLength && value.length > maxLength ? `${value.substring(0, maxLength)}...` : value;\n\nexport const uint8ArrayToBase64 = (data: Uint8Array): string => {\n let binary = \"\";\n\n for (const charCode of data) {\n binary += String.fromCharCode(charCode);\n }\n\n return btoa(binary);\n};\n"],"mappings":";;;;;;AAUA,IAAAA,MAAA,GAAAC,OAAA;AAAgD,SAAAC,eAAAC,CAAA,EAAAC,CAAA,WAAAC,eAAA,CAAAF,CAAA,KAAAG,qBAAA,CAAAH,CAAA,EAAAC,C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AAACpI,OAAA,CAAAmI,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -3,9 +3,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
3
3
|
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); }
|
|
4
4
|
export class Notifier {
|
|
5
5
|
constructor(_ref) {
|
|
6
|
-
var
|
|
7
|
-
listeners
|
|
8
|
-
} = _ref;
|
|
6
|
+
var listeners = _ref.listeners;
|
|
9
7
|
_defineProperty(this, "listeners", void 0);
|
|
10
8
|
_defineProperty(this, "callListeners", (listenerName, result) => {
|
|
11
9
|
for (var listener of this.listeners) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notifier.js","names":["Notifier","constructor","_ref","listeners","_defineProperty","listenerName","result","listener","_listener$listenerNam","call","err","console","error","concat","callListeners"],"sources":["../../../../src/sdk/reporter/Notifier.ts"],"sourcesContent":["import type { StepResult, TestResult } from \"../../model.js\";\nimport type { LifecycleListener } from \"./types.js\";\n\ntype ListenerKey = keyof LifecycleListener;\n\ntype ListenerTarget<T extends keyof LifecycleListener> = LifecycleListener[T] extends\n | ((_: infer TResult) => void)\n | undefined\n ? TResult\n : never;\n\nexport class Notifier implements LifecycleListener {\n listeners: LifecycleListener[];\n\n constructor({ listeners }: { listeners: LifecycleListener[] }) {\n this.listeners = [...listeners];\n }\n\n private callListeners = <TKey extends ListenerKey>(listenerName: TKey, result: ListenerTarget<TKey>) => {\n for (const listener of this.listeners) {\n try {\n // @ts-ignore\n listener?.[listenerName]?.(result);\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error(`${listenerName} listener handler can't be executed due an error: `, err);\n }\n }\n };\n\n beforeTestResultStart = (result: TestResult) => {\n this.callListeners(\"beforeTestResultStart\", result);\n };\n\n afterTestResultStart = (result: TestResult) => {\n this.callListeners(\"afterTestResultStart\", result);\n };\n\n beforeTestResultStop = (result: TestResult) => {\n this.callListeners(\"beforeTestResultStop\", result);\n };\n\n afterTestResultStop = (result: TestResult) => {\n this.callListeners(\"afterTestResultStop\", result);\n };\n\n beforeTestResultUpdate = (result: TestResult) => {\n this.callListeners(\"beforeTestResultUpdate\", result);\n };\n\n afterTestResultUpdate = (result: TestResult) => {\n this.callListeners(\"afterTestResultUpdate\", result);\n };\n\n beforeTestResultWrite = (result: TestResult) => {\n this.callListeners(\"beforeTestResultWrite\", result);\n };\n\n afterTestResultWrite = (result: TestResult) => {\n this.callListeners(\"afterTestResultWrite\", result);\n };\n\n beforeStepStop = (result: StepResult) => {\n this.callListeners(\"beforeStepStop\", result);\n };\n\n afterStepStop = (result: StepResult) => {\n this.callListeners(\"afterStepStop\", result);\n };\n}\n"],"mappings":";;;AAWA,OAAO,MAAMA,QAAQ,CAA8B;EAGjDC,WAAWA,CAAAC,IAAA,EAAoD;IAAA,
|
|
1
|
+
{"version":3,"file":"Notifier.js","names":["Notifier","constructor","_ref","listeners","_defineProperty","listenerName","result","listener","_listener$listenerNam","call","err","console","error","concat","callListeners"],"sources":["../../../../src/sdk/reporter/Notifier.ts"],"sourcesContent":["import type { StepResult, TestResult } from \"../../model.js\";\nimport type { LifecycleListener } from \"./types.js\";\n\ntype ListenerKey = keyof LifecycleListener;\n\ntype ListenerTarget<T extends keyof LifecycleListener> = LifecycleListener[T] extends\n | ((_: infer TResult) => void)\n | undefined\n ? TResult\n : never;\n\nexport class Notifier implements LifecycleListener {\n listeners: LifecycleListener[];\n\n constructor({ listeners }: { listeners: LifecycleListener[] }) {\n this.listeners = [...listeners];\n }\n\n private callListeners = <TKey extends ListenerKey>(listenerName: TKey, result: ListenerTarget<TKey>) => {\n for (const listener of this.listeners) {\n try {\n // @ts-ignore\n listener?.[listenerName]?.(result);\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error(`${listenerName} listener handler can't be executed due an error: `, err);\n }\n }\n };\n\n beforeTestResultStart = (result: TestResult) => {\n this.callListeners(\"beforeTestResultStart\", result);\n };\n\n afterTestResultStart = (result: TestResult) => {\n this.callListeners(\"afterTestResultStart\", result);\n };\n\n beforeTestResultStop = (result: TestResult) => {\n this.callListeners(\"beforeTestResultStop\", result);\n };\n\n afterTestResultStop = (result: TestResult) => {\n this.callListeners(\"afterTestResultStop\", result);\n };\n\n beforeTestResultUpdate = (result: TestResult) => {\n this.callListeners(\"beforeTestResultUpdate\", result);\n };\n\n afterTestResultUpdate = (result: TestResult) => {\n this.callListeners(\"afterTestResultUpdate\", result);\n };\n\n beforeTestResultWrite = (result: TestResult) => {\n this.callListeners(\"beforeTestResultWrite\", result);\n };\n\n afterTestResultWrite = (result: TestResult) => {\n this.callListeners(\"afterTestResultWrite\", result);\n };\n\n beforeStepStop = (result: StepResult) => {\n this.callListeners(\"beforeStepStop\", result);\n };\n\n afterStepStop = (result: StepResult) => {\n this.callListeners(\"afterStepStop\", result);\n };\n}\n"],"mappings":";;;AAWA,OAAO,MAAMA,QAAQ,CAA8B;EAGjDC,WAAWA,CAAAC,IAAA,EAAoD;IAAA,IAAjDC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAAC,eAAA;IAAAA,eAAA,wBAIC,CAA2BC,YAAkB,EAAEC,MAA4B,KAAK;MACtG,KAAK,IAAMC,QAAQ,IAAI,IAAI,CAACJ,SAAS,EAAE;QACrC,IAAI;UAAA,IAAAK,qBAAA;UACF;UACAD,QAAQ,aAARA,QAAQ,gBAAAC,qBAAA,GAARD,QAAQ,CAAGF,YAAY,CAAC,cAAAG,qBAAA,eAAxBA,qBAAA,CAAAC,IAAA,CAAAF,QAAQ,EAAmBD,MAAM,CAAC;QACpC,CAAC,CAAC,OAAOI,GAAG,EAAE;UACZ;UACAC,OAAO,CAACC,KAAK,IAAAC,MAAA,CAAIR,YAAY,yDAAsDK,GAAG,CAAC;QACzF;MACF;IACF,CAAC;I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it(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
1
7
|
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; }
|
|
2
8
|
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; }
|
|
3
9
|
function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
|
|
@@ -69,10 +75,10 @@ export class ShallowStepsStack {
|
|
|
69
75
|
console.error("There is no running step in the stack to stop!");
|
|
70
76
|
return;
|
|
71
77
|
}
|
|
72
|
-
var {
|
|
73
|
-
stop,
|
|
74
|
-
duration =
|
|
75
|
-
|
|
78
|
+
var _ref = opts !== null && opts !== void 0 ? opts : {},
|
|
79
|
+
stop = _ref.stop,
|
|
80
|
+
_ref$duration = _ref.duration,
|
|
81
|
+
duration = _ref$duration === void 0 ? 0 : _ref$duration;
|
|
76
82
|
this.updateStep(result => {
|
|
77
83
|
result.stop = (stop !== null && stop !== void 0 ? stop : result.start) ? result.start + duration : undefined;
|
|
78
84
|
});
|
|
@@ -176,16 +182,16 @@ var _writeFixturesOfScope = /*#__PURE__*/new WeakMap();
|
|
|
176
182
|
var _writeContainer = /*#__PURE__*/new WeakMap();
|
|
177
183
|
var _calculateTimings = /*#__PURE__*/new WeakMap();
|
|
178
184
|
export class ReporterRuntime {
|
|
179
|
-
constructor(
|
|
185
|
+
constructor(_ref2) {
|
|
180
186
|
var _this2 = this;
|
|
181
|
-
var
|
|
182
|
-
|
|
183
|
-
listeners = [],
|
|
184
|
-
environmentInfo,
|
|
185
|
-
categories,
|
|
186
|
-
links
|
|
187
|
-
globalLabels =
|
|
188
|
-
|
|
187
|
+
var writer = _ref2.writer,
|
|
188
|
+
_ref2$listeners = _ref2.listeners,
|
|
189
|
+
listeners = _ref2$listeners === void 0 ? [] : _ref2$listeners,
|
|
190
|
+
environmentInfo = _ref2.environmentInfo,
|
|
191
|
+
categories = _ref2.categories,
|
|
192
|
+
_links = _ref2.links,
|
|
193
|
+
_ref2$globalLabels = _ref2.globalLabels,
|
|
194
|
+
globalLabels = _ref2$globalLabels === void 0 ? {} : _ref2$globalLabels;
|
|
189
195
|
_defineProperty(this, "state", new LifecycleState());
|
|
190
196
|
_classPrivateFieldInitSpec(this, _emittedAttachments, new WeakMap());
|
|
191
197
|
_defineProperty(this, "notifier", void 0);
|
|
@@ -424,9 +430,8 @@ export class ReporterRuntime {
|
|
|
424
430
|
}
|
|
425
431
|
var attachment = _classPrivateFieldGet(_createAttachment, this).call(this, attachmentName, options.contentType, attachmentFileName);
|
|
426
432
|
if (options.wrapInStep) {
|
|
427
|
-
var
|
|
428
|
-
timestamp = Date.now()
|
|
429
|
-
} = options;
|
|
433
|
+
var _options$timestamp = options.timestamp,
|
|
434
|
+
timestamp = _options$timestamp === void 0 ? Date.now() : _options$timestamp;
|
|
430
435
|
parent.steps.push({
|
|
431
436
|
name: attachmentName,
|
|
432
437
|
attachments: [attachment],
|
|
@@ -521,20 +526,18 @@ export class ReporterRuntime {
|
|
|
521
526
|
_classPrivateFieldInitSpec(this, _handleMetadataMessage, (rootUuid, message) => {
|
|
522
527
|
// only display name could be set to fixture.
|
|
523
528
|
var fixtureResult = this.state.getWrappedFixtureResult(rootUuid);
|
|
524
|
-
var
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
expectedResultHtml
|
|
537
|
-
} = message;
|
|
529
|
+
var links = message.links,
|
|
530
|
+
labels = message.labels,
|
|
531
|
+
parameters = message.parameters,
|
|
532
|
+
displayName = message.displayName,
|
|
533
|
+
testCaseId = message.testCaseId,
|
|
534
|
+
historyId = message.historyId,
|
|
535
|
+
description = message.description,
|
|
536
|
+
descriptionHtml = message.descriptionHtml,
|
|
537
|
+
precondition = message.precondition,
|
|
538
|
+
preconditionHtml = message.preconditionHtml,
|
|
539
|
+
expectedResult = message.expectedResult,
|
|
540
|
+
expectedResultHtml = message.expectedResultHtml;
|
|
538
541
|
if (fixtureResult) {
|
|
539
542
|
if (displayName) {
|
|
540
543
|
this.updateFixture(rootUuid, result => {
|
|
@@ -636,10 +639,8 @@ export class ReporterRuntime {
|
|
|
636
639
|
console.error("could not handle step metadata message: no step is running");
|
|
637
640
|
return;
|
|
638
641
|
}
|
|
639
|
-
var
|
|
640
|
-
|
|
641
|
-
parameters
|
|
642
|
-
} = message;
|
|
642
|
+
var name = message.name,
|
|
643
|
+
parameters = message.parameters;
|
|
643
644
|
this.updateStep(stepUuid, stepResult => {
|
|
644
645
|
if (name) {
|
|
645
646
|
stepResult.name = name;
|
|
@@ -760,11 +761,9 @@ export class ReporterRuntime {
|
|
|
760
761
|
_classPrivateFieldInitSpec(this, _writeGlobals, globals => {
|
|
761
762
|
this.writer.writeGlobals("".concat(randomUuid(), "-globals.json"), globals);
|
|
762
763
|
});
|
|
763
|
-
_classPrivateFieldInitSpec(this, _writeFixturesOfScope,
|
|
764
|
-
var
|
|
765
|
-
|
|
766
|
-
tests
|
|
767
|
-
} = _ref2;
|
|
764
|
+
_classPrivateFieldInitSpec(this, _writeFixturesOfScope, _ref3 => {
|
|
765
|
+
var fixtures = _ref3.fixtures,
|
|
766
|
+
tests = _ref3.tests;
|
|
768
767
|
var writtenFixtures = new Set();
|
|
769
768
|
if (tests.length) {
|
|
770
769
|
for (var wrappedFixture of fixtures) {
|
|
@@ -826,8 +825,10 @@ export class ReporterRuntime {
|
|
|
826
825
|
if (Array.isArray(globalLabels)) {
|
|
827
826
|
this.globalLabels = globalLabels;
|
|
828
827
|
} else if (Object.keys(globalLabels).length) {
|
|
829
|
-
this.globalLabels = Object.entries(globalLabels).flatMap(
|
|
830
|
-
var
|
|
828
|
+
this.globalLabels = Object.entries(globalLabels).flatMap(_ref4 => {
|
|
829
|
+
var _ref5 = _slicedToArray(_ref4, 2),
|
|
830
|
+
name = _ref5[0],
|
|
831
|
+
value = _ref5[1];
|
|
831
832
|
if (Array.isArray(value)) {
|
|
832
833
|
return value.map(v => ({
|
|
833
834
|
name,
|