allure-js-commons 3.14.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 +15 -2
- package/dist/cjs/facade.js +37 -1
- package/dist/cjs/facade.js.map +1 -1
- package/dist/cjs/index.js +36 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/model.js +6 -2
- package/dist/cjs/model.js.map +1 -1
- package/dist/cjs/sdk/index.js.map +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 +113 -54
- package/dist/cjs/sdk/reporter/ReporterRuntime.js.map +1 -1
- package/dist/cjs/sdk/reporter/index.js.map +1 -1
- package/dist/cjs/sdk/reporter/testplan.js +24 -18
- package/dist/cjs/sdk/reporter/testplan.js.map +1 -1
- package/dist/cjs/sdk/reporter/types.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 +26 -11
- package/dist/cjs/sdk/reporter/utils.js.map +1 -1
- package/dist/cjs/sdk/reporter/writer/FileSystemWriter.js +1 -1
- package/dist/cjs/sdk/reporter/writer/FileSystemWriter.js.map +1 -1
- package/dist/cjs/sdk/reporter/writer/InMemoryWriter.js +4 -5
- package/dist/cjs/sdk/reporter/writer/InMemoryWriter.js.map +1 -1
- package/dist/cjs/sdk/reporter/writer/MessageReader.js +24 -13
- package/dist/cjs/sdk/reporter/writer/MessageReader.js.map +1 -1
- package/dist/cjs/sdk/reporter/writer/MessageWriter.js +2 -2
- package/dist/cjs/sdk/reporter/writer/MessageWriter.js.map +1 -1
- package/dist/cjs/sdk/runtime/MessageTestRuntime.js +98 -30
- package/dist/cjs/sdk/runtime/MessageTestRuntime.js.map +1 -1
- package/dist/cjs/sdk/runtime/NoopTestRuntime.js +48 -12
- package/dist/cjs/sdk/runtime/NoopTestRuntime.js.map +1 -1
- package/dist/cjs/sdk/runtime/types.js.map +1 -1
- package/dist/cjs/sdk/types.js.map +1 -1
- package/dist/cjs/sdk/utils.js +49 -34
- package/dist/cjs/sdk/utils.js.map +1 -1
- package/dist/cjs/sync.js +24 -0
- package/dist/cjs/sync.js.map +1 -1
- package/dist/cjs/syncFacade.js +17 -1
- package/dist/cjs/syncFacade.js.map +1 -1
- package/dist/esm/facade.js +31 -0
- package/dist/esm/facade.js.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/model.js +6 -0
- package/dist/esm/model.js.map +1 -1
- package/dist/esm/sdk/index.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 +113 -54
- package/dist/esm/sdk/reporter/ReporterRuntime.js.map +1 -1
- package/dist/esm/sdk/reporter/index.js.map +1 -1
- package/dist/esm/sdk/reporter/testplan.js +24 -16
- package/dist/esm/sdk/reporter/testplan.js.map +1 -1
- package/dist/esm/sdk/reporter/types.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 +24 -11
- package/dist/esm/sdk/reporter/utils.js.map +1 -1
- package/dist/esm/sdk/reporter/writer/FileSystemWriter.js +1 -1
- package/dist/esm/sdk/reporter/writer/FileSystemWriter.js.map +1 -1
- package/dist/esm/sdk/reporter/writer/InMemoryWriter.js +4 -5
- package/dist/esm/sdk/reporter/writer/InMemoryWriter.js.map +1 -1
- package/dist/esm/sdk/reporter/writer/MessageReader.js +24 -13
- package/dist/esm/sdk/reporter/writer/MessageReader.js.map +1 -1
- package/dist/esm/sdk/reporter/writer/MessageWriter.js +2 -2
- package/dist/esm/sdk/reporter/writer/MessageWriter.js.map +1 -1
- package/dist/esm/sdk/runtime/MessageTestRuntime.js +98 -30
- package/dist/esm/sdk/runtime/MessageTestRuntime.js.map +1 -1
- package/dist/esm/sdk/runtime/NoopTestRuntime.js +48 -12
- package/dist/esm/sdk/runtime/NoopTestRuntime.js.map +1 -1
- package/dist/esm/sdk/runtime/types.js.map +1 -1
- package/dist/esm/sdk/types.js.map +1 -1
- package/dist/esm/sdk/utils.js +49 -33
- package/dist/esm/sdk/utils.js.map +1 -1
- package/dist/esm/sync.js +1 -1
- package/dist/esm/sync.js.map +1 -1
- package/dist/esm/syncFacade.js +12 -0
- package/dist/esm/syncFacade.js.map +1 -1
- package/dist/types/facade.d.ts +6 -0
- package/dist/types/index.d.ts +3 -3
- package/dist/types/model.d.ts +9 -1
- package/dist/types/sdk/index.d.ts +1 -1
- package/dist/types/sdk/reporter/ReporterRuntime.d.ts +11 -1
- package/dist/types/sdk/reporter/index.d.ts +1 -1
- package/dist/types/sdk/reporter/testplan.d.ts +5 -1
- package/dist/types/sdk/reporter/types.d.ts +6 -2
- package/dist/types/sdk/reporter/utils.d.ts +3 -0
- package/dist/types/sdk/reporter/writer/FileSystemWriter.d.ts +2 -2
- package/dist/types/sdk/reporter/writer/InMemoryWriter.d.ts +3 -3
- package/dist/types/sdk/reporter/writer/MessageWriter.d.ts +2 -2
- package/dist/types/sdk/runtime/MessageTestRuntime.d.ts +6 -2
- package/dist/types/sdk/runtime/NoopTestRuntime.d.ts +9 -1
- package/dist/types/sdk/runtime/types.d.ts +10 -2
- package/dist/types/sdk/types.d.ts +10 -5
- package/dist/types/sdk/utils.d.ts +4 -3
- package/dist/types/sync.d.ts +1 -1
- package/dist/types/syncFacade.d.ts +4 -0
- package/package.json +12 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../src/sdk/types.ts"],"sourcesContent":["import type {\n
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/sdk/types.ts"],"sourcesContent":["import type {\n AllureMetricResult,\n ErrorStatus,\n Globals,\n Label,\n Link,\n Parameter,\n Status,\n StatusDetails,\n TestResult,\n TestResultContainer,\n} from \"../model.js\";\n\ntype RuntimeMessageBase<T extends string> = {\n type: T;\n};\n\nexport type RuntimeMetadataMessage = RuntimeMessageBase<\"metadata\"> & {\n data: {\n labels?: Label[];\n links?: Link[];\n parameters?: Parameter[];\n description?: string;\n descriptionHtml?: string;\n precondition?: string;\n preconditionHtml?: string;\n expectedResult?: string;\n expectedResultHtml?: string;\n testCaseId?: string;\n historyId?: string;\n displayName?: string;\n };\n};\n\nexport type RuntimeStartStepMessage = RuntimeMessageBase<\"step_start\"> & {\n data: {\n name: string;\n start: number;\n };\n};\n\nexport type RuntimeStepMetadataMessage = RuntimeMessageBase<\"step_metadata\"> & {\n data: {\n name?: string;\n parameters?: Parameter[];\n };\n};\n\nexport type RuntimeStopStepMessage = RuntimeMessageBase<\"step_stop\"> & {\n data: {\n stop: number;\n status: Status;\n statusDetails?: StatusDetails;\n };\n};\n\nexport type RuntimeAttachmentContentMessage = RuntimeMessageBase<\"attachment_content\"> & {\n data: {\n name: string;\n content: string;\n encoding: BufferEncoding;\n contentType: string;\n fileExtension?: string;\n wrapInStep?: boolean;\n timestamp?: number;\n };\n};\n\nexport type RuntimeAttachmentPathMessage = RuntimeMessageBase<\"attachment_path\"> & {\n data: {\n name: string;\n path: string;\n contentType: string;\n fileExtension?: string;\n wrapInStep?: boolean;\n timestamp?: number;\n };\n};\n\nexport type RuntimeGlobalAttachmentContentMessage = RuntimeMessageBase<\"global_attachment_content\"> & {\n data: {\n name: string;\n content: string;\n encoding: BufferEncoding;\n contentType: string;\n fileExtension?: string;\n };\n};\n\nexport type RuntimeGlobalAttachmentPathMessage = RuntimeMessageBase<\"global_attachment_path\"> & {\n data: {\n name: string;\n path: string;\n contentType: string;\n fileExtension?: string;\n };\n};\n\nexport type RuntimeGlobalErrorMessage = RuntimeMessageBase<\"global_error\"> & {\n data: StatusDetails & { status?: ErrorStatus };\n};\n\nexport type RuntimeMetricResultMessage = RuntimeMessageBase<\"metric_result\"> & {\n data: AllureMetricResult[];\n};\n\nexport type RuntimeMessage =\n | RuntimeMetadataMessage\n | RuntimeStartStepMessage\n | RuntimeStepMetadataMessage\n | RuntimeStopStepMessage\n | RuntimeAttachmentContentMessage\n | RuntimeAttachmentPathMessage\n | RuntimeGlobalAttachmentContentMessage\n | RuntimeGlobalAttachmentPathMessage\n | RuntimeGlobalErrorMessage\n | RuntimeMetricResultMessage;\n\nexport interface TestPlanV1Test {\n id?: string | number;\n selector?: string;\n}\n\nexport interface TestPlanV1 {\n version: \"1.0\";\n tests: TestPlanV1Test[];\n excludedTests?: TestPlanV1Test[];\n}\n\nexport type EnvironmentInfo = Record<string, string | undefined>;\n\nexport interface Category {\n name?: string;\n description?: string;\n descriptionHtml?: string;\n messageRegex?: string | RegExp;\n traceRegex?: string | RegExp;\n matchedStatuses?: Status[];\n flaky?: boolean;\n}\n\nexport interface ExecutorInfo {\n name?: string;\n type?: string;\n url?: string;\n buildOrder?: number;\n buildName?: string;\n buildUrl?: string;\n reportUrl?: string;\n reportName?: string;\n}\n\nexport interface AllureResults {\n tests: TestResult[];\n groups: TestResultContainer[];\n attachments: Record<string, Buffer | string>;\n globals?: Record<string, Globals>;\n metrics?: Record<string, AllureMetricResult[]>;\n envInfo?: EnvironmentInfo;\n categories?: Category[];\n}\n\nexport type SerializerReplacerFunc = (this: unknown, key: string, value: unknown) => unknown;\n\nexport type SerializeOptions = {\n maxDepth?: number;\n maxLength?: number;\n replacer?: SerializerReplacerFunc;\n};\n"],"mappings":"","ignoreList":[]}
|
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
|
};
|
|
@@ -68,7 +74,7 @@ var stripAnsi = str => {
|
|
|
68
74
|
return str.replace(regex, "");
|
|
69
75
|
};
|
|
70
76
|
exports.stripAnsi = stripAnsi;
|
|
71
|
-
var actualAndExpected = value => {
|
|
77
|
+
var actualAndExpected = (value, serializeValue) => {
|
|
72
78
|
if (!value || typeof value !== "object") {
|
|
73
79
|
return {};
|
|
74
80
|
}
|
|
@@ -76,22 +82,23 @@ var actualAndExpected = value => {
|
|
|
76
82
|
// support for jest asserts
|
|
77
83
|
var comparison = "matcherResult" in value && value.matcherResult !== null && typeof value.matcherResult === "object" ? value.matcherResult : value;
|
|
78
84
|
var actual = "actual" in comparison && comparison.actual !== undefined ? {
|
|
79
|
-
actual:
|
|
85
|
+
actual: serializeValue(comparison.actual)
|
|
80
86
|
} : {};
|
|
81
87
|
var expected = "expected" in comparison && comparison.expected !== undefined ? {
|
|
82
|
-
expected:
|
|
88
|
+
expected: serializeValue(comparison.expected)
|
|
83
89
|
} : {};
|
|
84
90
|
return _objectSpread(_objectSpread({}, actual), expected);
|
|
85
91
|
};
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
92
|
+
|
|
93
|
+
/** Extract error details, optionally using an adapter-specific serializer for assertion values. */
|
|
94
|
+
var getMessageAndTraceFromError = exports.getMessageAndTraceFromError = function getMessageAndTraceFromError(error) {
|
|
95
|
+
var serializeValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : serialize;
|
|
96
|
+
var message = error.message,
|
|
97
|
+
stack = error.stack;
|
|
91
98
|
return _objectSpread({
|
|
92
99
|
message: message ? stripAnsi(message) : undefined,
|
|
93
100
|
trace: stack ? stripAnsi(stack) : undefined
|
|
94
|
-
}, actualAndExpected(error));
|
|
101
|
+
}, actualAndExpected(error, serializeValue));
|
|
95
102
|
};
|
|
96
103
|
|
|
97
104
|
/**
|
|
@@ -101,12 +108,12 @@ var getMessageAndTraceFromError = error => {
|
|
|
101
108
|
* @param {GlobalErrorArgs} args - Error details, or an explicit status and optional details.
|
|
102
109
|
* @returns {StatusDetails & { status: ErrorStatus }} Serialized details with the explicit or inferred status.
|
|
103
110
|
*/
|
|
104
|
-
exports.getMessageAndTraceFromError = getMessageAndTraceFromError;
|
|
105
111
|
var getGlobalErrorDetails = exports.getGlobalErrorDetails = function getGlobalErrorDetails() {
|
|
106
|
-
for (var _len = arguments.length,
|
|
107
|
-
|
|
112
|
+
for (var _len = arguments.length, _ref2 = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
113
|
+
_ref2[_key] = arguments[_key];
|
|
108
114
|
}
|
|
109
|
-
var
|
|
115
|
+
var status = _ref2[0],
|
|
116
|
+
details = _ref2[1];
|
|
110
117
|
var error = typeof status === "string" ? details !== null && details !== void 0 ? details : {} : status;
|
|
111
118
|
var resolvedStatus = typeof status === "string" ? status : getStatusFromError(error);
|
|
112
119
|
var extracted = getMessageAndTraceFromError(error);
|
|
@@ -117,12 +124,10 @@ var getGlobalErrorDetails = exports.getGlobalErrorDetails = function getGlobalEr
|
|
|
117
124
|
status: resolvedStatus
|
|
118
125
|
});
|
|
119
126
|
};
|
|
120
|
-
var toGlobalErrorMessage =
|
|
121
|
-
var
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
status
|
|
125
|
-
} = _ref2;
|
|
127
|
+
var toGlobalErrorMessage = _ref3 => {
|
|
128
|
+
var name = _ref3.name,
|
|
129
|
+
details = _ref3.details,
|
|
130
|
+
status = _ref3.status;
|
|
126
131
|
return {
|
|
127
132
|
type: "global_error",
|
|
128
133
|
data: _objectSpread(_objectSpread({}, details), {}, {
|
|
@@ -173,7 +178,10 @@ var getMetadataLabel = (tag, value) => {
|
|
|
173
178
|
if (!type) {
|
|
174
179
|
return undefined;
|
|
175
180
|
}
|
|
176
|
-
var
|
|
181
|
+
var _type$split = type.split("."),
|
|
182
|
+
_type$split2 = _slicedToArray(_type$split, 2),
|
|
183
|
+
subtype = _type$split2[0],
|
|
184
|
+
name = _type$split2[1];
|
|
177
185
|
return {
|
|
178
186
|
name: subtype === "id" ? _model.LabelName.ALLURE_ID : name,
|
|
179
187
|
value: value !== null && value !== void 0 ? value : ""
|
|
@@ -197,7 +205,10 @@ var extractMetadataFromString = title => {
|
|
|
197
205
|
if (!type || !value) {
|
|
198
206
|
continue;
|
|
199
207
|
}
|
|
200
|
-
var
|
|
208
|
+
var _type$split3 = type.split("."),
|
|
209
|
+
_type$split4 = _slicedToArray(_type$split3, 2),
|
|
210
|
+
subtype = _type$split4[0],
|
|
211
|
+
name = _type$split4[1];
|
|
201
212
|
switch (subtype) {
|
|
202
213
|
case "id":
|
|
203
214
|
labels.push({
|
|
@@ -247,7 +258,7 @@ var hasStepMessage = messages => {
|
|
|
247
258
|
};
|
|
248
259
|
exports.hasStepMessage = hasStepMessage;
|
|
249
260
|
var isGlobalRuntimeMessage = message => {
|
|
250
|
-
return message.type === "global_attachment_content" || message.type === "global_attachment_path" || message.type === "global_error" || message.type === "
|
|
261
|
+
return message.type === "global_attachment_content" || message.type === "global_attachment_path" || message.type === "global_error" || message.type === "metric_result";
|
|
251
262
|
};
|
|
252
263
|
exports.isGlobalRuntimeMessage = isGlobalRuntimeMessage;
|
|
253
264
|
var getStepsMessagesPair = messages => messages.reduce((acc, message) => {
|
|
@@ -274,11 +285,12 @@ exports.getUnfinishedStepsMessages = getUnfinishedStepsMessages;
|
|
|
274
285
|
var isPromise = obj => !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function";
|
|
275
286
|
exports.isPromise = isPromise;
|
|
276
287
|
var serialize = exports.serialize = function serialize(value) {
|
|
277
|
-
var {
|
|
278
|
-
maxDepth =
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
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;
|
|
282
294
|
return limitString(typeof value === "object" ? JSON.stringify(value, createSerializeReplacer(maxDepth, replacer)) : String(value), maxLength);
|
|
283
295
|
};
|
|
284
296
|
var createSerializeReplacer = (maxDepth, userDefinedReplacer) => {
|
|
@@ -303,11 +315,14 @@ var composeReplacers = (first, second) => function (k, v) {
|
|
|
303
315
|
};
|
|
304
316
|
exports.composeReplacers = composeReplacers;
|
|
305
317
|
var excludeCircularRefsFromMap = (parents, map) => {
|
|
306
|
-
return Array.from(map).filter(
|
|
307
|
-
var
|
|
318
|
+
return Array.from(map).filter(_ref5 => {
|
|
319
|
+
var _ref6 = _slicedToArray(_ref5, 1),
|
|
320
|
+
k = _ref6[0];
|
|
308
321
|
return !parents.includes(k);
|
|
309
|
-
}).map(
|
|
310
|
-
var
|
|
322
|
+
}).map(_ref7 => {
|
|
323
|
+
var _ref8 = _slicedToArray(_ref7, 2),
|
|
324
|
+
k = _ref8[0],
|
|
325
|
+
v = _ref8[1];
|
|
311
326
|
return [k, parents.includes(v) ? undefined : v];
|
|
312
327
|
});
|
|
313
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","comparison","matcherResult","actual","serialize","expected","getMessageAndTraceFromError","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 RuntimePerformanceResultMessage,\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 = (value: unknown): { 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: serialize(comparison.actual) } : {};\n const expected =\n \"expected\" in comparison && comparison.expected !== undefined ? { expected: serialize(comparison.expected) } : {};\n return {\n ...actual,\n ...expected,\n };\n};\n\nexport const getMessageAndTraceFromError = (\n error:\n | Error\n | {\n message?: string;\n stack?: string;\n },\n): StatusDetails => {\n const { message, stack } = error;\n return {\n message: message ? stripAnsi(message) : undefined,\n trace: stack ? stripAnsi(stack) : undefined,\n ...actualAndExpected(error),\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 | RuntimePerformanceResultMessage => {\n return (\n message.type === \"global_attachment_content\" ||\n message.type === \"global_attachment_path\" ||\n message.type === \"global_error\" ||\n message.type === \"performance_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,YAAA,IAAAA,WAAA,YAAAA,YAAAC,CAAA,EAAAC,CAAA,eAAAC,WAAA,CAAAF,CAAA,UAAAC,CAAA,UAAAD,CAAA,GAAAG,MAAA,CAAAC,SAAA,EAAAH,CAAA,OAAAI,OAAA,aAAAH,YAAAF,CAAA,EAAAM,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAL,MAAA,CAAAH,CAAA,EAAAM,CAAA,UAAAL,CAAA,CAAAQ,GAAA,CAAAD,CAAA,EAAAD,CAAA,IAAAN,CAAA,CAAAS,GAAA,CAAAV,CAAA,IAAAW,eAAA,CAAAH,CAAA,EAAAN,WAAA,CAAAE,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EK,IAAME,0BAA0B,GAAGA,CAACV,OAAc,EAAErK,GAAa,KAAK;EAC3E,OAAOiB,KAAK,CAACqK,IAAI,CAACtL,GAAG,CAAC,CAACqL,GAAG,CAAED,CAAC,IAAMf,OAAO,CAACM,QAAQ,CAACS,CAAC,CAAC,GAAGhH,SAAS,GAAGgH,CAAE,CAAC;AAC1E,CAAC;AAACnH,OAAA,CAAA8G,0BAAA,GAAAA,0BAAA;AAEK,IAAMf,WAAW,GAAGA,CAACtI,KAAa,EAAEoI,SAAiB,KAC1DA,SAAS,IAAIpI,KAAK,CAAClB,MAAM,GAAGsJ,SAAS,MAAAjE,MAAA,CAAMnE,KAAK,CAAC+J,SAAS,CAAC,CAAC,EAAE3B,SAAS,CAAC,WAAQpI,KAAK;AAACuC,OAAA,CAAA+F,WAAA,GAAAA,WAAA;AAEjF,IAAM0B,kBAAkB,GAAI9F,IAAgB,IAAa;EAC9D,IAAI+F,MAAM,GAAG,EAAE;EAEf,KAAK,IAAMC,QAAQ,IAAIhG,IAAI,EAAE;IAC3B+F,MAAM,IAAI7I,MAAM,CAAC+I,YAAY,CAACD,QAAQ,CAAC;EACzC;EAEA,OAAOE,IAAI,CAACH,MAAM,CAAC;AACrB,CAAC;AAAC1H,OAAA,CAAAyH,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,CAAA,KAAAG,2BAAA,CAAAJ,CAAA,EAAAC,CAAA,KAAAI,gBAAA;AAAA,SAAAA,iBAAA,cAAAC,SAAA;AAAA,SAAAF,4BAAAJ,CAAA,EAAAO,CAAA,QAAAP,CAAA,2BAAAA,CAAA,SAAAQ,iBAAA,CAAAR,CAAA,EAAAO,CAAA,OAAAE,CAAA,MAAAC,QAAA,CAAAC,IAAA,CAAAX,CAAA,EAAAY,KAAA,6BAAAH,CAAA,IAAAT,CAAA,CAAAa,WAAA,KAAAJ,CAAA,GAAAT,CAAA,CAAAa,WAAA,CAAAC,IAAA,aAAAL,CAAA,cAAAA,CAAA,GAAAM,KAAA,CAAAC,IAAA,CAAAhB,CAAA,oBAAAS,CAAA,+CAAAQ,IAAA,CAAAR,CAAA,IAAAD,iBAAA,CAAAR,CAAA,EAAAO,CAAA;AAAA,SAAAC,kBAAAR,CAAA,EAAAO,CAAA,aAAAA,CAAA,IAAAA,CAAA,G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AAG,CAAED,CAAC,IAAMf,OAAO,CAACM,QAAQ,CAACS,CAAC,CAAC,GAAGzH,SAAS,GAAGyH,CAAE,CAAC;AAC1E,CAAC;AAAC5H,OAAA,CAAAuH,0BAAA,GAAAA,0BAAA;AAEK,IAAMf,WAAW,GAAGA,CAACpK,KAAa,EAAEkK,SAAiB,KAC1DA,SAAS,IAAIlK,KAAK,CAACb,MAAM,GAAG+K,SAAS,MAAAvE,MAAA,CAAM3F,KAAK,CAAC8L,SAAS,CAAC,CAAC,EAAE5B,SAAS,CAAC,WAAQlK,KAAK;AAAC4D,OAAA,CAAAwG,WAAA,GAAAA,WAAA;AAEjF,IAAM2B,kBAAkB,GAAIrG,IAAgB,IAAa;EAC9D,IAAIsG,MAAM,GAAG,EAAE;EAEf,KAAK,IAAMC,QAAQ,IAAIvG,IAAI,EAAE;IAC3BsG,MAAM,IAAIrJ,MAAM,CAACuJ,YAAY,CAACD,QAAQ,CAAC;EACzC;EAEA,OAAOE,IAAI,CAACH,MAAM,CAAC;AACrB,CAAC;AAACpI,OAAA,CAAAmI,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
package/dist/cjs/sync.js
CHANGED
|
@@ -117,6 +117,18 @@ Object.defineProperty(exports, "epic", {
|
|
|
117
117
|
return _syncFacade.epic;
|
|
118
118
|
}
|
|
119
119
|
});
|
|
120
|
+
Object.defineProperty(exports, "expectedResult", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function get() {
|
|
123
|
+
return _syncFacade.expectedResult;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
Object.defineProperty(exports, "expectedResultHtml", {
|
|
127
|
+
enumerable: true,
|
|
128
|
+
get: function get() {
|
|
129
|
+
return _syncFacade.expectedResultHtml;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
120
132
|
Object.defineProperty(exports, "feature", {
|
|
121
133
|
enumerable: true,
|
|
122
134
|
get: function get() {
|
|
@@ -207,6 +219,18 @@ Object.defineProperty(exports, "parentSuite", {
|
|
|
207
219
|
return _syncFacade.parentSuite;
|
|
208
220
|
}
|
|
209
221
|
});
|
|
222
|
+
Object.defineProperty(exports, "precondition", {
|
|
223
|
+
enumerable: true,
|
|
224
|
+
get: function get() {
|
|
225
|
+
return _syncFacade.precondition;
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
Object.defineProperty(exports, "preconditionHtml", {
|
|
229
|
+
enumerable: true,
|
|
230
|
+
get: function get() {
|
|
231
|
+
return _syncFacade.preconditionHtml;
|
|
232
|
+
}
|
|
233
|
+
});
|
|
210
234
|
Object.defineProperty(exports, "severity", {
|
|
211
235
|
enumerable: true,
|
|
212
236
|
get: function get() {
|
package/dist/cjs/sync.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.js","names":["_syncFacade","require","_model","_http"],"sources":["../../src/sync.ts"],"sourcesContent":["export {\n allureId,\n attachment,\n attachmentPath,\n attachTrace,\n description,\n descriptionHtml,\n displayName,\n epic,\n feature,\n globalAttachment,\n globalAttachmentPath,\n globalError,\n historyId,\n issue,\n label,\n labels,\n layer,\n link,\n links,\n logStep,\n owner,\n parameter,\n parentSuite,\n severity,\n step,\n story,\n subSuite,\n suite,\n tag,\n tags,\n testCaseId,\n tms,\n} from \"./syncFacade.js\";\nexport type { SyncStepContext } from \"./sdk/runtime/types.js\";\nexport type {\n Attachment,\n AttachmentOptions,\n ErrorDetails,\n ErrorStatus,\n FixtureResult,\n GlobalErrorArgs,\n Globals,\n ImageDiffAttachment,\n Label,\n Link,\n Parameter,\n ParameterMode,\n ParameterOptions,\n StatusDetails,\n StepResult,\n TestOrStepResult,\n TestResult,\n TestResultContainer,\n} from \"./model.js\";\nexport { ContentType, LabelName, LinkType, Severity, Stage, Status, StatusByPriority } from \"./model.js\";\nexport type {\n HttpExchange,\n HttpExchangeBody,\n HttpExchangeBodyPart,\n HttpExchangeCookie,\n HttpExchangeError,\n HttpExchangeInformationalResponse,\n HttpExchangeNameValue,\n HttpExchangeRequest,\n HttpExchangeResponse,\n HttpExchangeStream,\n} from \"./http.js\";\nexport {\n ALLURE_HTTP_EXCHANGE_CONTENT_TYPE,\n ALLURE_HTTP_EXCHANGE_FILE_EXTENSION,\n ALLURE_HTTP_EXCHANGE_SCHEMA_VERSION,\n ALLURE_HTTP_REDACTED_VALUE,\n} from \"./http.js\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"sync.js","names":["_syncFacade","require","_model","_http"],"sources":["../../src/sync.ts"],"sourcesContent":["export {\n allureId,\n attachment,\n attachmentPath,\n attachTrace,\n description,\n descriptionHtml,\n displayName,\n epic,\n expectedResult,\n expectedResultHtml,\n feature,\n globalAttachment,\n globalAttachmentPath,\n globalError,\n historyId,\n issue,\n label,\n labels,\n layer,\n link,\n links,\n logStep,\n owner,\n parameter,\n parentSuite,\n precondition,\n preconditionHtml,\n severity,\n step,\n story,\n subSuite,\n suite,\n tag,\n tags,\n testCaseId,\n tms,\n} from \"./syncFacade.js\";\nexport type { SyncStepContext } from \"./sdk/runtime/types.js\";\nexport type {\n Attachment,\n AttachmentOptions,\n ErrorDetails,\n ErrorStatus,\n FixtureResult,\n GlobalErrorArgs,\n Globals,\n ImageDiffAttachment,\n Label,\n Link,\n Parameter,\n ParameterMode,\n ParameterOptions,\n StatusDetails,\n StepResult,\n TestOrStepResult,\n TestResult,\n TestResultContainer,\n} from \"./model.js\";\nexport { ContentType, LabelName, LinkType, Severity, Stage, Status, StatusByPriority } from \"./model.js\";\nexport type {\n HttpExchange,\n HttpExchangeBody,\n HttpExchangeBodyPart,\n HttpExchangeCookie,\n HttpExchangeError,\n HttpExchangeInformationalResponse,\n HttpExchangeNameValue,\n HttpExchangeRequest,\n HttpExchangeResponse,\n HttpExchangeStream,\n} from \"./http.js\";\nexport {\n ALLURE_HTTP_EXCHANGE_CONTENT_TYPE,\n ALLURE_HTTP_EXCHANGE_FILE_EXTENSION,\n ALLURE_HTTP_EXCHANGE_SCHEMA_VERSION,\n ALLURE_HTTP_REDACTED_VALUE,\n} from \"./http.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AA2DA,IAAAC,MAAA,GAAAD,OAAA;AAaA,IAAAE,KAAA,GAAAF,OAAA","ignoreList":[]}
|
package/dist/cjs/syncFacade.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.tms = exports.testCaseId = exports.tags = exports.tag = exports.suite = exports.subSuite = exports.story = exports.step = exports.severity = exports.parentSuite = exports.parameter = exports.owner = exports.logStep = exports.links = exports.link = exports.layer = exports.labels = exports.label = exports.issue = exports.historyId = exports.globalError = exports.globalAttachmentPath = exports.globalAttachment = exports.feature = exports.epic = exports.displayName = exports.descriptionHtml = exports.description = exports.attachmentPath = exports.attachment = exports.attachTrace = exports.allureId = void 0;
|
|
6
|
+
exports.tms = exports.testCaseId = exports.tags = exports.tag = exports.suite = exports.subSuite = exports.story = exports.step = exports.severity = exports.preconditionHtml = exports.precondition = exports.parentSuite = exports.parameter = exports.owner = exports.logStep = exports.links = exports.link = exports.layer = exports.labels = exports.label = exports.issue = exports.historyId = exports.globalError = exports.globalAttachmentPath = exports.globalAttachment = exports.feature = exports.expectedResultHtml = exports.expectedResult = exports.epic = exports.displayName = exports.descriptionHtml = exports.description = exports.attachmentPath = exports.attachment = exports.attachTrace = exports.allureId = void 0;
|
|
7
7
|
var _model = require("./model.js");
|
|
8
8
|
var _runtime = require("./sdk/runtime/runtime.js");
|
|
9
9
|
var callRuntimeMethod = function callRuntimeMethod(method) {
|
|
@@ -54,6 +54,22 @@ var descriptionHtml = html => {
|
|
|
54
54
|
return callRuntimeMethod("descriptionHtml", html);
|
|
55
55
|
};
|
|
56
56
|
exports.descriptionHtml = descriptionHtml;
|
|
57
|
+
var precondition = markdown => {
|
|
58
|
+
return callRuntimeMethod("precondition", markdown);
|
|
59
|
+
};
|
|
60
|
+
exports.precondition = precondition;
|
|
61
|
+
var preconditionHtml = html => {
|
|
62
|
+
return callRuntimeMethod("preconditionHtml", html);
|
|
63
|
+
};
|
|
64
|
+
exports.preconditionHtml = preconditionHtml;
|
|
65
|
+
var expectedResult = markdown => {
|
|
66
|
+
return callRuntimeMethod("expectedResult", markdown);
|
|
67
|
+
};
|
|
68
|
+
exports.expectedResult = expectedResult;
|
|
69
|
+
var expectedResultHtml = html => {
|
|
70
|
+
return callRuntimeMethod("expectedResultHtml", html);
|
|
71
|
+
};
|
|
72
|
+
exports.expectedResultHtml = expectedResultHtml;
|
|
57
73
|
var displayName = name => {
|
|
58
74
|
return callRuntimeMethod("displayName", name);
|
|
59
75
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"syncFacade.js","names":["_model","require","_runtime","callRuntimeMethod","method","runtime","getGlobalSyncTestRuntimeWithAutoconfig","_len","arguments","length","args","Array","_key","label","name","value","exports","labels","_len2","labelsList","_key2","link","url","type","links","_len3","linksList","_key3","parameter","options","description","markdown","descriptionHtml","html","displayName","historyId","testCaseId","attachment","content","opts","contentType","globalAttachment","globalAttachmentPath","path","globalError","_len4","_key4","attachTrace","attachmentPath","stepContext","mode","logStep","status","error","step","body","issue","LinkType","ISSUE","tms","TMS","allureId","LabelName","ALLURE_ID","epic","EPIC","feature","FEATURE","story","STORY","suite","SUITE","parentSuite","PARENT_SUITE","subSuite","SUB_SUITE","owner","OWNER","severity","SEVERITY","layer","LAYER","tag","TAG","tags","_len5","tagsList","_key5","map"],"sources":["../../src/syncFacade.ts"],"sourcesContent":["import type {\n AttachmentOptions,\n GlobalErrorArgs,\n Label,\n Link,\n ParameterMode,\n ParameterOptions,\n Status,\n} from \"./model.js\";\nimport { type ContentType, LabelName, LinkType } from \"./model.js\";\nimport { getGlobalSyncTestRuntimeWithAutoconfig } from \"./sdk/runtime/runtime.js\";\nimport type { SyncStepContext, SyncTestRuntime } from \"./sdk/runtime/types.js\";\n\nconst callRuntimeMethod = <\n T extends keyof SyncTestRuntime,\n S extends Parameters<SyncTestRuntime[T]>,\n R extends ReturnType<SyncTestRuntime[T]>,\n>(\n method: T,\n ...args: S\n): R => {\n const runtime = getGlobalSyncTestRuntimeWithAutoconfig();\n\n // @ts-ignore\n return runtime[method](...args);\n};\n\nexport const label = (name: LabelName | string, value: string) => {\n return callRuntimeMethod(\"labels\", { name, value });\n};\n\nexport const labels = (...labelsList: Label[]) => {\n return callRuntimeMethod(\"labels\", ...labelsList);\n};\n\nexport const link = (url: string, name?: string, type?: LinkType | string) => {\n return callRuntimeMethod(\"links\", { url, type, name });\n};\n\nexport const links = (...linksList: Link[]) => {\n return callRuntimeMethod(\"links\", ...linksList);\n};\n\nexport const parameter = (name: string, value: string, options?: ParameterOptions) => {\n return callRuntimeMethod(\"parameter\", name, value, options);\n};\n\nexport const description = (markdown: string) => {\n return callRuntimeMethod(\"description\", markdown);\n};\n\nexport const descriptionHtml = (html: string) => {\n return callRuntimeMethod(\"descriptionHtml\", html);\n};\n\nexport const displayName = (name: string) => {\n return callRuntimeMethod(\"displayName\", name);\n};\n\nexport const historyId = (value: string) => {\n return callRuntimeMethod(\"historyId\", value);\n};\n\nexport const testCaseId = (value: string) => {\n return callRuntimeMethod(\"testCaseId\", value);\n};\n\nexport const attachment = (\n name: string,\n content: Buffer | Uint8Array | string,\n options: ContentType | string | AttachmentOptions,\n) => {\n const opts = typeof options === \"string\" ? { contentType: options } : options;\n return callRuntimeMethod(\"attachment\", name, content, opts);\n};\n\nexport const globalAttachment = (\n name: string,\n content: Buffer | Uint8Array | string,\n options: ContentType | string | AttachmentOptions,\n) => {\n const opts = typeof options === \"string\" ? { contentType: options } : options;\n return callRuntimeMethod(\"globalAttachment\", name, content, opts);\n};\n\nexport const globalAttachmentPath = (\n name: string,\n path: string,\n options: ContentType | string | Omit<AttachmentOptions, \"encoding\">,\n) => {\n const opts = typeof options === \"string\" ? { contentType: options } : options;\n return callRuntimeMethod(\"globalAttachmentFromPath\", name, path, opts);\n};\n\nexport const globalError = (...args: GlobalErrorArgs) => {\n return callRuntimeMethod(\"globalError\", ...args);\n};\n\nexport const attachTrace = (name: string, path: string) => {\n return callRuntimeMethod(\"attachmentFromPath\", name, path, {\n contentType: \"application/vnd.allure.playwright-trace\",\n });\n};\n\nexport const attachmentPath = (\n name: string,\n path: string,\n options: ContentType | string | Omit<AttachmentOptions, \"encoding\">,\n) => {\n const opts = typeof options === \"string\" ? { contentType: options } : options;\n return callRuntimeMethod(\"attachmentFromPath\", name, path, opts);\n};\n\nconst stepContext = (): SyncStepContext => ({\n displayName: (name: string) => {\n return callRuntimeMethod(\"stepDisplayName\", name);\n },\n parameter: (name, value, mode?: ParameterMode) => {\n return callRuntimeMethod(\"stepParameter\", name, value, mode);\n },\n});\n\nexport const logStep = (name: string, status?: Status, error?: Error): void => {\n return callRuntimeMethod(\"logStep\", name, status, error);\n};\n\nexport const step = <T = void>(name: string, body: (context: SyncStepContext) => T): T => {\n return callRuntimeMethod(\"step\", name, () => body(stepContext()));\n};\n\nexport const issue = (url: string, name?: string) => link(url, name, LinkType.ISSUE);\n\nexport const tms = (url: string, name?: string) => link(url, name, LinkType.TMS);\n\nexport const allureId = (value: string) => label(LabelName.ALLURE_ID, value);\n\nexport const epic = (name: string) => label(LabelName.EPIC, name);\n\nexport const feature = (name: string) => label(LabelName.FEATURE, name);\n\nexport const story = (name: string) => label(LabelName.STORY, name);\n\nexport const suite = (name: string) => label(LabelName.SUITE, name);\n\nexport const parentSuite = (name: string) => label(LabelName.PARENT_SUITE, name);\n\nexport const subSuite = (name: string) => label(LabelName.SUB_SUITE, name);\n\nexport const owner = (name: string) => label(LabelName.OWNER, name);\n\nexport const severity = (name: string) => label(LabelName.SEVERITY, name);\n\nexport const layer = (name: string) => label(LabelName.LAYER, name);\n\nexport const tag = (name: string) => label(LabelName.TAG, name);\n\nexport const tags = (...tagsList: string[]) => {\n return callRuntimeMethod(\n \"labels\",\n ...tagsList.map((value) => ({\n name: LabelName.TAG,\n value,\n })),\n );\n};\n"],"mappings":";;;;;;AASA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAGA,IAAME,iBAAiB,GAAG,SAApBA,iBAAiBA,CAKrBC,MAAS,EAEH;EACN,IAAMC,OAAO,GAAG,IAAAC,+CAAsC,EAAC,CAAC;;EAExD;EAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAJGC,IAAI,OAAAC,KAAA,CAAAJ,IAAA,OAAAA,IAAA,WAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAAJF,IAAI,CAAAE,IAAA,QAAAJ,SAAA,CAAAI,IAAA;EAAA;EAKP,OAAOP,OAAO,CAACD,MAAM,CAAC,CAAC,GAAGM,IAAI,CAAC;AACjC,CAAC;AAEM,IAAMG,KAAK,GAAGA,CAACC,IAAwB,EAAEC,KAAa,KAAK;EAChE,OAAOZ,iBAAiB,CAAC,QAAQ,EAAE;IAAEW,IAAI;IAAEC;EAAM,CAAC,CAAC;AACrD,CAAC;AAACC,OAAA,CAAAH,KAAA,GAAAA,KAAA;AAEK,IAAMI,MAAM,GAAAD,OAAA,CAAAC,MAAA,GAAG,SAATA,MAAMA,CAAA,EAA+B;EAAA,SAAAC,KAAA,GAAAV,SAAA,CAAAC,MAAA,EAAxBU,UAAU,OAAAR,KAAA,CAAAO,KAAA,GAAAE,KAAA,MAAAA,KAAA,GAAAF,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AAA,SAAAC,KAAA,GAAA7E,SAAA,CAAAC,MAAA,EAAvB6E,QAAQ,OAAA3E,KAAA,CAAA0E,KAAA,GAAAE,KAAA,MAAAA,KAAA,GAAAF,KAAA,EAAAE,KAAA;IAARD,QAAQ,CAAAC,KAAA,IAAA/E,SAAA,CAAA+E,KAAA;EAAA;EAC9B,OAAOpF,iBAAiB,CACtB,QAAQ,EACR,GAAGmF,QAAQ,CAACE,GAAG,CAAEzE,KAAK,KAAM;IAC1BD,IAAI,EAAEgD,gBAAS,CAACqB,GAAG;IACnBpE;EACF,CAAC,CAAC,CACJ,CAAC;AACH,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"syncFacade.js","names":["_model","require","_runtime","callRuntimeMethod","method","runtime","getGlobalSyncTestRuntimeWithAutoconfig","_len","arguments","length","args","Array","_key","label","name","value","exports","labels","_len2","labelsList","_key2","link","url","type","links","_len3","linksList","_key3","parameter","options","description","markdown","descriptionHtml","html","precondition","preconditionHtml","expectedResult","expectedResultHtml","displayName","historyId","testCaseId","attachment","content","opts","contentType","globalAttachment","globalAttachmentPath","path","globalError","_len4","_key4","attachTrace","attachmentPath","stepContext","mode","logStep","status","error","step","body","issue","LinkType","ISSUE","tms","TMS","allureId","LabelName","ALLURE_ID","epic","EPIC","feature","FEATURE","story","STORY","suite","SUITE","parentSuite","PARENT_SUITE","subSuite","SUB_SUITE","owner","OWNER","severity","SEVERITY","layer","LAYER","tag","TAG","tags","_len5","tagsList","_key5","map"],"sources":["../../src/syncFacade.ts"],"sourcesContent":["import type {\n AttachmentOptions,\n GlobalErrorArgs,\n Label,\n Link,\n ParameterMode,\n ParameterOptions,\n Status,\n} from \"./model.js\";\nimport { type ContentType, LabelName, LinkType } from \"./model.js\";\nimport { getGlobalSyncTestRuntimeWithAutoconfig } from \"./sdk/runtime/runtime.js\";\nimport type { SyncStepContext, SyncTestRuntime } from \"./sdk/runtime/types.js\";\n\nconst callRuntimeMethod = <\n T extends keyof SyncTestRuntime,\n S extends Parameters<SyncTestRuntime[T]>,\n R extends ReturnType<SyncTestRuntime[T]>,\n>(\n method: T,\n ...args: S\n): R => {\n const runtime = getGlobalSyncTestRuntimeWithAutoconfig();\n\n // @ts-ignore\n return runtime[method](...args);\n};\n\nexport const label = (name: LabelName | string, value: string) => {\n return callRuntimeMethod(\"labels\", { name, value });\n};\n\nexport const labels = (...labelsList: Label[]) => {\n return callRuntimeMethod(\"labels\", ...labelsList);\n};\n\nexport const link = (url: string, name?: string, type?: LinkType | string) => {\n return callRuntimeMethod(\"links\", { url, type, name });\n};\n\nexport const links = (...linksList: Link[]) => {\n return callRuntimeMethod(\"links\", ...linksList);\n};\n\nexport const parameter = (name: string, value: string, options?: ParameterOptions) => {\n return callRuntimeMethod(\"parameter\", name, value, options);\n};\n\nexport const description = (markdown: string) => {\n return callRuntimeMethod(\"description\", markdown);\n};\n\nexport const descriptionHtml = (html: string) => {\n return callRuntimeMethod(\"descriptionHtml\", html);\n};\n\nexport const precondition = (markdown: string) => {\n return callRuntimeMethod(\"precondition\", markdown);\n};\n\nexport const preconditionHtml = (html: string) => {\n return callRuntimeMethod(\"preconditionHtml\", html);\n};\n\nexport const expectedResult = (markdown: string) => {\n return callRuntimeMethod(\"expectedResult\", markdown);\n};\n\nexport const expectedResultHtml = (html: string) => {\n return callRuntimeMethod(\"expectedResultHtml\", html);\n};\n\nexport const displayName = (name: string) => {\n return callRuntimeMethod(\"displayName\", name);\n};\n\nexport const historyId = (value: string) => {\n return callRuntimeMethod(\"historyId\", value);\n};\n\nexport const testCaseId = (value: string) => {\n return callRuntimeMethod(\"testCaseId\", value);\n};\n\nexport const attachment = (\n name: string,\n content: Buffer | Uint8Array | string,\n options: ContentType | string | AttachmentOptions,\n) => {\n const opts = typeof options === \"string\" ? { contentType: options } : options;\n return callRuntimeMethod(\"attachment\", name, content, opts);\n};\n\nexport const globalAttachment = (\n name: string,\n content: Buffer | Uint8Array | string,\n options: ContentType | string | AttachmentOptions,\n) => {\n const opts = typeof options === \"string\" ? { contentType: options } : options;\n return callRuntimeMethod(\"globalAttachment\", name, content, opts);\n};\n\nexport const globalAttachmentPath = (\n name: string,\n path: string,\n options: ContentType | string | Omit<AttachmentOptions, \"encoding\">,\n) => {\n const opts = typeof options === \"string\" ? { contentType: options } : options;\n return callRuntimeMethod(\"globalAttachmentFromPath\", name, path, opts);\n};\n\nexport const globalError = (...args: GlobalErrorArgs) => {\n return callRuntimeMethod(\"globalError\", ...args);\n};\n\nexport const attachTrace = (name: string, path: string) => {\n return callRuntimeMethod(\"attachmentFromPath\", name, path, {\n contentType: \"application/vnd.allure.playwright-trace\",\n });\n};\n\nexport const attachmentPath = (\n name: string,\n path: string,\n options: ContentType | string | Omit<AttachmentOptions, \"encoding\">,\n) => {\n const opts = typeof options === \"string\" ? { contentType: options } : options;\n return callRuntimeMethod(\"attachmentFromPath\", name, path, opts);\n};\n\nconst stepContext = (): SyncStepContext => ({\n displayName: (name: string) => {\n return callRuntimeMethod(\"stepDisplayName\", name);\n },\n parameter: (name, value, mode?: ParameterMode) => {\n return callRuntimeMethod(\"stepParameter\", name, value, mode);\n },\n});\n\nexport const logStep = (name: string, status?: Status, error?: Error): void => {\n return callRuntimeMethod(\"logStep\", name, status, error);\n};\n\nexport const step = <T = void>(name: string, body: (context: SyncStepContext) => T): T => {\n return callRuntimeMethod(\"step\", name, () => body(stepContext()));\n};\n\nexport const issue = (url: string, name?: string) => link(url, name, LinkType.ISSUE);\n\nexport const tms = (url: string, name?: string) => link(url, name, LinkType.TMS);\n\nexport const allureId = (value: string) => label(LabelName.ALLURE_ID, value);\n\nexport const epic = (name: string) => label(LabelName.EPIC, name);\n\nexport const feature = (name: string) => label(LabelName.FEATURE, name);\n\nexport const story = (name: string) => label(LabelName.STORY, name);\n\nexport const suite = (name: string) => label(LabelName.SUITE, name);\n\nexport const parentSuite = (name: string) => label(LabelName.PARENT_SUITE, name);\n\nexport const subSuite = (name: string) => label(LabelName.SUB_SUITE, name);\n\nexport const owner = (name: string) => label(LabelName.OWNER, name);\n\nexport const severity = (name: string) => label(LabelName.SEVERITY, name);\n\nexport const layer = (name: string) => label(LabelName.LAYER, name);\n\nexport const tag = (name: string) => label(LabelName.TAG, name);\n\nexport const tags = (...tagsList: string[]) => {\n return callRuntimeMethod(\n \"labels\",\n ...tagsList.map((value) => ({\n name: LabelName.TAG,\n value,\n })),\n );\n};\n"],"mappings":";;;;;;AASA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAGA,IAAME,iBAAiB,GAAG,SAApBA,iBAAiBA,CAKrBC,MAAS,EAEH;EACN,IAAMC,OAAO,GAAG,IAAAC,+CAAsC,EAAC,CAAC;;EAExD;EAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAJGC,IAAI,OAAAC,KAAA,CAAAJ,IAAA,OAAAA,IAAA,WAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAAJF,IAAI,CAAAE,IAAA,QAAAJ,SAAA,CAAAI,IAAA;EAAA;EAKP,OAAOP,OAAO,CAACD,MAAM,CAAC,CAAC,GAAGM,IAAI,CAAC;AACjC,CAAC;AAEM,IAAMG,KAAK,GAAGA,CAACC,IAAwB,EAAEC,KAAa,KAAK;EAChE,OAAOZ,iBAAiB,CAAC,QAAQ,EAAE;IAAEW,IAAI;IAAEC;EAAM,CAAC,CAAC;AACrD,CAAC;AAACC,OAAA,CAAAH,KAAA,GAAAA,KAAA;AAEK,IAAMI,MAAM,GAAAD,OAAA,CAAAC,MAAA,GAAG,SAATA,MAAMA,CAAA,EAA+B;EAAA,SAAAC,KAAA,GAAAV,SAAA,CAAAC,MAAA,EAAxBU,UAAU,OAAAR,KAAA,CAAAO,KAAA,GAAAE,KAAA,MAAAA,KAAA,GAAAF,KAAA,EAAAE,KAAA;IAAVD,UAAU,CAAAC,KAAA,IAAAZ,SAAA,CAAAY,KAAA;EAAA;EAClC,OAAOjB,iBAAiB,CAAC,QAAQ,EAAE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A,KAAA;AAE7D,IAAME,QAAQ,GAAIpE,IAAY,IAAKD,KAAK,CAACqD,gBAAS,CAACiB,QAAQ,EAAErE,IAAI,CAAC;AAACE,OAAA,CAAAkE,QAAA,GAAAA,QAAA;AAEnE,IAAME,KAAK,GAAItE,IAAY,IAAKD,KAAK,CAACqD,gBAAS,CAACmB,KAAK,EAAEvE,IAAI,CAAC;AAACE,OAAA,CAAAoE,KAAA,GAAAA,KAAA;AAE7D,IAAME,GAAG,GAAIxE,IAAY,IAAKD,KAAK,CAACqD,gBAAS,CAACqB,GAAG,EAAEzE,IAAI,CAAC;AAACE,OAAA,CAAAsE,GAAA,GAAAA,GAAA;AAEzD,IAAME,IAAI,GAAAxE,OAAA,CAAAwE,IAAA,GAAG,SAAPA,IAAIA,CAAA,EAA8B;EAAA,SAAAC,KAAA,GAAAjF,SAAA,CAAAC,MAAA,EAAvBiF,QAAQ,OAAA/E,KAAA,CAAA8E,KAAA,GAAAE,KAAA,MAAAA,KAAA,GAAAF,KAAA,EAAAE,KAAA;IAARD,QAAQ,CAAAC,KAAA,IAAAnF,SAAA,CAAAmF,KAAA;EAAA;EAC9B,OAAOxF,iBAAiB,CACtB,QAAQ,EACR,GAAGuF,QAAQ,CAACE,GAAG,CAAE7E,KAAK,KAAM;IAC1BD,IAAI,EAAEoD,gBAAS,CAACqB,GAAG;IACnBxE;EACF,CAAC,CAAC,CACJ,CAAC;AACH,CAAC","ignoreList":[]}
|
package/dist/esm/facade.js
CHANGED
|
@@ -50,6 +50,18 @@ export var description = markdown => {
|
|
|
50
50
|
export var descriptionHtml = html => {
|
|
51
51
|
return callRuntimeMethod("descriptionHtml", html);
|
|
52
52
|
};
|
|
53
|
+
export var precondition = markdown => {
|
|
54
|
+
return callRuntimeMethod("precondition", markdown);
|
|
55
|
+
};
|
|
56
|
+
export var preconditionHtml = html => {
|
|
57
|
+
return callRuntimeMethod("preconditionHtml", html);
|
|
58
|
+
};
|
|
59
|
+
export var expectedResult = markdown => {
|
|
60
|
+
return callRuntimeMethod("expectedResult", markdown);
|
|
61
|
+
};
|
|
62
|
+
export var expectedResultHtml = html => {
|
|
63
|
+
return callRuntimeMethod("expectedResultHtml", html);
|
|
64
|
+
};
|
|
53
65
|
export var displayName = name => {
|
|
54
66
|
return callRuntimeMethod("displayName", name);
|
|
55
67
|
};
|
|
@@ -77,6 +89,25 @@ export var globalAttachmentPath = (name, path, options) => {
|
|
|
77
89
|
} : options;
|
|
78
90
|
return callRuntimeMethod("globalAttachmentFromPath", name, path, opts);
|
|
79
91
|
};
|
|
92
|
+
|
|
93
|
+
/** Record a numeric metric for the report. The key identifies the same metric across runs. */
|
|
94
|
+
export var metric = (key, value) => {
|
|
95
|
+
if (typeof key !== "string" || key.length === 0) {
|
|
96
|
+
throw new TypeError("Metric key must be a non-empty string");
|
|
97
|
+
}
|
|
98
|
+
var numericValue = typeof value === "string" && value.trim() !== "" ? Number(value) : value;
|
|
99
|
+
if (typeof numericValue !== "number" || !Number.isFinite(numericValue)) {
|
|
100
|
+
throw new TypeError("Metric value must be a finite number or a numeric string representing a finite number");
|
|
101
|
+
}
|
|
102
|
+
var timestamp = Date.now();
|
|
103
|
+
return callRuntimeMethod("metrics", {
|
|
104
|
+
id: key,
|
|
105
|
+
key,
|
|
106
|
+
value: numericValue,
|
|
107
|
+
start: timestamp,
|
|
108
|
+
stop: timestamp
|
|
109
|
+
});
|
|
110
|
+
};
|
|
80
111
|
export var globalError = function globalError() {
|
|
81
112
|
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
82
113
|
args[_key4] = arguments[_key4];
|