allure-js-commons 3.0.0-beta.5 → 3.0.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/facade.js +5 -1
- package/dist/cjs/facade.js.map +1 -1
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/sdk/reporter/ReporterRuntime.js +41 -7
- package/dist/cjs/sdk/reporter/ReporterRuntime.js.map +1 -1
- package/dist/cjs/sdk/runtime/MessageTestRuntime.js +32 -8
- package/dist/cjs/sdk/runtime/MessageTestRuntime.js.map +1 -1
- package/dist/cjs/sdk/runtime/NoopTestRuntime.js +11 -5
- package/dist/cjs/sdk/runtime/NoopTestRuntime.js.map +1 -1
- package/dist/cjs/sdk/runtime/types.js.map +1 -1
- package/dist/esm/facade.js +3 -0
- package/dist/esm/facade.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/sdk/reporter/ReporterRuntime.js +41 -7
- package/dist/esm/sdk/reporter/ReporterRuntime.js.map +1 -1
- package/dist/esm/sdk/runtime/MessageTestRuntime.js +33 -9
- package/dist/esm/sdk/runtime/MessageTestRuntime.js.map +1 -1
- package/dist/esm/sdk/runtime/NoopTestRuntime.js +11 -5
- package/dist/esm/sdk/runtime/NoopTestRuntime.js.map +1 -1
- package/dist/esm/sdk/runtime/types.js.map +1 -1
- package/dist/types/facade.d.ts +3 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/sdk/reporter/ReporterRuntime.d.ts +12 -3
- package/dist/types/sdk/runtime/MessageTestRuntime.d.ts +2 -1
- package/dist/types/sdk/runtime/NoopTestRuntime.d.ts +1 -0
- package/dist/types/sdk/runtime/types.d.ts +2 -1
- package/package.json +9 -6
package/dist/cjs/facade.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.links = exports.link = exports.layer = exports.labels = exports.label = exports.issue = exports.historyId = exports.feature = exports.epic = exports.displayName = exports.descriptionHtml = exports.description = exports.attachmentPath = exports.attachment = exports.allureId = void 0;
|
|
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.feature = exports.epic = exports.displayName = exports.descriptionHtml = exports.description = exports.attachmentPath = exports.attachment = exports.allureId = void 0;
|
|
7
7
|
var _model = require("./model.js");
|
|
8
8
|
var _runtime = require("./sdk/runtime/runtime.js");
|
|
9
9
|
var _utils = require("./sdk/utils.js");
|
|
@@ -94,6 +94,10 @@ var stepContext = () => ({
|
|
|
94
94
|
return callRuntimeMethod("stepParameter", name, value, mode);
|
|
95
95
|
}
|
|
96
96
|
});
|
|
97
|
+
var logStep = (name, status, error) => {
|
|
98
|
+
return callRuntimeMethod("logStep", name, status, error);
|
|
99
|
+
};
|
|
100
|
+
exports.logStep = logStep;
|
|
97
101
|
var step = (name, body) => {
|
|
98
102
|
return callRuntimeMethod("step", name, () => body(stepContext()));
|
|
99
103
|
};
|
package/dist/cjs/facade.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facade.js","names":["_model","require","_runtime","_utils","callRuntimeMethod","method","_len","arguments","length","args","Array","_key","runtime","getGlobalTestRuntimeWithAutoconfig","isPromise","then","testRuntime","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","attachmentPath","path","stepContext","mode","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","_len4","tagsList","_key4","map"],"sources":["../../src/facade.ts"],"sourcesContent":["import type { ContentType } from \"./model.js\";\nimport { type AttachmentOptions, type Label, type Link, type ParameterMode, type ParameterOptions } from \"./model.js\";\nimport { LabelName, LinkType } from \"./model.js\";\nimport { getGlobalTestRuntimeWithAutoconfig } from \"./sdk/runtime/runtime.js\";\nimport type { TestRuntime } from \"./sdk/runtime/types.js\";\nimport { isPromise } from \"./sdk/utils.js\";\n\nconst callRuntimeMethod = <\n T extends keyof TestRuntime,\n S extends Parameters<TestRuntime[T]>,\n R extends ReturnType<TestRuntime[T]>,\n>(\n method: T,\n ...args: S\n): R => {\n const runtime = getGlobalTestRuntimeWithAutoconfig();\n\n if (!isPromise(runtime)) {\n // @ts-ignore\n return (runtime as TestRuntime)[method](...args);\n }\n\n return (runtime as Promise<TestRuntime>).then((testRuntime) => {\n // @ts-ignore\n return testRuntime[method](...args);\n }) as R;\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 | 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 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\nexport type StepContext = {\n displayName: (name: string) => void | PromiseLike<void>;\n parameter: (name: string, value: string, mode?: ParameterMode) => void | PromiseLike<void>;\n};\n\nconst stepContext: () => StepContext = () => ({\n displayName: (name: string) => {\n return callRuntimeMethod(\"stepDisplayName\", name);\n },\n parameter: (name, value, mode?) => {\n return callRuntimeMethod(\"stepParameter\", name, value, mode);\n },\n});\n\nexport const step = <T = void>(name: string, body: (context: StepContext) => T | PromiseLike<T>): PromiseLike<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[]) => {\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,CAACE,GAAG,CAAEhE,KAAK,KAAM;IAAED,IAAI,EAAEuC,gBAAS,CAACqB,GAAG;IAAE3D;EAAM,CAAC,CAAC,CAAC,CAAC;AAClG,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"facade.js","names":["_model","require","_runtime","_utils","callRuntimeMethod","method","_len","arguments","length","args","Array","_key","runtime","getGlobalTestRuntimeWithAutoconfig","isPromise","then","testRuntime","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","attachmentPath","path","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","_len4","tagsList","_key4","map"],"sources":["../../src/facade.ts"],"sourcesContent":["import type { Status } from \"./model.js\";\nimport { type ContentType } from \"./model.js\";\nimport { type AttachmentOptions, type Label, type Link, type ParameterMode, type ParameterOptions } from \"./model.js\";\nimport { LabelName, LinkType } from \"./model.js\";\nimport { getGlobalTestRuntimeWithAutoconfig } from \"./sdk/runtime/runtime.js\";\nimport type { TestRuntime } from \"./sdk/runtime/types.js\";\nimport { isPromise } from \"./sdk/utils.js\";\n\nconst callRuntimeMethod = <\n T extends keyof TestRuntime,\n S extends Parameters<TestRuntime[T]>,\n R extends ReturnType<TestRuntime[T]>,\n>(\n method: T,\n ...args: S\n): R => {\n const runtime = getGlobalTestRuntimeWithAutoconfig();\n\n if (!isPromise(runtime)) {\n // @ts-ignore\n return (runtime as TestRuntime)[method](...args);\n }\n\n return (runtime as Promise<TestRuntime>).then((testRuntime) => {\n // @ts-ignore\n return testRuntime[method](...args);\n }) as R;\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 | 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 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\nexport type StepContext = {\n displayName: (name: string) => void | PromiseLike<void>;\n parameter: (name: string, value: string, mode?: ParameterMode) => void | PromiseLike<void>;\n};\n\nconst stepContext: () => StepContext = () => ({\n displayName: (name: string) => {\n return callRuntimeMethod(\"stepDisplayName\", name);\n },\n parameter: (name, value, mode?) => {\n return callRuntimeMethod(\"stepParameter\", name, value, mode);\n },\n});\n\nexport const logStep = (name: string, status?: Status, error?: Error): PromiseLike<void> => {\n return callRuntimeMethod(\"logStep\", name, status, error);\n};\n\nexport const step = <T = void>(name: string, body: (context: StepContext) => T | PromiseLike<T>): PromiseLike<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(\"labels\", ...tagsList.map((value) => ({ name: LabelName.TAG, value })));\n};\n"],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAMG,iBAAiB,GAAG,SAApBA,iBAAiBA,CAKrBC,MAAS,EAEH;EAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EADHC,IAAI,OAAAC,KAAA,CAAAJ,IAAA,OAAAA,IAAA,WAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAAJF,IAAI,CAAAE,IAAA,QAAAJ,SAAA,CAAAI,IAAA;EAAA;EAEP,IAAMC,OAAO,GAAG,IAAAC,2CAAkC,EAAC,CAAC;EAEpD,IAAI,CAAC,IAAAC,gBAAS,EAACF,OAAO,CAAC,EAAE;IACvB;IACA,OAAQA,OAAO,CAAiBP,MAAM,CAAC,CAAC,GAAGI,IAAI,CAAC;EAClD;EAEA,OAAQG,OAAO,CAA0BG,IAAI,CAA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AA,CAAAsD,KAAA,GAAAA,KAAA;AAE7D,IAAME,QAAQ,GAAI1D,IAAY,IAAKD,KAAK,CAAC2C,gBAAS,CAACiB,QAAQ,EAAE3D,IAAI,CAAC;AAACE,OAAA,CAAAwD,QAAA,GAAAA,QAAA;AAEnE,IAAME,KAAK,GAAI5D,IAAY,IAAKD,KAAK,CAAC2C,gBAAS,CAACmB,KAAK,EAAE7D,IAAI,CAAC;AAACE,OAAA,CAAA0D,KAAA,GAAAA,KAAA;AAE7D,IAAME,GAAG,GAAI9D,IAAY,IAAKD,KAAK,CAAC2C,gBAAS,CAACqB,GAAG,EAAE/D,IAAI,CAAC;AAACE,OAAA,CAAA4D,GAAA,GAAAA,GAAA;AAEzD,IAAME,IAAI,GAAA9D,OAAA,CAAA8D,IAAA,GAAG,SAAPA,IAAIA,CAAA,EAA8B;EAAA,SAAAC,KAAA,GAAA5E,SAAA,CAAAC,MAAA,EAAvB4E,QAAQ,OAAA1E,KAAA,CAAAyE,KAAA,GAAAE,KAAA,MAAAA,KAAA,GAAAF,KAAA,EAAAE,KAAA;IAARD,QAAQ,CAAAC,KAAA,IAAA9E,SAAA,CAAA8E,KAAA;EAAA;EAC9B,OAAOjF,iBAAiB,CAAC,QAAQ,EAAE,GAAGgF,QAAQ,CAACE,GAAG,CAAEnE,KAAK,KAAM;IAAED,IAAI,EAAE0C,gBAAS,CAACqB,GAAG;IAAE9D;EAAM,CAAC,CAAC,CAAC,CAAC;AAClG,CAAC","ignoreList":[]}
|
package/dist/cjs/index.js
CHANGED
|
@@ -135,6 +135,12 @@ Object.defineProperty(exports, "links", {
|
|
|
135
135
|
return _facade.links;
|
|
136
136
|
}
|
|
137
137
|
});
|
|
138
|
+
Object.defineProperty(exports, "logStep", {
|
|
139
|
+
enumerable: true,
|
|
140
|
+
get: function get() {
|
|
141
|
+
return _facade.logStep;
|
|
142
|
+
}
|
|
143
|
+
});
|
|
138
144
|
Object.defineProperty(exports, "owner", {
|
|
139
145
|
enumerable: true,
|
|
140
146
|
get: function get() {
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_facade","require","_model"],"sources":["../../src/index.ts"],"sourcesContent":["export {\n allureId,\n attachment,\n attachmentPath,\n description,\n descriptionHtml,\n displayName,\n epic,\n feature,\n historyId,\n issue,\n label,\n labels,\n layer,\n link,\n links,\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 \"./facade.js\";\nexport type { StepContext } from \"./facade.js\";\nexport type {\n Attachment,\n AttachmentOptions,\n FixtureResult,\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, LinkType, LabelName, Severity, Stage, Status, StatusByPriority } from \"./model.js\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_facade","require","_model"],"sources":["../../src/index.ts"],"sourcesContent":["export {\n allureId,\n attachment,\n attachmentPath,\n description,\n descriptionHtml,\n displayName,\n epic,\n feature,\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 \"./facade.js\";\nexport type { StepContext } from \"./facade.js\";\nexport type {\n Attachment,\n AttachmentOptions,\n FixtureResult,\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, LinkType, LabelName, Severity, Stage, Status, StatusByPriority } from \"./model.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AA+CA,IAAAC,MAAA,GAAAD,OAAA","ignoreList":[]}
|
|
@@ -78,6 +78,7 @@ var _handleAttachmentPathMessage = /*#__PURE__*/new WeakMap();
|
|
|
78
78
|
var _findParent = /*#__PURE__*/new WeakMap();
|
|
79
79
|
var _writeFixturesOfScope = /*#__PURE__*/new WeakMap();
|
|
80
80
|
var _writeContainer = /*#__PURE__*/new WeakMap();
|
|
81
|
+
var _calculateTimings = /*#__PURE__*/new WeakMap();
|
|
81
82
|
class ReporterRuntime {
|
|
82
83
|
constructor(_ref) {
|
|
83
84
|
var _this = this;
|
|
@@ -142,14 +143,16 @@ class ReporterRuntime {
|
|
|
142
143
|
}
|
|
143
144
|
updateFunc(fixture);
|
|
144
145
|
});
|
|
145
|
-
_defineProperty(this, "stopFixture", (uuid,
|
|
146
|
+
_defineProperty(this, "stopFixture", (uuid, opts) => {
|
|
146
147
|
var fixture = this.state.getFixtureResult(uuid);
|
|
147
148
|
if (!fixture) {
|
|
148
149
|
// eslint-disable-next-line no-console
|
|
149
150
|
console.error("could not stop fixture: no fixture with uuid ".concat(uuid, " is found"));
|
|
150
151
|
return;
|
|
151
152
|
}
|
|
152
|
-
fixture.
|
|
153
|
+
var startStop = _classPrivateFieldGet(_calculateTimings, this).call(this, fixture.start, opts === null || opts === void 0 ? void 0 : opts.stop, opts === null || opts === void 0 ? void 0 : opts.duration);
|
|
154
|
+
fixture.start = startStop.start;
|
|
155
|
+
fixture.stop = startStop.stop;
|
|
153
156
|
fixture.stage = _model.Stage.FINISHED;
|
|
154
157
|
});
|
|
155
158
|
_defineProperty(this, "startTest", function (result) {
|
|
@@ -183,7 +186,7 @@ class ReporterRuntime {
|
|
|
183
186
|
updateFunc(testResult);
|
|
184
187
|
this.notifier.afterTestResultUpdate(testResult);
|
|
185
188
|
});
|
|
186
|
-
_defineProperty(this, "stopTest", (uuid,
|
|
189
|
+
_defineProperty(this, "stopTest", (uuid, opts) => {
|
|
187
190
|
var _testResult$testCaseI, _testResult$historyId;
|
|
188
191
|
var testResult = this.state.getTestResult(uuid);
|
|
189
192
|
if (!testResult) {
|
|
@@ -194,7 +197,9 @@ class ReporterRuntime {
|
|
|
194
197
|
this.notifier.beforeTestResultStop(testResult);
|
|
195
198
|
(_testResult$testCaseI = testResult.testCaseId) !== null && _testResult$testCaseI !== void 0 ? _testResult$testCaseI : testResult.testCaseId = (0, _utils.getTestResultTestCaseId)(testResult);
|
|
196
199
|
(_testResult$historyId = testResult.historyId) !== null && _testResult$historyId !== void 0 ? _testResult$historyId : testResult.historyId = (0, _utils.getTestResultHistoryId)(testResult);
|
|
197
|
-
testResult.
|
|
200
|
+
var startStop = _classPrivateFieldGet(_calculateTimings, this).call(this, testResult.start, opts === null || opts === void 0 ? void 0 : opts.stop, opts === null || opts === void 0 ? void 0 : opts.duration);
|
|
201
|
+
testResult.start = startStop.start;
|
|
202
|
+
testResult.stop = startStop.stop;
|
|
198
203
|
this.notifier.afterTestResultStop(testResult);
|
|
199
204
|
});
|
|
200
205
|
_defineProperty(this, "writeTest", uuid => {
|
|
@@ -241,7 +246,7 @@ class ReporterRuntime {
|
|
|
241
246
|
}
|
|
242
247
|
updateFunc(step);
|
|
243
248
|
});
|
|
244
|
-
_defineProperty(this, "stopStep", (uuid,
|
|
249
|
+
_defineProperty(this, "stopStep", (uuid, opts) => {
|
|
245
250
|
var step = this.state.getStepResult(uuid);
|
|
246
251
|
if (!step) {
|
|
247
252
|
// eslint-disable-next-line no-console
|
|
@@ -249,7 +254,9 @@ class ReporterRuntime {
|
|
|
249
254
|
return;
|
|
250
255
|
}
|
|
251
256
|
this.notifier.beforeStepStop(step);
|
|
252
|
-
step.
|
|
257
|
+
var startStop = _classPrivateFieldGet(_calculateTimings, this).call(this, step.start, opts === null || opts === void 0 ? void 0 : opts.stop, opts === null || opts === void 0 ? void 0 : opts.duration);
|
|
258
|
+
step.start = startStop.start;
|
|
259
|
+
step.stop = startStop.stop;
|
|
253
260
|
step.stage = _model.Stage.FINISHED;
|
|
254
261
|
this.stepStack.removeStep(uuid);
|
|
255
262
|
this.notifier.afterStepStop(step);
|
|
@@ -413,7 +420,9 @@ class ReporterRuntime {
|
|
|
413
420
|
result.statusDetails = _objectSpread(_objectSpread({}, result.statusDetails), message.statusDetails);
|
|
414
421
|
}
|
|
415
422
|
});
|
|
416
|
-
this.stopStep(stepUuid,
|
|
423
|
+
this.stopStep(stepUuid, {
|
|
424
|
+
stop: message.stop
|
|
425
|
+
});
|
|
417
426
|
});
|
|
418
427
|
_classPrivateFieldInitSpec(this, _handleAttachmentContentMessage, (rootUuid, message) => {
|
|
419
428
|
this.writeAttachment(rootUuid, undefined, message.name, Buffer.from(message.content, message.encoding), {
|
|
@@ -474,6 +483,31 @@ class ReporterRuntime {
|
|
|
474
483
|
afters
|
|
475
484
|
});
|
|
476
485
|
});
|
|
486
|
+
_classPrivateFieldInitSpec(this, _calculateTimings, (start, stop, duration) => {
|
|
487
|
+
var result = {
|
|
488
|
+
start,
|
|
489
|
+
stop
|
|
490
|
+
};
|
|
491
|
+
if (duration) {
|
|
492
|
+
var normalisedDuration = Math.max(0, duration);
|
|
493
|
+
if (result.stop !== undefined) {
|
|
494
|
+
result.start = result.stop - normalisedDuration;
|
|
495
|
+
} else if (result.start !== undefined) {
|
|
496
|
+
result.stop = result.start + normalisedDuration;
|
|
497
|
+
} else {
|
|
498
|
+
result.stop = Date.now();
|
|
499
|
+
result.start = result.stop - normalisedDuration;
|
|
500
|
+
}
|
|
501
|
+
} else {
|
|
502
|
+
if (result.stop === undefined) {
|
|
503
|
+
result.stop = Date.now();
|
|
504
|
+
}
|
|
505
|
+
if (result.start === undefined) {
|
|
506
|
+
result.start = result.stop;
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
return result;
|
|
510
|
+
});
|
|
477
511
|
this.writer = (0, _loader.resolveWriter)(writer);
|
|
478
512
|
this.notifier = new _Notifier.Notifier({
|
|
479
513
|
listeners
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReporterRuntime.js","names":["_path","require","_model","_LifecycleState","_Notifier","_factory","_utils","_attachments","_loader","_excluded","_objectWithoutProperties","e","t","o","r","i","_objectWithoutPropertiesLoose","Object","getOwnPropertySymbols","n","length","indexOf","propertyIsEnumerable","call","hasOwnProperty","ownKeys","keys","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","set","has","TypeError","_classPrivateFieldGet","s","get","_assertClassBrand","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","String","Number","DefaultStepStack","constructor","Map","stepsByRoot","clear","rootsByStep","rootUuid","maybeValue","delete","stepUuid","removeStep","newValue","_handleMetadataMessage","WeakMap","_handleStepMetadataMessage","_handleStartStepMessage","_handleStopStepMessage","_handleAttachmentContentMessage","_handleAttachmentPathMessage","_findParent","_writeFixturesOfScope","_writeContainer","ReporterRuntime","_ref","_this","writer","listeners","environmentInfo","categories","links","LifecycleState","uuid","randomUuid","state","setScope","updateFunc","scope","getScope","console","error","concat","deleteScope","scopeUuid","type","fixtureResult","wrappedFixture","setFixtureResult","createFixtureResult","start","Date","now","fixtures","fixture","getFixtureResult","stop","stage","Stage","FINISHED","result","scopeUuids","undefined","testResult","createTestResult","deepClone","notifier","beforeTestResultStart","tests","setTestResult","afterTestResultStart","getTestResult","beforeTestResultUpdate","afterTestResultUpdate","_testResult$testCaseI","_testResult$historyId","beforeTestResultStop","testCaseId","getTestResultTestCaseId","historyId","getTestResultHistoryId","afterTestResultStop","testResults","labels","find","label","name","deleteTestResult","beforeTestResultWrite","writeResult","afterTestResultWrite","stepStack","currentStep","parentStepUuid","parent","JSON","stringify","stepResult","createStepResult","steps","setStepResult","addStep","step","getStepResult","beforeStepStop","afterStepStop","attachmentName","attachmentContentOrPath","options","_options$fileExtensio","isPath","fileExtension","extname","attachmentFileName","buildAttachmentFileName","contentType","writeAttachmentFromPath","writeAttachment","attachment","source","wrapInStep","timestamp","attachments","writeEnvironmentInfo","serializedCategories","map","c","messageRegex","RegExp","traceRegex","writeCategoriesDefinitions","messages","message","data","updateFixture","displayName","parameters","rest","updateTest","linkConfig","formatLinks","assign","updateStep","startStep","status","statusDetails","stopStep","Buffer","from","content","encoding","path","root","getExecutionItem","_ref2","writtenFixtures","Set","deleteFixtureResult","add","befores","afters","writeGroup","children","resolveWriter","Notifier","exports"],"sources":["../../../../src/sdk/reporter/ReporterRuntime.ts"],"sourcesContent":["/* eslint max-lines: 0 */\nimport { extname } from \"path\";\nimport {\n type Attachment,\n type AttachmentOptions,\n type FixtureResult,\n Stage,\n type StepResult,\n type TestResult,\n} from \"../../model.js\";\nimport type {\n Category,\n EnvironmentInfo,\n RuntimeAttachmentContentMessage,\n RuntimeAttachmentPathMessage,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n} from \"../types.js\";\nimport { LifecycleState } from \"./LifecycleState.js\";\nimport { Notifier } from \"./Notifier.js\";\nimport { createFixtureResult, createStepResult, createTestResult } from \"./factory.js\";\nimport type { Config, FixtureType, FixtureWrapper, LinkConfig, TestScope, Writer } from \"./types.js\";\nimport { deepClone, formatLinks, getTestResultHistoryId, getTestResultTestCaseId, randomUuid } from \"./utils.js\";\nimport { buildAttachmentFileName } from \"./utils/attachments.js\";\nimport { resolveWriter } from \"./writer/loader.js\";\n\ninterface StepStack {\n clear(): void;\n removeRoot(rootUuid: string): void;\n currentStep(rootUuid: string): string | undefined;\n addStep(rootUuid: string, stepUuid: string): void;\n removeStep(stepUuid: string): void;\n}\n\nclass DefaultStepStack implements StepStack {\n private stepsByRoot: Map<string, string[]> = new Map();\n private rootsByStep: Map<string, string> = new Map();\n\n clear = (): void => {\n this.stepsByRoot.clear();\n this.rootsByStep.clear();\n };\n\n removeRoot = (rootUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n this.stepsByRoot.delete(rootUuid);\n if (maybeValue) {\n maybeValue.forEach((stepUuid) => this.rootsByStep.delete(stepUuid));\n }\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n return maybeValue[maybeValue.length - 1];\n };\n\n addStep = (rootUuid: string, stepUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n this.stepsByRoot.set(rootUuid, [stepUuid]);\n } else {\n maybeValue.push(stepUuid);\n }\n this.rootsByStep.set(stepUuid, rootUuid);\n };\n\n removeStep(stepUuid: string) {\n const rootUuid = this.rootsByStep.get(stepUuid);\n if (!rootUuid) {\n return;\n }\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n const newValue = maybeValue.filter((value) => value !== stepUuid);\n this.stepsByRoot.set(rootUuid, newValue);\n }\n}\n\nexport class ReporterRuntime {\n private readonly state = new LifecycleState();\n private notifier: Notifier;\n private stepStack: StepStack = new DefaultStepStack();\n writer: Writer;\n categories?: Category[];\n environmentInfo?: EnvironmentInfo;\n linkConfig?: LinkConfig;\n\n constructor({ writer, listeners = [], environmentInfo, categories, links }: Config) {\n this.writer = resolveWriter(writer);\n this.notifier = new Notifier({ listeners });\n this.categories = categories;\n this.environmentInfo = environmentInfo;\n this.linkConfig = links;\n }\n\n startScope = (): string => {\n const uuid = randomUuid();\n this.state.setScope(uuid);\n return uuid;\n };\n\n updateScope = (uuid: string, updateFunc: (scope: TestScope) => void): void => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not update scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(scope);\n };\n\n writeScope = (uuid: string) => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not write scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n this.#writeFixturesOfScope(scope);\n this.state.deleteScope(scope.uuid);\n };\n\n startFixture = (scopeUuid: string, type: FixtureType, fixtureResult: Partial<FixtureResult>): string | undefined => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not start fixture: no scope with uuid ${scopeUuid} is found`);\n return;\n }\n\n const uuid = randomUuid();\n const wrappedFixture = this.state.setFixtureResult(uuid, type, {\n ...createFixtureResult(),\n start: Date.now(),\n ...fixtureResult,\n });\n\n scope.fixtures.push(wrappedFixture);\n return uuid;\n };\n\n updateFixture = (uuid: string, updateFunc: (result: FixtureResult) => void): void => {\n const fixture = this.state.getFixtureResult(uuid);\n\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not update fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(fixture);\n };\n\n stopFixture = (uuid: string, stop?: number): void => {\n const fixture = this.state.getFixtureResult(uuid);\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not stop fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n fixture.stop = stop ?? Date.now();\n fixture.stage = Stage.FINISHED;\n };\n\n startTest = (result: Partial<TestResult>, scopeUuids: string[] = []): string => {\n const uuid = randomUuid();\n const testResult: TestResult = {\n ...createTestResult(uuid),\n start: Date.now(),\n ...deepClone(result),\n };\n\n this.notifier.beforeTestResultStart(testResult);\n\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not link test to the scope: no scope with uuid ${uuid} is found`);\n return;\n }\n scope.tests.push(uuid);\n });\n\n this.state.setTestResult(uuid, testResult);\n this.notifier.afterTestResultStart(testResult);\n return uuid;\n };\n\n updateTest = (uuid: string, updateFunc: (result: TestResult) => void): void => {\n const testResult = this.state.getTestResult(uuid);\n\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not update test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n this.notifier.beforeTestResultUpdate(testResult);\n updateFunc(testResult);\n this.notifier.afterTestResultUpdate(testResult);\n };\n\n stopTest = (uuid: string, stop?: number) => {\n const testResult = this.state.getTestResult(uuid);\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n this.notifier.beforeTestResultStop(testResult);\n testResult.testCaseId ??= getTestResultTestCaseId(testResult);\n testResult.historyId ??= getTestResultHistoryId(testResult);\n testResult.stop = stop ?? Date.now();\n\n this.notifier.afterTestResultStop(testResult);\n };\n\n writeTest = (uuid: string) => {\n const testResult = this.state.testResults.get(uuid);\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not write test result: no test with uuid ${uuid} is found`);\n return;\n }\n\n if (testResult.labels.find((label) => label.name === \"ALLURE_TESTPLAN_SKIP\")) {\n this.state.deleteTestResult(uuid);\n return;\n }\n\n this.notifier.beforeTestResultWrite(testResult);\n\n this.writer.writeResult(testResult);\n this.state.deleteTestResult(uuid);\n\n this.notifier.afterTestResultWrite(testResult);\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n return this.stepStack.currentStep(rootUuid);\n };\n\n startStep = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n result: Partial<StepResult>,\n ): string | undefined => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not start test step: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n const stepResult: StepResult = {\n ...createStepResult(),\n start: Date.now(),\n ...result,\n };\n parent.steps.push(stepResult);\n const stepUuid = randomUuid();\n this.state.setStepResult(stepUuid, stepResult);\n\n this.stepStack.addStep(rootUuid, stepUuid);\n\n return stepUuid;\n };\n\n updateStep = (uuid: string, updateFunc: (stepResult: StepResult) => void) => {\n const step = this.state.getStepResult(uuid)!;\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not update test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(step);\n };\n\n stopStep = (uuid: string, stop?: number) => {\n const step = this.state.getStepResult(uuid);\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n this.notifier.beforeStepStop(step);\n\n step.stop = stop ?? Date.now();\n step.stage = Stage.FINISHED;\n\n this.stepStack.removeStep(uuid);\n\n this.notifier.afterStepStop(step);\n };\n\n writeAttachment = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n attachmentName: string,\n attachmentContentOrPath: Buffer | string,\n options: AttachmentOptions & { wrapInStep?: boolean; timestamp?: number },\n ) => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not write test attachment: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n\n const isPath = typeof attachmentContentOrPath === \"string\";\n const fileExtension = options.fileExtension ?? (isPath ? extname(attachmentContentOrPath) : undefined);\n const attachmentFileName = buildAttachmentFileName({\n contentType: options.contentType,\n fileExtension,\n });\n\n if (isPath) {\n this.writer.writeAttachmentFromPath(attachmentFileName, attachmentContentOrPath);\n } else {\n this.writer.writeAttachment(attachmentFileName, attachmentContentOrPath);\n }\n\n const attachment: Attachment = {\n name: attachmentName,\n source: attachmentFileName,\n type: options.contentType,\n };\n\n if (options.wrapInStep) {\n const { timestamp = Date.now() } = options;\n parent.steps.push({\n name: attachmentName,\n attachments: [attachment],\n start: timestamp,\n stop: timestamp,\n } as StepResult);\n } else {\n parent.attachments.push(attachment);\n }\n };\n\n writeEnvironmentInfo = () => {\n if (!this.environmentInfo) {\n return;\n }\n\n this.writer.writeEnvironmentInfo(this.environmentInfo);\n };\n\n writeCategoriesDefinitions = () => {\n if (!this.categories) {\n return;\n }\n\n const serializedCategories = this.categories.map((c) => {\n if (c.messageRegex instanceof RegExp) {\n c.messageRegex = c.messageRegex.source;\n }\n\n if (c.traceRegex instanceof RegExp) {\n c.traceRegex = c.traceRegex.source;\n }\n\n return c;\n });\n\n this.writer.writeCategoriesDefinitions(serializedCategories);\n };\n\n applyRuntimeMessages = (rootUuid: string, messages: RuntimeMessage[]) => {\n messages.forEach((message) => {\n switch (message.type) {\n case \"metadata\":\n this.#handleMetadataMessage(rootUuid, message.data);\n return;\n case \"step_metadata\":\n this.#handleStepMetadataMessage(rootUuid, message.data);\n return;\n case \"step_start\":\n this.#handleStartStepMessage(rootUuid, message.data);\n return;\n case \"step_stop\":\n this.#handleStopStepMessage(rootUuid, message.data);\n return;\n case \"attachment_content\":\n this.#handleAttachmentContentMessage(rootUuid, message.data);\n return;\n case \"attachment_path\":\n this.#handleAttachmentPathMessage(rootUuid, message.data);\n return;\n default:\n // eslint-disable-next-line no-console\n console.error(`could not apply runtime messages: unknown message ${JSON.stringify(message)}`);\n return;\n }\n });\n };\n\n #handleMetadataMessage = (rootUuid: string, message: RuntimeMetadataMessage[\"data\"]) => {\n // only display name could be set to fixture.\n const fixtureResult = this.state.getFixtureResult(rootUuid);\n if (fixtureResult) {\n this.updateFixture(rootUuid, (result) => {\n if (message.displayName) {\n result.name = message.displayName;\n }\n });\n return;\n }\n\n const { links, labels, parameters, displayName, ...rest } = message;\n this.updateTest(rootUuid, (result) => {\n if (links) {\n result.links = [...result.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n result.labels = [...result.labels, ...labels];\n }\n if (parameters) {\n result.parameters = [...result.parameters, ...parameters];\n }\n if (displayName) {\n result.name = displayName;\n }\n Object.assign(result, rest);\n });\n };\n\n #handleStepMetadataMessage = (rootUuid: string, message: RuntimeStepMetadataMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step metadata message: no step is running\");\n return;\n }\n const { name, parameters } = message;\n this.updateStep(stepUuid, (stepResult) => {\n if (name) {\n stepResult.name = name;\n }\n if (parameters) {\n stepResult.parameters = [...stepResult.parameters, ...parameters];\n }\n });\n };\n\n #handleStartStepMessage = (rootUuid: string, message: RuntimeStartStepMessage[\"data\"]) => {\n this.startStep(rootUuid, undefined, { ...message });\n };\n\n #handleStopStepMessage = (rootUuid: string, message: RuntimeStopStepMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step stop message: no step is running\");\n return;\n }\n this.updateStep(stepUuid, (result) => {\n if (message.status && !result.status) {\n result.status = message.status;\n }\n if (message.statusDetails) {\n result.statusDetails = { ...result.statusDetails, ...message.statusDetails };\n }\n });\n this.stopStep(stepUuid, message.stop);\n };\n\n #handleAttachmentContentMessage = (rootUuid: string, message: RuntimeAttachmentContentMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, Buffer.from(message.content, message.encoding), {\n encoding: message.encoding,\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #handleAttachmentPathMessage = (rootUuid: string, message: RuntimeAttachmentPathMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, message.path, {\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #findParent = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n ): FixtureResult | TestResult | StepResult | undefined => {\n const root = this.state.getExecutionItem(rootUuid);\n if (!root) {\n return;\n }\n\n if (parentStepUuid === null) {\n return root;\n } else if (parentStepUuid === undefined) {\n const stepUuid = this.currentStep(rootUuid);\n return stepUuid ? this.state.getStepResult(stepUuid) : root;\n } else {\n return this.state.getStepResult(parentStepUuid);\n }\n };\n\n #writeFixturesOfScope = ({ fixtures, tests }: TestScope) => {\n const writtenFixtures = new Set<string>();\n if (tests.length) {\n for (const wrappedFixture of fixtures) {\n if (!writtenFixtures.has(wrappedFixture.uuid)) {\n this.#writeContainer(tests, wrappedFixture);\n this.state.deleteFixtureResult(wrappedFixture.uuid);\n writtenFixtures.add(wrappedFixture.uuid);\n }\n }\n }\n };\n\n #writeContainer = (tests: string[], wrappedFixture: FixtureWrapper) => {\n const fixture = wrappedFixture.value;\n const befores = wrappedFixture.type === \"before\" ? [wrappedFixture.value] : [];\n const afters = wrappedFixture.type === \"after\" ? [wrappedFixture.value] : [];\n this.writer.writeGroup({\n uuid: wrappedFixture.uuid,\n name: fixture.name,\n children: [...new Set(tests)],\n befores,\n afters,\n });\n };\n}\n"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAmBA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAEA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAAmD,IAAAQ,SAAA;AAAA,SAAAC,yBAAAC,CAAA,EAAAC,CAAA,gBAAAD,CAAA,iBAAAE,CAAA,EAAAC,CAAA,EAAAC,CAAA,GAAAC,6BAAA,CAAAL,CAAA,EAAAC,CAAA,OAAAK,MAAA,CAAAC,qBAAA,QAAAC,CAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAP,CAAA,QAAAG,CAAA,MAAAA,CAAA,GAAAK,CAAA,CAAAC,MAAA,EAAAN,CAAA,IAAAD,CAAA,GAAAM,CAAA,CAAAL,CAAA,GAAAF,CAAA,CAAAS,OAAA,CAAAR,CAAA,aAAAS,oBAAA,CAAAC,IAAA,CAAAZ,CAAA,E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AAAxD,IAAA,CAApB,IAAI,EAAiBqG,KAAK,EAAErB,cAAc;YAC1C,IAAI,CAACZ,KAAK,CAAC0H,mBAAmB,CAAC9G,cAAc,CAACd,IAAI,CAAC;YACnD0H,eAAe,CAACG,GAAG,CAAC/G,cAAc,CAACd,IAAI,CAAC;UAC1C;QACF;MACF;IACF,CAAC;IAEDlD,0BAAA,OAAAwC,eAAe,EAAG,CAAC6C,KAAe,EAAErB,cAA8B,KAAK;MACrE,IAAMO,OAAO,GAAGP,cAAc,CAACrD,KAAK;MACpC,IAAMqK,OAAO,GAAGhH,cAAc,CAACF,IAAI,KAAK,QAAQ,GAAG,CAACE,cAAc,CAACrD,KAAK,CAAC,GAAG,EAAE;MAC9E,IAAMsK,MAAM,GAAGjH,cAAc,CAACF,IAAI,KAAK,OAAO,GAAG,CAACE,cAAc,CAACrD,KAAK,CAAC,GAAG,EAAE;MAC5E,IAAI,CAACiC,MAAM,CAACsI,UAAU,CAAC;QACrBhI,IAAI,EAAEc,cAAc,CAACd,IAAI;QACzBqD,IAAI,EAAEhC,OAAO,CAACgC,IAAI;QAClB4E,QAAQ,EAAE,CAAC,GAAG,IAAIN,GAAG,CAACxF,KAAK,CAAC,CAAC;QAC7B2F,OAAO;QACPC;MACF,CAAC,CAAC;IACJ,CAAC;IApcC,IAAI,CAACrI,MAAM,GAAG,IAAAwI,qBAAa,EAACxI,MAAM,CAAC;IACnC,IAAI,CAACuC,QAAQ,GAAG,IAAIkG,kBAAQ,CAAC;MAAExI;IAAU,CAAC,CAAC;IAC3C,IAAI,CAACE,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACD,eAAe,GAAGA,eAAe;IACtC,IAAI,CAAC8G,UAAU,GAAG5G,MAAK;EACzB;AAgcF;AAACsI,OAAA,CAAA7I,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ReporterRuntime.js","names":["_path","require","_model","_LifecycleState","_Notifier","_factory","_utils","_attachments","_loader","_excluded","_objectWithoutProperties","e","t","o","r","i","_objectWithoutPropertiesLoose","Object","getOwnPropertySymbols","n","length","indexOf","propertyIsEnumerable","call","hasOwnProperty","ownKeys","keys","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","set","has","TypeError","_classPrivateFieldGet","s","get","_assertClassBrand","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","String","Number","DefaultStepStack","constructor","Map","stepsByRoot","clear","rootsByStep","rootUuid","maybeValue","delete","stepUuid","removeStep","newValue","_handleMetadataMessage","WeakMap","_handleStepMetadataMessage","_handleStartStepMessage","_handleStopStepMessage","_handleAttachmentContentMessage","_handleAttachmentPathMessage","_findParent","_writeFixturesOfScope","_writeContainer","_calculateTimings","ReporterRuntime","_ref","_this","writer","listeners","environmentInfo","categories","links","LifecycleState","uuid","randomUuid","state","setScope","updateFunc","scope","getScope","console","error","concat","deleteScope","scopeUuid","type","fixtureResult","wrappedFixture","setFixtureResult","createFixtureResult","start","Date","now","fixtures","fixture","getFixtureResult","opts","startStop","stop","duration","stage","Stage","FINISHED","result","scopeUuids","undefined","testResult","createTestResult","deepClone","notifier","beforeTestResultStart","tests","setTestResult","afterTestResultStart","getTestResult","beforeTestResultUpdate","afterTestResultUpdate","_testResult$testCaseI","_testResult$historyId","beforeTestResultStop","testCaseId","getTestResultTestCaseId","historyId","getTestResultHistoryId","afterTestResultStop","testResults","labels","find","label","name","deleteTestResult","beforeTestResultWrite","writeResult","afterTestResultWrite","stepStack","currentStep","parentStepUuid","parent","JSON","stringify","stepResult","createStepResult","steps","setStepResult","addStep","step","getStepResult","beforeStepStop","afterStepStop","attachmentName","attachmentContentOrPath","options","_options$fileExtensio","isPath","fileExtension","extname","attachmentFileName","buildAttachmentFileName","contentType","writeAttachmentFromPath","writeAttachment","attachment","source","wrapInStep","timestamp","attachments","writeEnvironmentInfo","serializedCategories","map","c","messageRegex","RegExp","traceRegex","writeCategoriesDefinitions","messages","message","data","updateFixture","displayName","parameters","rest","updateTest","linkConfig","formatLinks","assign","updateStep","startStep","status","statusDetails","stopStep","Buffer","from","content","encoding","path","root","getExecutionItem","_ref2","writtenFixtures","Set","deleteFixtureResult","add","befores","afters","writeGroup","children","normalisedDuration","Math","max","resolveWriter","Notifier","exports"],"sources":["../../../../src/sdk/reporter/ReporterRuntime.ts"],"sourcesContent":["/* eslint max-lines: 0 */\nimport { extname } from \"path\";\nimport {\n type Attachment,\n type AttachmentOptions,\n type FixtureResult,\n Stage,\n type StepResult,\n type TestResult,\n} from \"../../model.js\";\nimport type {\n Category,\n EnvironmentInfo,\n RuntimeAttachmentContentMessage,\n RuntimeAttachmentPathMessage,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n} from \"../types.js\";\nimport { LifecycleState } from \"./LifecycleState.js\";\nimport { Notifier } from \"./Notifier.js\";\nimport { createFixtureResult, createStepResult, createTestResult } from \"./factory.js\";\nimport type { Config, FixtureType, FixtureWrapper, LinkConfig, TestScope, Writer } from \"./types.js\";\nimport { deepClone, formatLinks, getTestResultHistoryId, getTestResultTestCaseId, randomUuid } from \"./utils.js\";\nimport { buildAttachmentFileName } from \"./utils/attachments.js\";\nimport { resolveWriter } from \"./writer/loader.js\";\n\ninterface StepStack {\n clear(): void;\n\n removeRoot(rootUuid: string): void;\n\n currentStep(rootUuid: string): string | undefined;\n\n addStep(rootUuid: string, stepUuid: string): void;\n\n removeStep(stepUuid: string): void;\n}\n\nclass DefaultStepStack implements StepStack {\n private stepsByRoot: Map<string, string[]> = new Map();\n private rootsByStep: Map<string, string> = new Map();\n\n clear = (): void => {\n this.stepsByRoot.clear();\n this.rootsByStep.clear();\n };\n\n removeRoot = (rootUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n this.stepsByRoot.delete(rootUuid);\n if (maybeValue) {\n maybeValue.forEach((stepUuid) => this.rootsByStep.delete(stepUuid));\n }\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n return maybeValue[maybeValue.length - 1];\n };\n\n addStep = (rootUuid: string, stepUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n this.stepsByRoot.set(rootUuid, [stepUuid]);\n } else {\n maybeValue.push(stepUuid);\n }\n this.rootsByStep.set(stepUuid, rootUuid);\n };\n\n removeStep(stepUuid: string) {\n const rootUuid = this.rootsByStep.get(stepUuid);\n if (!rootUuid) {\n return;\n }\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n const newValue = maybeValue.filter((value) => value !== stepUuid);\n this.stepsByRoot.set(rootUuid, newValue);\n }\n}\n\nexport class ReporterRuntime {\n private readonly state = new LifecycleState();\n private notifier: Notifier;\n private stepStack: StepStack = new DefaultStepStack();\n writer: Writer;\n categories?: Category[];\n environmentInfo?: EnvironmentInfo;\n linkConfig?: LinkConfig;\n\n constructor({ writer, listeners = [], environmentInfo, categories, links }: Config) {\n this.writer = resolveWriter(writer);\n this.notifier = new Notifier({ listeners });\n this.categories = categories;\n this.environmentInfo = environmentInfo;\n this.linkConfig = links;\n }\n\n startScope = (): string => {\n const uuid = randomUuid();\n this.state.setScope(uuid);\n return uuid;\n };\n\n updateScope = (uuid: string, updateFunc: (scope: TestScope) => void): void => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not update scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(scope);\n };\n\n writeScope = (uuid: string) => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not write scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n this.#writeFixturesOfScope(scope);\n this.state.deleteScope(scope.uuid);\n };\n\n startFixture = (scopeUuid: string, type: FixtureType, fixtureResult: Partial<FixtureResult>): string | undefined => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not start fixture: no scope with uuid ${scopeUuid} is found`);\n return;\n }\n\n const uuid = randomUuid();\n const wrappedFixture = this.state.setFixtureResult(uuid, type, {\n ...createFixtureResult(),\n start: Date.now(),\n ...fixtureResult,\n });\n\n scope.fixtures.push(wrappedFixture);\n return uuid;\n };\n\n updateFixture = (uuid: string, updateFunc: (result: FixtureResult) => void): void => {\n const fixture = this.state.getFixtureResult(uuid);\n\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not update fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(fixture);\n };\n\n stopFixture = (uuid: string, opts?: { stop?: number; duration?: number }): void => {\n const fixture = this.state.getFixtureResult(uuid);\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not stop fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n const startStop = this.#calculateTimings(fixture.start, opts?.stop, opts?.duration);\n fixture.start = startStop.start;\n fixture.stop = startStop.stop;\n\n fixture.stage = Stage.FINISHED;\n };\n\n startTest = (result: Partial<TestResult>, scopeUuids: string[] = []): string => {\n const uuid = randomUuid();\n const testResult: TestResult = {\n ...createTestResult(uuid),\n start: Date.now(),\n ...deepClone(result),\n };\n\n this.notifier.beforeTestResultStart(testResult);\n\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not link test to the scope: no scope with uuid ${uuid} is found`);\n return;\n }\n scope.tests.push(uuid);\n });\n\n this.state.setTestResult(uuid, testResult);\n this.notifier.afterTestResultStart(testResult);\n return uuid;\n };\n\n updateTest = (uuid: string, updateFunc: (result: TestResult) => void): void => {\n const testResult = this.state.getTestResult(uuid);\n\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not update test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n this.notifier.beforeTestResultUpdate(testResult);\n updateFunc(testResult);\n this.notifier.afterTestResultUpdate(testResult);\n };\n\n stopTest = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const testResult = this.state.getTestResult(uuid);\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n this.notifier.beforeTestResultStop(testResult);\n testResult.testCaseId ??= getTestResultTestCaseId(testResult);\n testResult.historyId ??= getTestResultHistoryId(testResult);\n\n const startStop = this.#calculateTimings(testResult.start, opts?.stop, opts?.duration);\n testResult.start = startStop.start;\n testResult.stop = startStop.stop;\n\n this.notifier.afterTestResultStop(testResult);\n };\n\n writeTest = (uuid: string) => {\n const testResult = this.state.testResults.get(uuid);\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not write test result: no test with uuid ${uuid} is found`);\n return;\n }\n\n if (testResult.labels.find((label) => label.name === \"ALLURE_TESTPLAN_SKIP\")) {\n this.state.deleteTestResult(uuid);\n return;\n }\n\n this.notifier.beforeTestResultWrite(testResult);\n\n this.writer.writeResult(testResult);\n this.state.deleteTestResult(uuid);\n\n this.notifier.afterTestResultWrite(testResult);\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n return this.stepStack.currentStep(rootUuid);\n };\n\n startStep = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n result: Partial<StepResult>,\n ): string | undefined => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not start test step: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n const stepResult: StepResult = {\n ...createStepResult(),\n start: Date.now(),\n ...result,\n };\n parent.steps.push(stepResult);\n const stepUuid = randomUuid();\n this.state.setStepResult(stepUuid, stepResult);\n\n this.stepStack.addStep(rootUuid, stepUuid);\n\n return stepUuid;\n };\n\n updateStep = (uuid: string, updateFunc: (stepResult: StepResult) => void) => {\n const step = this.state.getStepResult(uuid)!;\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not update test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(step);\n };\n\n stopStep = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const step = this.state.getStepResult(uuid);\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n this.notifier.beforeStepStop(step);\n\n const startStop = this.#calculateTimings(step.start, opts?.stop, opts?.duration);\n step.start = startStop.start;\n step.stop = startStop.stop;\n\n step.stage = Stage.FINISHED;\n\n this.stepStack.removeStep(uuid);\n\n this.notifier.afterStepStop(step);\n };\n\n writeAttachment = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n attachmentName: string,\n attachmentContentOrPath: Buffer | string,\n options: AttachmentOptions & { wrapInStep?: boolean; timestamp?: number },\n ) => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not write test attachment: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n\n const isPath = typeof attachmentContentOrPath === \"string\";\n const fileExtension = options.fileExtension ?? (isPath ? extname(attachmentContentOrPath) : undefined);\n const attachmentFileName = buildAttachmentFileName({\n contentType: options.contentType,\n fileExtension,\n });\n\n if (isPath) {\n this.writer.writeAttachmentFromPath(attachmentFileName, attachmentContentOrPath);\n } else {\n this.writer.writeAttachment(attachmentFileName, attachmentContentOrPath);\n }\n\n const attachment: Attachment = {\n name: attachmentName,\n source: attachmentFileName,\n type: options.contentType,\n };\n\n if (options.wrapInStep) {\n const { timestamp = Date.now() } = options;\n parent.steps.push({\n name: attachmentName,\n attachments: [attachment],\n start: timestamp,\n stop: timestamp,\n } as StepResult);\n } else {\n parent.attachments.push(attachment);\n }\n };\n\n writeEnvironmentInfo = () => {\n if (!this.environmentInfo) {\n return;\n }\n\n this.writer.writeEnvironmentInfo(this.environmentInfo);\n };\n\n writeCategoriesDefinitions = () => {\n if (!this.categories) {\n return;\n }\n\n const serializedCategories = this.categories.map((c) => {\n if (c.messageRegex instanceof RegExp) {\n c.messageRegex = c.messageRegex.source;\n }\n\n if (c.traceRegex instanceof RegExp) {\n c.traceRegex = c.traceRegex.source;\n }\n\n return c;\n });\n\n this.writer.writeCategoriesDefinitions(serializedCategories);\n };\n\n applyRuntimeMessages = (rootUuid: string, messages: RuntimeMessage[]) => {\n messages.forEach((message) => {\n switch (message.type) {\n case \"metadata\":\n this.#handleMetadataMessage(rootUuid, message.data);\n return;\n case \"step_metadata\":\n this.#handleStepMetadataMessage(rootUuid, message.data);\n return;\n case \"step_start\":\n this.#handleStartStepMessage(rootUuid, message.data);\n return;\n case \"step_stop\":\n this.#handleStopStepMessage(rootUuid, message.data);\n return;\n case \"attachment_content\":\n this.#handleAttachmentContentMessage(rootUuid, message.data);\n return;\n case \"attachment_path\":\n this.#handleAttachmentPathMessage(rootUuid, message.data);\n return;\n default:\n // eslint-disable-next-line no-console\n console.error(`could not apply runtime messages: unknown message ${JSON.stringify(message)}`);\n return;\n }\n });\n };\n\n #handleMetadataMessage = (rootUuid: string, message: RuntimeMetadataMessage[\"data\"]) => {\n // only display name could be set to fixture.\n const fixtureResult = this.state.getFixtureResult(rootUuid);\n if (fixtureResult) {\n this.updateFixture(rootUuid, (result) => {\n if (message.displayName) {\n result.name = message.displayName;\n }\n });\n return;\n }\n\n const { links, labels, parameters, displayName, ...rest } = message;\n this.updateTest(rootUuid, (result) => {\n if (links) {\n result.links = [...result.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n result.labels = [...result.labels, ...labels];\n }\n if (parameters) {\n result.parameters = [...result.parameters, ...parameters];\n }\n if (displayName) {\n result.name = displayName;\n }\n Object.assign(result, rest);\n });\n };\n\n #handleStepMetadataMessage = (rootUuid: string, message: RuntimeStepMetadataMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step metadata message: no step is running\");\n return;\n }\n const { name, parameters } = message;\n this.updateStep(stepUuid, (stepResult) => {\n if (name) {\n stepResult.name = name;\n }\n if (parameters) {\n stepResult.parameters = [...stepResult.parameters, ...parameters];\n }\n });\n };\n\n #handleStartStepMessage = (rootUuid: string, message: RuntimeStartStepMessage[\"data\"]) => {\n this.startStep(rootUuid, undefined, { ...message });\n };\n\n #handleStopStepMessage = (rootUuid: string, message: RuntimeStopStepMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step stop message: no step is running\");\n return;\n }\n this.updateStep(stepUuid, (result) => {\n if (message.status && !result.status) {\n result.status = message.status;\n }\n if (message.statusDetails) {\n result.statusDetails = { ...result.statusDetails, ...message.statusDetails };\n }\n });\n this.stopStep(stepUuid, { stop: message.stop });\n };\n\n #handleAttachmentContentMessage = (rootUuid: string, message: RuntimeAttachmentContentMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, Buffer.from(message.content, message.encoding), {\n encoding: message.encoding,\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #handleAttachmentPathMessage = (rootUuid: string, message: RuntimeAttachmentPathMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, message.path, {\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #findParent = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n ): FixtureResult | TestResult | StepResult | undefined => {\n const root = this.state.getExecutionItem(rootUuid);\n if (!root) {\n return;\n }\n\n if (parentStepUuid === null) {\n return root;\n } else if (parentStepUuid === undefined) {\n const stepUuid = this.currentStep(rootUuid);\n return stepUuid ? this.state.getStepResult(stepUuid) : root;\n } else {\n return this.state.getStepResult(parentStepUuid);\n }\n };\n\n #writeFixturesOfScope = ({ fixtures, tests }: TestScope) => {\n const writtenFixtures = new Set<string>();\n if (tests.length) {\n for (const wrappedFixture of fixtures) {\n if (!writtenFixtures.has(wrappedFixture.uuid)) {\n this.#writeContainer(tests, wrappedFixture);\n this.state.deleteFixtureResult(wrappedFixture.uuid);\n writtenFixtures.add(wrappedFixture.uuid);\n }\n }\n }\n };\n\n #writeContainer = (tests: string[], wrappedFixture: FixtureWrapper) => {\n const fixture = wrappedFixture.value;\n const befores = wrappedFixture.type === \"before\" ? [wrappedFixture.value] : [];\n const afters = wrappedFixture.type === \"after\" ? [wrappedFixture.value] : [];\n this.writer.writeGroup({\n uuid: wrappedFixture.uuid,\n name: fixture.name,\n children: [...new Set(tests)],\n befores,\n afters,\n });\n };\n\n #calculateTimings = (start?: number, stop?: number, duration?: number): { start?: number; stop?: number } => {\n const result: { start?: number; stop?: number } = { start, stop };\n if (duration) {\n const normalisedDuration = Math.max(0, duration);\n if (result.stop !== undefined) {\n result.start = result.stop - normalisedDuration;\n } else if (result.start !== undefined) {\n result.stop = result.start + normalisedDuration;\n } else {\n result.stop = Date.now();\n result.start = result.stop - normalisedDuration;\n }\n } else {\n if (result.stop === undefined) {\n result.stop = Date.now();\n }\n if (result.start === undefined) {\n result.start = result.stop;\n }\n }\n return result;\n };\n}\n"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAmBA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAEA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAAmD,IAAAQ,SAAA;AAAA,SAAAC,yBAAAC,CAAA,EAAAC,CAAA,gBAAAD,CAAA,iBAAAE,CAAA,EAAAC,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,CAACL,IAAI,GAAGP,IAAI,CAACC,GAAG,CAAC,CAAC;UACxBW,MAAM,CAACb,KAAK,GAAGa,MAAM,CAACL,IAAI,GAAG4G,kBAAkB;QACjD;MACF,CAAC,MAAM;QACL,IAAIvG,MAAM,CAACL,IAAI,KAAKO,SAAS,EAAE;UAC7BF,MAAM,CAACL,IAAI,GAAGP,IAAI,CAACC,GAAG,CAAC,CAAC;QAC1B;QACA,IAAIW,MAAM,CAACb,KAAK,KAAKe,SAAS,EAAE;UAC9BF,MAAM,CAACb,KAAK,GAAGa,MAAM,CAACL,IAAI;QAC5B;MACF;MACA,OAAOK,MAAM;IACf,CAAC;IApeC,IAAI,CAACpC,MAAM,GAAG,IAAA8I,qBAAa,EAAC9I,MAAM,CAAC;IACnC,IAAI,CAAC0C,QAAQ,GAAG,IAAIqG,kBAAQ,CAAC;MAAE9I;IAAU,CAAC,CAAC;IAC3C,IAAI,CAACE,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACD,eAAe,GAAGA,eAAe;IACtC,IAAI,CAACiH,UAAU,GAAG/G,MAAK;EACzB;AAgeF;AAAC4I,OAAA,CAAAnJ,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -176,10 +176,34 @@ class MessageTestRuntime {
|
|
|
176
176
|
});
|
|
177
177
|
})();
|
|
178
178
|
}
|
|
179
|
-
|
|
180
|
-
var
|
|
179
|
+
logStep(name) {
|
|
180
|
+
var _arguments3 = arguments,
|
|
181
|
+
_this13 = this;
|
|
181
182
|
return _asyncToGenerator(function* () {
|
|
183
|
+
var status = _arguments3.length > 1 && _arguments3[1] !== undefined ? _arguments3[1] : _model.Status.PASSED;
|
|
184
|
+
var error = _arguments3.length > 2 ? _arguments3[2] : undefined;
|
|
185
|
+
var timestamp = Date.now();
|
|
182
186
|
yield _this13.sendMessage({
|
|
187
|
+
type: "step_start",
|
|
188
|
+
data: {
|
|
189
|
+
name,
|
|
190
|
+
start: timestamp
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
yield _this13.sendMessage({
|
|
194
|
+
type: "step_stop",
|
|
195
|
+
data: {
|
|
196
|
+
status: status,
|
|
197
|
+
stop: timestamp,
|
|
198
|
+
statusDetails: error ? _objectSpread({}, (0, _utils.getMessageAndTraceFromError)(error)) : undefined
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
})();
|
|
202
|
+
}
|
|
203
|
+
step(name, body) {
|
|
204
|
+
var _this14 = this;
|
|
205
|
+
return _asyncToGenerator(function* () {
|
|
206
|
+
yield _this14.sendMessage({
|
|
183
207
|
type: "step_start",
|
|
184
208
|
data: {
|
|
185
209
|
name,
|
|
@@ -188,7 +212,7 @@ class MessageTestRuntime {
|
|
|
188
212
|
});
|
|
189
213
|
try {
|
|
190
214
|
var result = yield body();
|
|
191
|
-
yield
|
|
215
|
+
yield _this14.sendMessage({
|
|
192
216
|
type: "step_stop",
|
|
193
217
|
data: {
|
|
194
218
|
status: _model.Status.PASSED,
|
|
@@ -201,7 +225,7 @@ class MessageTestRuntime {
|
|
|
201
225
|
message: _message,
|
|
202
226
|
stack
|
|
203
227
|
} = err;
|
|
204
|
-
yield
|
|
228
|
+
yield _this14.sendMessage({
|
|
205
229
|
type: "step_stop",
|
|
206
230
|
data: {
|
|
207
231
|
status: (0, _utils.getStatusFromError)(err),
|
|
@@ -217,9 +241,9 @@ class MessageTestRuntime {
|
|
|
217
241
|
})();
|
|
218
242
|
}
|
|
219
243
|
stepDisplayName(name) {
|
|
220
|
-
var
|
|
244
|
+
var _this15 = this;
|
|
221
245
|
return _asyncToGenerator(function* () {
|
|
222
|
-
yield
|
|
246
|
+
yield _this15.sendMessage({
|
|
223
247
|
type: "step_metadata",
|
|
224
248
|
data: {
|
|
225
249
|
name
|
|
@@ -228,9 +252,9 @@ class MessageTestRuntime {
|
|
|
228
252
|
})();
|
|
229
253
|
}
|
|
230
254
|
stepParameter(name, value, mode) {
|
|
231
|
-
var
|
|
255
|
+
var _this16 = this;
|
|
232
256
|
return _asyncToGenerator(function* () {
|
|
233
|
-
yield
|
|
257
|
+
yield _this16.sendMessage({
|
|
234
258
|
type: "step_metadata",
|
|
235
259
|
data: {
|
|
236
260
|
parameters: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageTestRuntime.js","names":["_model","require","_utils","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","asyncGeneratorStep","n","a","c","u","done","Promise","resolve","then","_asyncToGenerator","_next","_throw","MessageTestRuntime","label","name","_this","sendMessage","type","data","labels","_arguments","_this2","_len","Array","_key","link","url","_this3","links","_arguments2","_this4","_len2","_key2","parameter","options","_this5","parameters","description","markdown","_this6","descriptionHtml","html","_this7","displayName","_this8","historyId","_this9","testCaseId","_this10","attachment","content","_this11","bufferContent","Buffer","from","encoding","toString","contentType","fileExtension","wrapInStep","timestamp","Date","now","attachmentFromPath","path","_this12","step","body","_this13","start","result","status","Status","PASSED","stop","err","message","stack","getStatusFromError","statusDetails","trace","stepDisplayName","_this14","stepParameter","mode","_this15","exports"],"sources":["../../../../src/sdk/runtime/MessageTestRuntime.ts"],"sourcesContent":["import type {\n AttachmentOptions,\n Label,\n LabelName,\n Link,\n LinkType,\n ParameterMode,\n ParameterOptions,\n} from \"../../model.js\";\nimport { Status } from \"../../model.js\";\nimport type { RuntimeMessage } from \"../types.js\";\nimport { getStatusFromError } from \"../utils.js\";\nimport type { TestRuntime } from \"./types.js\";\n\nexport abstract class MessageTestRuntime implements TestRuntime {\n async label(name: LabelName | string, value: string) {\n await this.sendMessage({\n type: \"metadata\",\n data: {\n labels: [{ name, value }],\n },\n });\n }\n\n async labels(...labels: Label[]) {\n await this.sendMessage({\n type: \"metadata\",\n data: {\n labels,\n },\n });\n }\n\n async link(url: string, type?: LinkType | string, name?: string) {\n await this.sendMessage({\n type: \"metadata\",\n data: {\n links: [{ type, url, name }],\n },\n });\n }\n\n async links(...links: Link[]) {\n await this.sendMessage({\n type: \"metadata\",\n data: {\n links,\n },\n });\n }\n\n async parameter(name: string, value: string, options?: ParameterOptions) {\n await this.sendMessage({\n type: \"metadata\",\n data: {\n parameters: [\n {\n name,\n value,\n ...options,\n },\n ],\n },\n });\n }\n\n async description(markdown: string) {\n await this.sendMessage({\n type: \"metadata\",\n data: {\n description: markdown,\n },\n });\n }\n\n async descriptionHtml(html: string) {\n await this.sendMessage({\n type: \"metadata\",\n data: {\n descriptionHtml: html,\n },\n });\n }\n\n async displayName(name: string) {\n await this.sendMessage({\n type: \"metadata\",\n data: {\n displayName: name,\n },\n });\n }\n\n async historyId(value: string) {\n await this.sendMessage({\n type: \"metadata\",\n data: {\n historyId: value,\n },\n });\n }\n\n async testCaseId(value: string) {\n await this.sendMessage({\n type: \"metadata\",\n data: {\n testCaseId: value,\n },\n });\n }\n\n async attachment(name: string, content: Buffer | string, options: AttachmentOptions) {\n const bufferContent = typeof content === \"string\" ? Buffer.from(content, options.encoding) : content;\n await this.sendMessage({\n type: \"attachment_content\",\n data: {\n name,\n content: bufferContent.toString(\"base64\"),\n encoding: \"base64\",\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n wrapInStep: true,\n timestamp: Date.now(),\n },\n });\n }\n\n async attachmentFromPath(name: string, path: string, options: AttachmentOptions) {\n await this.sendMessage({\n type: \"attachment_path\",\n data: {\n name,\n path,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n wrapInStep: true,\n timestamp: Date.now(),\n },\n });\n }\n\n async step<T = void>(name: string, body: () => T | PromiseLike<T>) {\n await this.sendMessage({\n type: \"step_start\",\n data: {\n name,\n start: Date.now(),\n },\n });\n\n try {\n const result = await body();\n\n await this.sendMessage({\n type: \"step_stop\",\n data: {\n status: Status.PASSED,\n stop: Date.now(),\n },\n });\n\n return result;\n } catch (err) {\n const { message, stack } = err as Error;\n\n await this.sendMessage({\n type: \"step_stop\",\n data: {\n status: getStatusFromError(err as Error),\n stop: Date.now(),\n statusDetails: {\n message,\n trace: stack,\n },\n },\n });\n\n throw err;\n }\n }\n\n async stepDisplayName(name: string) {\n await this.sendMessage({\n type: \"step_metadata\",\n data: { name },\n });\n }\n\n async stepParameter(name: string, value: string, mode?: ParameterMode) {\n await this.sendMessage({\n type: \"step_metadata\",\n data: {\n parameters: [{ name, value, mode }],\n },\n });\n }\n\n abstract sendMessage(message: RuntimeMessage): Promise<void>;\n}\n"],"mappings":";;;;;;AASA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAAiD,SAAAE,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAI,MAAA,CAAAD,CAAA,OAAAa,OAAA,WAAAd,CAAA,IAAAe,eAAA,CAAAhB,CAAA,EAAAC,CAAA,EAAAC,CAAA,CAAAD,CAAA,SAAAE,MAAA,CAAAc,yBAAA,GAAAd,MAAA,CAAAe,gBAAA,CAAAlB,CAAA,EAAAG,MAAA,CAAAc,yBAAA,C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AM,CAAC,GAAGF,GAAY;QAEvC,MAAMP,OAAI,CAACpD,WAAW,CAAC;UACrBC,IAAI,EAAE,WAAW;UACjBC,IAAI,EAAE;YACJqD,MAAM,EAAE,IAAAO,yBAAkB,EAACH,GAAY,CAAC;YACxCD,IAAI,EAAEb,IAAI,CAACC,GAAG,CAAC,CAAC;YAChBiB,aAAa,EAAE;cACbH,OAAO,EAAPA,QAAO;cACPI,KAAK,EAAEH;YACT;UACF;QACF,CAAC,CAAC;QAEF,MAAMF,GAAG;MACX;IAAC;EACH;EAEMM,eAAeA,CAACnE,IAAY,EAAE;IAAA,IAAAoE,OAAA;IAAA,OAAAzE,iBAAA;MAClC,MAAMyE,OAAI,CAAClE,WAAW,CAAC;QACrBC,IAAI,EAAE,eAAe;QACrBC,IAAI,EAAE;UAAEJ;QAAK;MACf,CAAC,CAAC;IAAC;EACL;EAEMqE,aAAaA,CAACrE,IAAY,EAAEzB,KAAa,EAAE+F,IAAoB,EAAE;IAAA,IAAAC,OAAA;IAAA,OAAA5E,iBAAA;MACrE,MAAM4E,OAAI,CAACrE,WAAW,CAAC;QACrBC,IAAI,EAAE,eAAe;QACrBC,IAAI,EAAE;UACJkB,UAAU,EAAE,CAAC;YAAEtB,IAAI;YAAEzB,KAAK;YAAE+F;UAAK,CAAC;QACpC;MACF,CAAC,CAAC;IAAC;EACL;AAGF;AAACE,OAAA,CAAA1E,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"MessageTestRuntime.js","names":["_model","require","_utils","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","asyncGeneratorStep","n","a","c","u","done","Promise","resolve","then","_asyncToGenerator","_next","_throw","MessageTestRuntime","label","name","_this","sendMessage","type","data","labels","_arguments","_this2","_len","Array","_key","link","url","_this3","links","_arguments2","_this4","_len2","_key2","parameter","options","_this5","parameters","description","markdown","_this6","descriptionHtml","html","_this7","displayName","_this8","historyId","_this9","testCaseId","_this10","attachment","content","_this11","bufferContent","Buffer","from","encoding","toString","contentType","fileExtension","wrapInStep","timestamp","Date","now","attachmentFromPath","path","_this12","logStep","_arguments3","_this13","status","undefined","Status","PASSED","error","start","stop","statusDetails","getMessageAndTraceFromError","step","body","_this14","result","err","message","stack","getStatusFromError","trace","stepDisplayName","_this15","stepParameter","mode","_this16","exports"],"sources":["../../../../src/sdk/runtime/MessageTestRuntime.ts"],"sourcesContent":["import {\n type AttachmentOptions,\n type Label,\n type LabelName,\n type Link,\n type LinkType,\n type ParameterMode,\n type ParameterOptions,\n Status,\n} from \"../../model.js\";\nimport type { RuntimeMessage } from \"../types.js\";\nimport { getMessageAndTraceFromError, getStatusFromError } from \"../utils.js\";\nimport type { TestRuntime } from \"./types.js\";\n\nexport abstract class MessageTestRuntime implements TestRuntime {\n async label(name: LabelName | string, value: string) {\n await this.sendMessage({\n type: \"metadata\",\n data: {\n labels: [{ name, value }],\n },\n });\n }\n\n async labels(...labels: Label[]) {\n await this.sendMessage({\n type: \"metadata\",\n data: {\n labels,\n },\n });\n }\n\n async link(url: string, type?: LinkType | string, name?: string) {\n await this.sendMessage({\n type: \"metadata\",\n data: {\n links: [{ type, url, name }],\n },\n });\n }\n\n async links(...links: Link[]) {\n await this.sendMessage({\n type: \"metadata\",\n data: {\n links,\n },\n });\n }\n\n async parameter(name: string, value: string, options?: ParameterOptions) {\n await this.sendMessage({\n type: \"metadata\",\n data: {\n parameters: [\n {\n name,\n value,\n ...options,\n },\n ],\n },\n });\n }\n\n async description(markdown: string) {\n await this.sendMessage({\n type: \"metadata\",\n data: {\n description: markdown,\n },\n });\n }\n\n async descriptionHtml(html: string) {\n await this.sendMessage({\n type: \"metadata\",\n data: {\n descriptionHtml: html,\n },\n });\n }\n\n async displayName(name: string) {\n await this.sendMessage({\n type: \"metadata\",\n data: {\n displayName: name,\n },\n });\n }\n\n async historyId(value: string) {\n await this.sendMessage({\n type: \"metadata\",\n data: {\n historyId: value,\n },\n });\n }\n\n async testCaseId(value: string) {\n await this.sendMessage({\n type: \"metadata\",\n data: {\n testCaseId: value,\n },\n });\n }\n\n async attachment(name: string, content: Buffer | string, options: AttachmentOptions) {\n const bufferContent = typeof content === \"string\" ? Buffer.from(content, options.encoding) : content;\n await this.sendMessage({\n type: \"attachment_content\",\n data: {\n name,\n content: bufferContent.toString(\"base64\"),\n encoding: \"base64\",\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n wrapInStep: true,\n timestamp: Date.now(),\n },\n });\n }\n\n async attachmentFromPath(name: string, path: string, options: AttachmentOptions) {\n await this.sendMessage({\n type: \"attachment_path\",\n data: {\n name,\n path,\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n wrapInStep: true,\n timestamp: Date.now(),\n },\n });\n }\n\n async logStep(name: string, status: Status = Status.PASSED, error?: Error) {\n const timestamp = Date.now();\n await this.sendMessage({\n type: \"step_start\",\n data: {\n name,\n start: timestamp,\n },\n });\n await this.sendMessage({\n type: \"step_stop\",\n data: {\n status: status,\n stop: timestamp,\n statusDetails: error\n ? {\n ...getMessageAndTraceFromError(error),\n }\n : undefined,\n },\n });\n }\n\n async step<T = void>(name: string, body: () => T | PromiseLike<T>) {\n await this.sendMessage({\n type: \"step_start\",\n data: {\n name,\n start: Date.now(),\n },\n });\n\n try {\n const result = await body();\n\n await this.sendMessage({\n type: \"step_stop\",\n data: {\n status: Status.PASSED,\n stop: Date.now(),\n },\n });\n\n return result;\n } catch (err) {\n const { message, stack } = err as Error;\n\n await this.sendMessage({\n type: \"step_stop\",\n data: {\n status: getStatusFromError(err as Error),\n stop: Date.now(),\n statusDetails: {\n message,\n trace: stack,\n },\n },\n });\n\n throw err;\n }\n }\n\n async stepDisplayName(name: string) {\n await this.sendMessage({\n type: \"step_metadata\",\n data: { name },\n });\n }\n\n async stepParameter(name: string, value: string, mode?: ParameterMode) {\n await this.sendMessage({\n type: \"step_metadata\",\n data: {\n parameters: [{ name, value, mode }],\n },\n });\n }\n\n abstract sendMessage(message: RuntimeMessage): Promise<void>;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAWA,IAAAC,MAAA,GAAAD,OAAA;AAA8E,SAAAE,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAI,MAAA,CAAAD,CAAA,OAAAa,OAAA,WAAAd,CAAA,IAAAe,eAAA,CAAAhB,CAAA,EAAAC,CAAA,EAAAC,CAAA,CAAAD,CAAA,SAAAE,MAAA,CAAAc,yBAAA,GAAAd,MAAA,CAAAe,gBAAA,CAAAlB,CAAA,EAAAG,MAAA,CAAAc,yBAAA,CAAAf,CAAA,KAAAH,OAAA,CAAAI,MAAA,CAAAD,CAAA,GAAAa,OAAA,WAAAd,CAAA,IAAAE,MAAA,CAAAgB,cAAA,CAAAnB,CAAA,EAAAC,CAAA,EAAAE,MAAA,CAAAK,wBAAA,CAAAN,CAAA,EAAAD,CAAA,iBAAAD,CAAA;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CAAC;QACrBC,IAAI,EAAE,eAAe;QACrBC,IAAI,EAAE;UACJkB,UAAU,EAAE,CAAC;YAAEtB,IAAI;YAAEzB,KAAK;YAAEqG;UAAK,CAAC;QACpC;MACF,CAAC,CAAC;IAAC;EACL;AAGF;AAACE,OAAA,CAAAhF,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -61,31 +61,37 @@ class NoopTestRuntime {
|
|
|
61
61
|
yield _this9.warning();
|
|
62
62
|
})();
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
logStep() {
|
|
65
65
|
var _this10 = this;
|
|
66
66
|
return _asyncToGenerator(function* () {
|
|
67
67
|
yield _this10.warning();
|
|
68
|
-
return body();
|
|
69
68
|
})();
|
|
70
69
|
}
|
|
71
|
-
|
|
70
|
+
step(name, body) {
|
|
72
71
|
var _this11 = this;
|
|
73
72
|
return _asyncToGenerator(function* () {
|
|
74
73
|
yield _this11.warning();
|
|
74
|
+
return body();
|
|
75
75
|
})();
|
|
76
76
|
}
|
|
77
|
-
|
|
77
|
+
stepDisplayName() {
|
|
78
78
|
var _this12 = this;
|
|
79
79
|
return _asyncToGenerator(function* () {
|
|
80
80
|
yield _this12.warning();
|
|
81
81
|
})();
|
|
82
82
|
}
|
|
83
|
-
|
|
83
|
+
stepParameter() {
|
|
84
84
|
var _this13 = this;
|
|
85
85
|
return _asyncToGenerator(function* () {
|
|
86
86
|
yield _this13.warning();
|
|
87
87
|
})();
|
|
88
88
|
}
|
|
89
|
+
testCaseId() {
|
|
90
|
+
var _this14 = this;
|
|
91
|
+
return _asyncToGenerator(function* () {
|
|
92
|
+
yield _this14.warning();
|
|
93
|
+
})();
|
|
94
|
+
}
|
|
89
95
|
|
|
90
96
|
// eslint-disable-next-line @typescript-eslint/require-await
|
|
91
97
|
warning() {
|