allure-js-commons 3.1.0 → 3.2.1

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.
@@ -1,12 +1,14 @@
1
1
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2
2
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3
+ function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
3
4
  function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
4
5
  function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
5
- function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
6
- function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
7
6
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
8
7
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
9
8
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
+ function _classPrivateGetter(s, r, a) { return a(_assertClassBrand(s, r)); }
10
+ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
11
+ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
10
12
  /* eslint max-lines: 0 */
11
13
  import { extname } from "path";
12
14
  import { Stage } from "../../model.js";
@@ -17,7 +19,65 @@ import { hasSkipLabel } from "./testplan.js";
17
19
  import { deepClone, formatLinks, getTestResultHistoryId, getTestResultTestCaseId, randomUuid } from "./utils.js";
18
20
  import { buildAttachmentFileName } from "./utils/attachments.js";
19
21
  import { resolveWriter } from "./writer/loader.js";
20
- class DefaultStepStack {
22
+ var _runningSteps = /*#__PURE__*/new WeakMap();
23
+ var _ShallowStepsStack_brand = /*#__PURE__*/new WeakSet();
24
+ /**
25
+ * Simpler steps stack implementation that contains only the current steps without root nodes
26
+ * Useful, when you need to create steps without binding them to a specific test or fixture
27
+ * @example
28
+ * ```js
29
+ * const stack = new ShallowStepsStack();
30
+ *
31
+ * stack.startStep({ name: "step 1" });
32
+ * stack.startStep({ name: "step 1.1" });
33
+ * stack.stopStep({ status: Status.FAILED });
34
+ * stack.stopStep({ status: Status.PASSED });
35
+ * stack.steps // => [{ name: "step 1", status: Status.PASSED, steps: [{ name: "step 1.1", status: Status.FAILED }] }]
36
+ * ```
37
+ */
38
+ export class ShallowStepsStack {
39
+ constructor() {
40
+ _classPrivateMethodInitSpec(this, _ShallowStepsStack_brand);
41
+ _defineProperty(this, "steps", []);
42
+ _classPrivateFieldInitSpec(this, _runningSteps, []);
43
+ }
44
+ startStep(step) {
45
+ var stepResult = _objectSpread(_objectSpread({}, createStepResult()), step);
46
+ if (_classPrivateGetter(_ShallowStepsStack_brand, this, _get_currentStep)) {
47
+ _classPrivateGetter(_ShallowStepsStack_brand, this, _get_currentStep).steps.push(stepResult);
48
+ } else {
49
+ this.steps.push(stepResult);
50
+ }
51
+ _classPrivateFieldGet(_runningSteps, this).push(stepResult);
52
+ }
53
+ updateStep(updateFunc) {
54
+ if (!_classPrivateGetter(_ShallowStepsStack_brand, this, _get_currentStep)) {
55
+ // eslint-disable-next-line no-console
56
+ console.error("There is no running step in the stack to update!");
57
+ return;
58
+ }
59
+ updateFunc(_classPrivateGetter(_ShallowStepsStack_brand, this, _get_currentStep));
60
+ }
61
+ stopStep(opts) {
62
+ if (!_classPrivateGetter(_ShallowStepsStack_brand, this, _get_currentStep)) {
63
+ // eslint-disable-next-line no-console
64
+ console.error("There is no running step in the stack to stop!");
65
+ return;
66
+ }
67
+ var {
68
+ stop,
69
+ duration = 0
70
+ } = opts !== null && opts !== void 0 ? opts : {};
71
+ this.updateStep(result => {
72
+ result.stop = (stop !== null && stop !== void 0 ? stop : result.start) ? result.start + duration : undefined;
73
+ });
74
+ _classPrivateFieldGet(_runningSteps, this).pop();
75
+ }
76
+ }
77
+ function _get_currentStep(_this) {
78
+ return _classPrivateFieldGet(_runningSteps, _this)[_classPrivateFieldGet(_runningSteps, _this).length - 1];
79
+ }
80
+ export class DefaultStepStack {
21
81
  constructor() {
22
82
  _defineProperty(this, "stepsByRoot", new Map());
23
83
  _defineProperty(this, "rootsByStep", new Map());
@@ -74,7 +134,7 @@ var _writeContainer = /*#__PURE__*/new WeakMap();
74
134
  var _calculateTimings = /*#__PURE__*/new WeakMap();
75
135
  export class ReporterRuntime {
76
136
  constructor(_ref) {
77
- var _this = this;
137
+ var _this2 = this;
78
138
  var {
79
139
  writer,
80
140
  listeners = [],
@@ -156,9 +216,9 @@ export class ReporterRuntime {
156
216
  var testResult = _objectSpread(_objectSpread({}, createTestResult(uuid)), {}, {
157
217
  start: Date.now()
158
218
  }, deepClone(result));
159
- _this.notifier.beforeTestResultStart(testResult);
219
+ _this2.notifier.beforeTestResultStart(testResult);
160
220
  scopeUuids.forEach(scopeUuid => {
161
- var scope = _this.state.getScope(scopeUuid);
221
+ var scope = _this2.state.getScope(scopeUuid);
162
222
  if (!scope) {
163
223
  // eslint-disable-next-line no-console
164
224
  console.error("count not link test to the scope: no scope with uuid ".concat(uuid, " is found"));
@@ -166,8 +226,8 @@ export class ReporterRuntime {
166
226
  }
167
227
  scope.tests.push(uuid);
168
228
  });
169
- _this.state.setTestResult(uuid, testResult, scopeUuids);
170
- _this.notifier.afterTestResultStart(testResult);
229
+ _this2.state.setTestResult(uuid, testResult, scopeUuids);
230
+ _this2.notifier.afterTestResultStart(testResult);
171
231
  return uuid;
172
232
  });
173
233
  _defineProperty(this, "updateTest", (uuid, updateFunc) => {
@@ -1 +1 @@
1
- {"version":3,"file":"ReporterRuntime.js","names":["extname","Stage","LifecycleState","Notifier","createFixtureResult","createStepResult","createTestResult","hasSkipLabel","deepClone","formatLinks","getTestResultHistoryId","getTestResultTestCaseId","randomUuid","buildAttachmentFileName","resolveWriter","DefaultStepStack","constructor","_defineProperty","Map","stepsByRoot","clear","rootsByStep","rootUuid","maybeValue","get","delete","forEach","stepUuid","length","set","push","removeStep","newValue","filter","value","_handleMetadataMessage","WeakMap","_handleStepMetadataMessage","_handleStartStepMessage","_handleStopStepMessage","_handleAttachmentContentMessage","_handleAttachmentPathMessage","_findParent","_writeFixturesOfScope","_writeContainer","_calculateTimings","ReporterRuntime","_ref","_this","writer","listeners","environmentInfo","categories","links","globalLabels","uuid","state","setScope","updateFunc","scope","getScope","console","error","concat","_classPrivateFieldGet","call","deleteScope","scopeUuid","type","fixtureResult","wrappedFixture","setFixtureResult","_objectSpread","start","Date","now","fixtures","fixture","getFixtureResult","opts","startStop","stop","duration","stage","FINISHED","result","scopeUuids","arguments","undefined","testResult","notifier","beforeTestResultStart","tests","setTestResult","afterTestResultStart","getTestResult","beforeTestResultUpdate","afterTestResultUpdate","_testResult$testCaseI","_testResult$historyId","wrapped","getWrappedTestResult","beforeTestResultStop","labels","parameters","description","_testResult$descripti","descriptionHtml","_testResult$descripti2","testCaseId","historyId","afterTestResultStop","deleteTestResult","beforeTestResultWrite","writeResult","afterTestResultWrite","stepStack","currentStep","parentStepUuid","parent","JSON","stringify","stepResult","steps","setStepResult","addStep","step","getStepResult","beforeStepStop","afterStepStop","attachmentName","attachmentContentOrPath","options","_options$fileExtensio","isPath","fileExtension","attachmentFileName","contentType","writeAttachmentFromPath","writeAttachment","attachment","name","source","wrapInStep","timestamp","attachments","writeEnvironmentInfo","serializedCategories","map","c","messageRegex","RegExp","traceRegex","writeCategoriesDefinitions","messages","message","data","_classPrivateFieldInitSpec","getWrappedFixtureResult","displayName","updateFixture","updateScope","linkConfig","updateTest","updateStep","startStep","status","statusDetails","stopStep","Buffer","from","content","encoding","path","root","getExecutionItem","_ref2","writtenFixtures","Set","has","deleteFixtureResult","add","befores","afters","writeGroup","children","normalisedDuration","Math","max","round","Array","isArray","Object","keys","entries","flatMap","_ref3","v"],"sources":["../../../../src/sdk/reporter/ReporterRuntime.ts"],"sourcesContent":["/* eslint max-lines: 0 */\nimport { extname } from \"path\";\nimport {\n type Attachment,\n type AttachmentOptions,\n type FixtureResult,\n type Label,\n Stage,\n type StepResult,\n type TestResult,\n} from \"../../model.js\";\nimport type {\n Category,\n EnvironmentInfo,\n RuntimeAttachmentContentMessage,\n RuntimeAttachmentPathMessage,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n} from \"../types.js\";\nimport { LifecycleState } from \"./LifecycleState.js\";\nimport { Notifier } from \"./Notifier.js\";\nimport { createFixtureResult, createStepResult, createTestResult } from \"./factory.js\";\nimport { hasSkipLabel } from \"./testplan.js\";\nimport type {\n FixtureResultWrapper,\n FixtureType,\n LinkConfig,\n ReporterRuntimeConfig,\n TestScope,\n Writer,\n} from \"./types.js\";\nimport { deepClone, formatLinks, getTestResultHistoryId, getTestResultTestCaseId, randomUuid } from \"./utils.js\";\nimport { buildAttachmentFileName } from \"./utils/attachments.js\";\nimport { resolveWriter } from \"./writer/loader.js\";\n\ninterface StepStack {\n clear(): void;\n\n removeRoot(rootUuid: string): void;\n\n currentStep(rootUuid: string): string | undefined;\n\n addStep(rootUuid: string, stepUuid: string): void;\n\n removeStep(stepUuid: string): void;\n}\n\nclass DefaultStepStack implements StepStack {\n private stepsByRoot: Map<string, string[]> = new Map();\n private rootsByStep: Map<string, string> = new Map();\n\n clear = (): void => {\n this.stepsByRoot.clear();\n this.rootsByStep.clear();\n };\n\n removeRoot = (rootUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n this.stepsByRoot.delete(rootUuid);\n if (maybeValue) {\n maybeValue.forEach((stepUuid) => this.rootsByStep.delete(stepUuid));\n }\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n return maybeValue[maybeValue.length - 1];\n };\n\n addStep = (rootUuid: string, stepUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n this.stepsByRoot.set(rootUuid, [stepUuid]);\n } else {\n maybeValue.push(stepUuid);\n }\n this.rootsByStep.set(stepUuid, rootUuid);\n };\n\n removeStep(stepUuid: string) {\n const rootUuid = this.rootsByStep.get(stepUuid);\n if (!rootUuid) {\n return;\n }\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n const newValue = maybeValue.filter((value) => value !== stepUuid);\n this.stepsByRoot.set(rootUuid, newValue);\n }\n}\n\nexport class ReporterRuntime {\n private readonly state = new LifecycleState();\n private notifier: Notifier;\n private stepStack: StepStack = new DefaultStepStack();\n writer: Writer;\n categories?: Category[];\n environmentInfo?: EnvironmentInfo;\n linkConfig?: LinkConfig;\n globalLabels: Label[] = [];\n\n constructor({\n writer,\n listeners = [],\n environmentInfo,\n categories,\n links,\n globalLabels = {},\n }: ReporterRuntimeConfig) {\n this.writer = resolveWriter(writer);\n this.notifier = new Notifier({ listeners });\n this.categories = categories;\n this.environmentInfo = environmentInfo;\n this.linkConfig = links;\n\n if (Array.isArray(globalLabels)) {\n this.globalLabels = globalLabels;\n } else if (Object.keys(globalLabels).length) {\n this.globalLabels = Object.entries(globalLabels).flatMap(([name, value]) => {\n if (Array.isArray(value)) {\n return value.map((v) => ({ name, value: v }));\n }\n\n return {\n name,\n value,\n };\n });\n }\n }\n\n startScope = (): string => {\n const uuid = randomUuid();\n this.state.setScope(uuid);\n return uuid;\n };\n\n updateScope = (uuid: string, updateFunc: (scope: TestScope) => void): void => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not update scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(scope);\n };\n\n writeScope = (uuid: string) => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not write scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n this.#writeFixturesOfScope(scope);\n this.state.deleteScope(scope.uuid);\n };\n\n startFixture = (scopeUuid: string, type: FixtureType, fixtureResult: Partial<FixtureResult>): string | undefined => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not start fixture: no scope with uuid ${scopeUuid} is found`);\n return;\n }\n\n const uuid = randomUuid();\n const wrappedFixture = this.state.setFixtureResult(scopeUuid, uuid, type, {\n ...createFixtureResult(),\n start: Date.now(),\n ...fixtureResult,\n });\n\n scope.fixtures.push(wrappedFixture);\n return uuid;\n };\n\n updateFixture = (uuid: string, updateFunc: (result: FixtureResult) => void): void => {\n const fixture = this.state.getFixtureResult(uuid);\n\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not update fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(fixture);\n };\n\n stopFixture = (uuid: string, opts?: { stop?: number; duration?: number }): void => {\n const fixture = this.state.getFixtureResult(uuid);\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not stop fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n const startStop = this.#calculateTimings(fixture.start, opts?.stop, opts?.duration);\n fixture.start = startStop.start;\n fixture.stop = startStop.stop;\n\n fixture.stage = Stage.FINISHED;\n };\n\n startTest = (result: Partial<TestResult>, scopeUuids: string[] = []): string => {\n const uuid = randomUuid();\n const testResult: TestResult = {\n ...createTestResult(uuid),\n start: Date.now(),\n ...deepClone(result),\n };\n\n this.notifier.beforeTestResultStart(testResult);\n\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not link test to the scope: no scope with uuid ${uuid} is found`);\n return;\n }\n scope.tests.push(uuid);\n });\n\n this.state.setTestResult(uuid, testResult, scopeUuids);\n this.notifier.afterTestResultStart(testResult);\n return uuid;\n };\n\n updateTest = (uuid: string, updateFunc: (result: TestResult) => void): void => {\n const testResult = this.state.getTestResult(uuid);\n\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not update test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n this.notifier.beforeTestResultUpdate(testResult);\n updateFunc(testResult);\n this.notifier.afterTestResultUpdate(testResult);\n };\n\n stopTest = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const wrapped = this.state.getWrappedTestResult(uuid);\n if (!wrapped) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n const testResult = wrapped.value;\n\n this.notifier.beforeTestResultStop(testResult);\n\n const scopeUuids = wrapped.scopeUuids;\n\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n\n if (scope?.labels) {\n testResult.labels = [...testResult.labels, ...scope.labels];\n }\n\n if (scope?.links) {\n testResult.links = [...testResult.links, ...scope.links];\n }\n\n if (scope?.parameters) {\n testResult.parameters = [...testResult.parameters, ...scope.parameters];\n }\n\n if (scope?.description) {\n testResult.description = testResult.description ?? scope.description;\n }\n\n if (scope?.descriptionHtml) {\n testResult.descriptionHtml = testResult.descriptionHtml ?? scope.descriptionHtml;\n }\n });\n\n testResult.labels = [...this.globalLabels, ...testResult.labels];\n\n testResult.testCaseId ??= getTestResultTestCaseId(testResult);\n testResult.historyId ??= getTestResultHistoryId(testResult);\n\n const startStop = this.#calculateTimings(testResult.start, opts?.stop, opts?.duration);\n\n testResult.start = startStop.start;\n testResult.stop = startStop.stop;\n\n this.notifier.afterTestResultStop(testResult);\n };\n\n writeTest = (uuid: string) => {\n const testResult = this.state.getTestResult(uuid);\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not write test result: no test with uuid ${uuid} is found`);\n return;\n }\n\n if (hasSkipLabel(testResult.labels)) {\n this.state.deleteTestResult(uuid);\n return;\n }\n\n this.notifier.beforeTestResultWrite(testResult);\n\n this.writer.writeResult(testResult);\n this.state.deleteTestResult(uuid);\n\n this.notifier.afterTestResultWrite(testResult);\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n return this.stepStack.currentStep(rootUuid);\n };\n\n startStep = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n result: Partial<StepResult>,\n ): string | undefined => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not start test step: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n const stepResult: StepResult = {\n ...createStepResult(),\n start: Date.now(),\n ...result,\n };\n parent.steps.push(stepResult);\n const stepUuid = randomUuid();\n this.state.setStepResult(stepUuid, stepResult);\n\n this.stepStack.addStep(rootUuid, stepUuid);\n\n return stepUuid;\n };\n\n updateStep = (uuid: string, updateFunc: (stepResult: StepResult) => void) => {\n const step = this.state.getStepResult(uuid)!;\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not update test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(step);\n };\n\n stopStep = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const step = this.state.getStepResult(uuid);\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n this.notifier.beforeStepStop(step);\n\n const startStop = this.#calculateTimings(step.start, opts?.stop, opts?.duration);\n step.start = startStop.start;\n step.stop = startStop.stop;\n\n step.stage = Stage.FINISHED;\n\n this.stepStack.removeStep(uuid);\n\n this.notifier.afterStepStop(step);\n };\n\n writeAttachment = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n attachmentName: string,\n attachmentContentOrPath: Buffer | string,\n options: AttachmentOptions & { wrapInStep?: boolean; timestamp?: number },\n ) => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not write test attachment: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n\n const isPath = typeof attachmentContentOrPath === \"string\";\n const fileExtension = options.fileExtension ?? (isPath ? extname(attachmentContentOrPath) : undefined);\n const attachmentFileName = buildAttachmentFileName({\n contentType: options.contentType,\n fileExtension,\n });\n\n if (isPath) {\n this.writer.writeAttachmentFromPath(attachmentFileName, attachmentContentOrPath);\n } else {\n this.writer.writeAttachment(attachmentFileName, attachmentContentOrPath);\n }\n\n const attachment: Attachment = {\n name: attachmentName,\n source: attachmentFileName,\n type: options.contentType,\n };\n\n if (options.wrapInStep) {\n const { timestamp = Date.now() } = options;\n parent.steps.push({\n name: attachmentName,\n attachments: [attachment],\n start: timestamp,\n stop: timestamp,\n } as StepResult);\n } else {\n parent.attachments.push(attachment);\n }\n };\n\n writeEnvironmentInfo = () => {\n if (!this.environmentInfo) {\n return;\n }\n\n this.writer.writeEnvironmentInfo(this.environmentInfo);\n };\n\n writeCategoriesDefinitions = () => {\n if (!this.categories) {\n return;\n }\n\n const serializedCategories = this.categories.map((c) => {\n if (c.messageRegex instanceof RegExp) {\n c.messageRegex = c.messageRegex.source;\n }\n\n if (c.traceRegex instanceof RegExp) {\n c.traceRegex = c.traceRegex.source;\n }\n\n return c;\n });\n\n this.writer.writeCategoriesDefinitions(serializedCategories);\n };\n\n applyRuntimeMessages = (rootUuid: string, messages: RuntimeMessage[]) => {\n messages.forEach((message) => {\n switch (message.type) {\n case \"metadata\":\n this.#handleMetadataMessage(rootUuid, message.data);\n return;\n case \"step_metadata\":\n this.#handleStepMetadataMessage(rootUuid, message.data);\n return;\n case \"step_start\":\n this.#handleStartStepMessage(rootUuid, message.data);\n return;\n case \"step_stop\":\n this.#handleStopStepMessage(rootUuid, message.data);\n return;\n case \"attachment_content\":\n this.#handleAttachmentContentMessage(rootUuid, message.data);\n return;\n case \"attachment_path\":\n this.#handleAttachmentPathMessage(rootUuid, message.data);\n return;\n default:\n // eslint-disable-next-line no-console\n console.error(`could not apply runtime messages: unknown message ${JSON.stringify(message)}`);\n return;\n }\n });\n };\n\n #handleMetadataMessage = (rootUuid: string, message: RuntimeMetadataMessage[\"data\"]) => {\n // only display name could be set to fixture.\n const fixtureResult = this.state.getWrappedFixtureResult(rootUuid);\n const { links, labels, parameters, displayName, testCaseId, historyId, description, descriptionHtml } = message;\n\n if (fixtureResult) {\n if (displayName) {\n this.updateFixture(rootUuid, (result) => {\n result.name = displayName;\n });\n }\n\n if (historyId) {\n // eslint-disable-next-line no-console\n console.error(\"historyId can't be changed within test fixtures\");\n }\n if (testCaseId) {\n // eslint-disable-next-line no-console\n console.error(\"testCaseId can't be changed within test fixtures\");\n }\n\n if (links || labels || parameters || description || descriptionHtml) {\n // in some frameworks, afterEach methods can be executed before test stop event, while\n // in others after. To remove the possible undetermined behaviour we only allow\n // using runtime metadata API in before hooks.\n if (fixtureResult.type === \"after\") {\n // eslint-disable-next-line no-console\n console.error(\"metadata messages isn't supported for after test fixtures\");\n return;\n }\n\n this.updateScope(fixtureResult.scopeUuid, (scope) => {\n if (links) {\n scope.links = [...scope.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n scope.labels = [...scope.labels, ...labels];\n }\n if (parameters) {\n scope.parameters = [...scope.parameters, ...parameters];\n }\n if (description) {\n scope.description = description;\n }\n if (descriptionHtml) {\n scope.descriptionHtml = descriptionHtml;\n }\n });\n }\n\n return;\n }\n\n this.updateTest(rootUuid, (result) => {\n if (links) {\n result.links = [...result.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n result.labels = [...result.labels, ...labels];\n }\n if (parameters) {\n result.parameters = [...result.parameters, ...parameters];\n }\n if (displayName) {\n result.name = displayName;\n }\n if (testCaseId) {\n result.testCaseId = testCaseId;\n }\n if (historyId) {\n result.historyId = historyId;\n }\n if (description) {\n result.description = description;\n }\n if (descriptionHtml) {\n result.descriptionHtml = descriptionHtml;\n }\n });\n };\n\n #handleStepMetadataMessage = (rootUuid: string, message: RuntimeStepMetadataMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step metadata message: no step is running\");\n return;\n }\n const { name, parameters } = message;\n this.updateStep(stepUuid, (stepResult) => {\n if (name) {\n stepResult.name = name;\n }\n if (parameters) {\n stepResult.parameters = [...stepResult.parameters, ...parameters];\n }\n });\n };\n\n #handleStartStepMessage = (rootUuid: string, message: RuntimeStartStepMessage[\"data\"]) => {\n this.startStep(rootUuid, undefined, { ...message });\n };\n\n #handleStopStepMessage = (rootUuid: string, message: RuntimeStopStepMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step stop message: no step is running\");\n return;\n }\n this.updateStep(stepUuid, (result) => {\n if (message.status && !result.status) {\n result.status = message.status;\n }\n if (message.statusDetails) {\n result.statusDetails = { ...result.statusDetails, ...message.statusDetails };\n }\n });\n this.stopStep(stepUuid, { stop: message.stop });\n };\n\n #handleAttachmentContentMessage = (rootUuid: string, message: RuntimeAttachmentContentMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, Buffer.from(message.content, message.encoding), {\n encoding: message.encoding,\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #handleAttachmentPathMessage = (rootUuid: string, message: RuntimeAttachmentPathMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, message.path, {\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #findParent = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n ): FixtureResult | TestResult | StepResult | undefined => {\n const root = this.state.getExecutionItem(rootUuid);\n if (!root) {\n return;\n }\n\n if (parentStepUuid === null) {\n return root;\n } else if (parentStepUuid === undefined) {\n const stepUuid = this.currentStep(rootUuid);\n return stepUuid ? this.state.getStepResult(stepUuid) : root;\n } else {\n return this.state.getStepResult(parentStepUuid);\n }\n };\n\n #writeFixturesOfScope = ({ fixtures, tests }: TestScope) => {\n const writtenFixtures = new Set<string>();\n if (tests.length) {\n for (const wrappedFixture of fixtures) {\n if (!writtenFixtures.has(wrappedFixture.uuid)) {\n this.#writeContainer(tests, wrappedFixture);\n this.state.deleteFixtureResult(wrappedFixture.uuid);\n writtenFixtures.add(wrappedFixture.uuid);\n }\n }\n }\n };\n\n #writeContainer = (tests: string[], wrappedFixture: FixtureResultWrapper) => {\n const fixture = wrappedFixture.value;\n const befores = wrappedFixture.type === \"before\" ? [wrappedFixture.value] : [];\n const afters = wrappedFixture.type === \"after\" ? [wrappedFixture.value] : [];\n this.writer.writeGroup({\n uuid: wrappedFixture.uuid,\n name: fixture.name,\n children: [...new Set(tests)],\n befores,\n afters,\n });\n };\n\n #calculateTimings = (\n start?: number,\n stop?: number,\n duration?: number,\n ): {\n start?: number;\n stop?: number;\n } => {\n const result: { start?: number; stop?: number } = { start, stop };\n if (duration) {\n const normalisedDuration = Math.max(0, duration);\n if (result.stop !== undefined) {\n result.start = result.stop - normalisedDuration;\n } else if (result.start !== undefined) {\n result.stop = result.start + normalisedDuration;\n } else {\n result.stop = Date.now();\n result.start = result.stop - normalisedDuration;\n }\n } else {\n if (result.stop === undefined) {\n result.stop = Date.now();\n }\n if (result.start === undefined) {\n result.start = result.stop;\n }\n }\n return {\n start: result.start ? Math.round(result.start) : undefined,\n stop: result.stop ? Math.round(result.stop) : undefined,\n };\n };\n}\n"],"mappings":";;;;;;;;;AAAA;AACA,SAASA,OAAO,QAAQ,MAAM;AAC9B,SAKEC,KAAK,QAGA,gBAAgB;AAYvB,SAASC,cAAc,QAAQ,qBAAqB;AACpD,SAASC,QAAQ,QAAQ,eAAe;AACxC,SAASC,mBAAmB,EAAEC,gBAAgB,EAAEC,gBAAgB,QAAQ,cAAc;AACtF,SAASC,YAAY,QAAQ,eAAe;AAS5C,SAASC,SAAS,EAAEC,WAAW,EAAEC,sBAAsB,EAAEC,uBAAuB,EAAEC,UAAU,QAAQ,YAAY;AAChH,SAASC,uBAAuB,QAAQ,wBAAwB;AAChE,SAASC,aAAa,QAAQ,oBAAoB;AAclD,MAAMC,gBAAgB,CAAsB;EAAAC,YAAA;IAAAC,eAAA,sBACG,IAAIC,GAAG,CAAC,CAAC;IAAAD,eAAA,sBACX,IAAIC,GAAG,CAAC,CAAC;IAAAD,eAAA,gBAE5C,MAAY;MAClB,IAAI,CAACE,WAAW,CAACC,KAAK,CAAC,CAAC;MACxB,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC,CAAC;IAC1B,CAAC;IAAAH,eAAA,qBAEaK,QAAgB,IAAW;MACvC,IAAMC,UAAU,GAAG,IAAI,CAACJ,WAAW,CAACK,GAAG,CAACF,QAAQ,CAAC;MACjD,IAAI,CAACH,WAAW,CAACM,MAAM,CAACH,QAAQ,CAAC;MACjC,IAAIC,UAAU,EAAE;QACdA,UAAU,CAACG,OAAO,CAAEC,QAAQ,IAAK,IAAI,CAACN,WAAW,CAACI,MAAM,CAACE,QAAQ,CAAC,CAAC;MACrE;IACF,CAAC;IAAAV,eAAA,sBAEcK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AM,CAACE,OAAO,CAAC5I,YAAY,CAAC,CAAC6I,OAAO,CAACC,KAAA,IAAmB;QAAA,IAAlB,CAACvD,IAAI,EAAE3G,KAAK,CAAC,GAAAkK,KAAA;QACrE,IAAIN,KAAK,CAACC,OAAO,CAAC7J,KAAK,CAAC,EAAE;UACxB,OAAOA,KAAK,CAACkH,GAAG,CAAEiD,CAAC,KAAM;YAAExD,IAAI;YAAE3G,KAAK,EAAEmK;UAAE,CAAC,CAAC,CAAC;QAC/C;QAEA,OAAO;UACLxD,IAAI;UACJ3G;QACF,CAAC;MACH,CAAC,CAAC;IACJ;EACF;AA6jBF","ignoreList":[]}
1
+ {"version":3,"file":"ReporterRuntime.js","names":["extname","Stage","LifecycleState","Notifier","createFixtureResult","createStepResult","createTestResult","hasSkipLabel","deepClone","formatLinks","getTestResultHistoryId","getTestResultTestCaseId","randomUuid","buildAttachmentFileName","resolveWriter","_runningSteps","WeakMap","_ShallowStepsStack_brand","WeakSet","ShallowStepsStack","constructor","_classPrivateMethodInitSpec","_defineProperty","_classPrivateFieldInitSpec","startStep","step","stepResult","_objectSpread","_classPrivateGetter","_get_currentStep","steps","push","_classPrivateFieldGet","updateStep","updateFunc","console","error","stopStep","opts","stop","duration","result","start","undefined","pop","_this","length","DefaultStepStack","Map","stepsByRoot","clear","rootsByStep","rootUuid","maybeValue","get","delete","forEach","stepUuid","set","removeStep","newValue","filter","value","_handleMetadataMessage","_handleStepMetadataMessage","_handleStartStepMessage","_handleStopStepMessage","_handleAttachmentContentMessage","_handleAttachmentPathMessage","_findParent","_writeFixturesOfScope","_writeContainer","_calculateTimings","ReporterRuntime","_ref","_this2","writer","listeners","environmentInfo","categories","links","globalLabels","uuid","state","setScope","scope","getScope","concat","call","deleteScope","scopeUuid","type","fixtureResult","wrappedFixture","setFixtureResult","Date","now","fixtures","fixture","getFixtureResult","startStop","stage","FINISHED","scopeUuids","arguments","testResult","notifier","beforeTestResultStart","tests","setTestResult","afterTestResultStart","getTestResult","beforeTestResultUpdate","afterTestResultUpdate","_testResult$testCaseI","_testResult$historyId","wrapped","getWrappedTestResult","beforeTestResultStop","labels","parameters","description","_testResult$descripti","descriptionHtml","_testResult$descripti2","testCaseId","historyId","afterTestResultStop","deleteTestResult","beforeTestResultWrite","writeResult","afterTestResultWrite","stepStack","currentStep","parentStepUuid","parent","JSON","stringify","setStepResult","addStep","getStepResult","beforeStepStop","afterStepStop","attachmentName","attachmentContentOrPath","options","_options$fileExtensio","isPath","fileExtension","attachmentFileName","contentType","writeAttachmentFromPath","writeAttachment","attachment","name","source","wrapInStep","timestamp","attachments","writeEnvironmentInfo","serializedCategories","map","c","messageRegex","RegExp","traceRegex","writeCategoriesDefinitions","messages","message","data","getWrappedFixtureResult","displayName","updateFixture","updateScope","linkConfig","updateTest","status","statusDetails","Buffer","from","content","encoding","path","root","getExecutionItem","_ref2","writtenFixtures","Set","has","deleteFixtureResult","add","befores","afters","writeGroup","children","normalisedDuration","Math","max","round","Array","isArray","Object","keys","entries","flatMap","_ref3","v"],"sources":["../../../../src/sdk/reporter/ReporterRuntime.ts"],"sourcesContent":["/* eslint max-lines: 0 */\nimport { extname } from \"path\";\nimport {\n type Attachment,\n type AttachmentOptions,\n type FixtureResult,\n type Label,\n Stage,\n type StepResult,\n type TestResult,\n} from \"../../model.js\";\nimport type {\n Category,\n EnvironmentInfo,\n RuntimeAttachmentContentMessage,\n RuntimeAttachmentPathMessage,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n} from \"../types.js\";\nimport { LifecycleState } from \"./LifecycleState.js\";\nimport { Notifier } from \"./Notifier.js\";\nimport { createFixtureResult, createStepResult, createTestResult } from \"./factory.js\";\nimport { hasSkipLabel } from \"./testplan.js\";\nimport type {\n FixtureResultWrapper,\n FixtureType,\n LinkConfig,\n ReporterRuntimeConfig,\n TestScope,\n Writer,\n} from \"./types.js\";\nimport { deepClone, formatLinks, getTestResultHistoryId, getTestResultTestCaseId, randomUuid } from \"./utils.js\";\nimport { buildAttachmentFileName } from \"./utils/attachments.js\";\nimport { resolveWriter } from \"./writer/loader.js\";\n\nexport interface StepStack {\n clear(): void;\n\n removeRoot(rootUuid: string): void;\n\n currentStep(rootUuid: string): string | undefined;\n\n addStep(rootUuid: string, stepUuid: string): void;\n\n removeStep(stepUuid: string): void;\n}\n\n/**\n * Simpler steps stack implementation that contains only the current steps without root nodes\n * Useful, when you need to create steps without binding them to a specific test or fixture\n * @example\n * ```js\n * const stack = new ShallowStepsStack();\n *\n * stack.startStep({ name: \"step 1\" });\n * stack.startStep({ name: \"step 1.1\" });\n * stack.stopStep({ status: Status.FAILED });\n * stack.stopStep({ status: Status.PASSED });\n * stack.steps // => [{ name: \"step 1\", status: Status.PASSED, steps: [{ name: \"step 1.1\", status: Status.FAILED }] }]\n * ```\n */\nexport class ShallowStepsStack {\n steps: StepResult[] = [];\n\n #runningSteps: StepResult[] = [];\n\n get #currentStep() {\n return this.#runningSteps[this.#runningSteps.length - 1];\n }\n\n startStep(step: Partial<StepResult>) {\n const stepResult: StepResult = {\n ...createStepResult(),\n ...step,\n };\n\n if (this.#currentStep) {\n this.#currentStep.steps.push(stepResult);\n } else {\n this.steps.push(stepResult);\n }\n\n this.#runningSteps.push(stepResult);\n }\n\n updateStep(updateFunc: (result: StepResult) => void) {\n if (!this.#currentStep) {\n // eslint-disable-next-line no-console\n console.error(\"There is no running step in the stack to update!\");\n return;\n }\n\n updateFunc(this.#currentStep);\n }\n\n stopStep(opts?: { stop?: number; duration?: number }) {\n if (!this.#currentStep) {\n // eslint-disable-next-line no-console\n console.error(\"There is no running step in the stack to stop!\");\n return;\n }\n\n const { stop, duration = 0 } = opts ?? {};\n\n this.updateStep((result) => {\n result.stop = stop ?? result.start ? result.start! + duration : undefined;\n });\n\n this.#runningSteps.pop();\n }\n}\n\nexport class DefaultStepStack implements StepStack {\n private stepsByRoot: Map<string, string[]> = new Map();\n private rootsByStep: Map<string, string> = new Map();\n\n clear = (): void => {\n this.stepsByRoot.clear();\n this.rootsByStep.clear();\n };\n\n removeRoot = (rootUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n this.stepsByRoot.delete(rootUuid);\n if (maybeValue) {\n maybeValue.forEach((stepUuid) => this.rootsByStep.delete(stepUuid));\n }\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n return maybeValue[maybeValue.length - 1];\n };\n\n addStep = (rootUuid: string, stepUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n this.stepsByRoot.set(rootUuid, [stepUuid]);\n } else {\n maybeValue.push(stepUuid);\n }\n this.rootsByStep.set(stepUuid, rootUuid);\n };\n\n removeStep(stepUuid: string) {\n const rootUuid = this.rootsByStep.get(stepUuid);\n if (!rootUuid) {\n return;\n }\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n const newValue = maybeValue.filter((value) => value !== stepUuid);\n this.stepsByRoot.set(rootUuid, newValue);\n }\n}\n\nexport class ReporterRuntime {\n private readonly state = new LifecycleState();\n private notifier: Notifier;\n private stepStack: StepStack = new DefaultStepStack();\n writer: Writer;\n categories?: Category[];\n environmentInfo?: EnvironmentInfo;\n linkConfig?: LinkConfig;\n globalLabels: Label[] = [];\n\n constructor({\n writer,\n listeners = [],\n environmentInfo,\n categories,\n links,\n globalLabels = {},\n }: ReporterRuntimeConfig) {\n this.writer = resolveWriter(writer);\n this.notifier = new Notifier({ listeners });\n this.categories = categories;\n this.environmentInfo = environmentInfo;\n this.linkConfig = links;\n\n if (Array.isArray(globalLabels)) {\n this.globalLabels = globalLabels;\n } else if (Object.keys(globalLabels).length) {\n this.globalLabels = Object.entries(globalLabels).flatMap(([name, value]) => {\n if (Array.isArray(value)) {\n return value.map((v) => ({ name, value: v }));\n }\n\n return {\n name,\n value,\n };\n });\n }\n }\n\n startScope = (): string => {\n const uuid = randomUuid();\n this.state.setScope(uuid);\n return uuid;\n };\n\n updateScope = (uuid: string, updateFunc: (scope: TestScope) => void): void => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not update scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(scope);\n };\n\n writeScope = (uuid: string) => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not write scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n this.#writeFixturesOfScope(scope);\n this.state.deleteScope(scope.uuid);\n };\n\n startFixture = (scopeUuid: string, type: FixtureType, fixtureResult: Partial<FixtureResult>): string | undefined => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not start fixture: no scope with uuid ${scopeUuid} is found`);\n return;\n }\n\n const uuid = randomUuid();\n const wrappedFixture = this.state.setFixtureResult(scopeUuid, uuid, type, {\n ...createFixtureResult(),\n start: Date.now(),\n ...fixtureResult,\n });\n\n scope.fixtures.push(wrappedFixture);\n return uuid;\n };\n\n updateFixture = (uuid: string, updateFunc: (result: FixtureResult) => void): void => {\n const fixture = this.state.getFixtureResult(uuid);\n\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not update fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(fixture);\n };\n\n stopFixture = (uuid: string, opts?: { stop?: number; duration?: number }): void => {\n const fixture = this.state.getFixtureResult(uuid);\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not stop fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n const startStop = this.#calculateTimings(fixture.start, opts?.stop, opts?.duration);\n fixture.start = startStop.start;\n fixture.stop = startStop.stop;\n\n fixture.stage = Stage.FINISHED;\n };\n\n startTest = (result: Partial<TestResult>, scopeUuids: string[] = []): string => {\n const uuid = randomUuid();\n const testResult: TestResult = {\n ...createTestResult(uuid),\n start: Date.now(),\n ...deepClone(result),\n };\n\n this.notifier.beforeTestResultStart(testResult);\n\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not link test to the scope: no scope with uuid ${uuid} is found`);\n return;\n }\n scope.tests.push(uuid);\n });\n\n this.state.setTestResult(uuid, testResult, scopeUuids);\n this.notifier.afterTestResultStart(testResult);\n return uuid;\n };\n\n updateTest = (uuid: string, updateFunc: (result: TestResult) => void): void => {\n const testResult = this.state.getTestResult(uuid);\n\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not update test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n this.notifier.beforeTestResultUpdate(testResult);\n updateFunc(testResult);\n this.notifier.afterTestResultUpdate(testResult);\n };\n\n stopTest = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const wrapped = this.state.getWrappedTestResult(uuid);\n if (!wrapped) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n const testResult = wrapped.value;\n\n this.notifier.beforeTestResultStop(testResult);\n\n const scopeUuids = wrapped.scopeUuids;\n\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n\n if (scope?.labels) {\n testResult.labels = [...testResult.labels, ...scope.labels];\n }\n\n if (scope?.links) {\n testResult.links = [...testResult.links, ...scope.links];\n }\n\n if (scope?.parameters) {\n testResult.parameters = [...testResult.parameters, ...scope.parameters];\n }\n\n if (scope?.description) {\n testResult.description = testResult.description ?? scope.description;\n }\n\n if (scope?.descriptionHtml) {\n testResult.descriptionHtml = testResult.descriptionHtml ?? scope.descriptionHtml;\n }\n });\n\n testResult.labels = [...this.globalLabels, ...testResult.labels];\n\n testResult.testCaseId ??= getTestResultTestCaseId(testResult);\n testResult.historyId ??= getTestResultHistoryId(testResult);\n\n const startStop = this.#calculateTimings(testResult.start, opts?.stop, opts?.duration);\n\n testResult.start = startStop.start;\n testResult.stop = startStop.stop;\n\n this.notifier.afterTestResultStop(testResult);\n };\n\n writeTest = (uuid: string) => {\n const testResult = this.state.getTestResult(uuid);\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not write test result: no test with uuid ${uuid} is found`);\n return;\n }\n\n if (hasSkipLabel(testResult.labels)) {\n this.state.deleteTestResult(uuid);\n return;\n }\n\n this.notifier.beforeTestResultWrite(testResult);\n\n this.writer.writeResult(testResult);\n this.state.deleteTestResult(uuid);\n\n this.notifier.afterTestResultWrite(testResult);\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n return this.stepStack.currentStep(rootUuid);\n };\n\n startStep = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n result: Partial<StepResult>,\n ): string | undefined => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not start test step: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n const stepResult: StepResult = {\n ...createStepResult(),\n start: Date.now(),\n ...result,\n };\n parent.steps.push(stepResult);\n const stepUuid = randomUuid();\n this.state.setStepResult(stepUuid, stepResult);\n\n this.stepStack.addStep(rootUuid, stepUuid);\n\n return stepUuid;\n };\n\n updateStep = (uuid: string, updateFunc: (stepResult: StepResult) => void) => {\n const step = this.state.getStepResult(uuid)!;\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not update test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(step);\n };\n\n stopStep = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const step = this.state.getStepResult(uuid);\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n this.notifier.beforeStepStop(step);\n\n const startStop = this.#calculateTimings(step.start, opts?.stop, opts?.duration);\n step.start = startStop.start;\n step.stop = startStop.stop;\n\n step.stage = Stage.FINISHED;\n\n this.stepStack.removeStep(uuid);\n\n this.notifier.afterStepStop(step);\n };\n\n writeAttachment = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n attachmentName: string,\n attachmentContentOrPath: Buffer | string,\n options: AttachmentOptions & { wrapInStep?: boolean; timestamp?: number },\n ) => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not write test attachment: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n\n const isPath = typeof attachmentContentOrPath === \"string\";\n const fileExtension = options.fileExtension ?? (isPath ? extname(attachmentContentOrPath) : undefined);\n const attachmentFileName = buildAttachmentFileName({\n contentType: options.contentType,\n fileExtension,\n });\n\n if (isPath) {\n this.writer.writeAttachmentFromPath(attachmentFileName, attachmentContentOrPath);\n } else {\n this.writer.writeAttachment(attachmentFileName, attachmentContentOrPath);\n }\n\n const attachment: Attachment = {\n name: attachmentName,\n source: attachmentFileName,\n type: options.contentType,\n };\n\n if (options.wrapInStep) {\n const { timestamp = Date.now() } = options;\n parent.steps.push({\n name: attachmentName,\n attachments: [attachment],\n start: timestamp,\n stop: timestamp,\n } as StepResult);\n } else {\n parent.attachments.push(attachment);\n }\n };\n\n writeEnvironmentInfo = () => {\n if (!this.environmentInfo) {\n return;\n }\n\n this.writer.writeEnvironmentInfo(this.environmentInfo);\n };\n\n writeCategoriesDefinitions = () => {\n if (!this.categories) {\n return;\n }\n\n const serializedCategories = this.categories.map((c) => {\n if (c.messageRegex instanceof RegExp) {\n c.messageRegex = c.messageRegex.source;\n }\n\n if (c.traceRegex instanceof RegExp) {\n c.traceRegex = c.traceRegex.source;\n }\n\n return c;\n });\n\n this.writer.writeCategoriesDefinitions(serializedCategories);\n };\n\n applyRuntimeMessages = (rootUuid: string, messages: RuntimeMessage[]) => {\n messages.forEach((message) => {\n switch (message.type) {\n case \"metadata\":\n this.#handleMetadataMessage(rootUuid, message.data);\n return;\n case \"step_metadata\":\n this.#handleStepMetadataMessage(rootUuid, message.data);\n return;\n case \"step_start\":\n this.#handleStartStepMessage(rootUuid, message.data);\n return;\n case \"step_stop\":\n this.#handleStopStepMessage(rootUuid, message.data);\n return;\n case \"attachment_content\":\n this.#handleAttachmentContentMessage(rootUuid, message.data);\n return;\n case \"attachment_path\":\n this.#handleAttachmentPathMessage(rootUuid, message.data);\n return;\n default:\n // eslint-disable-next-line no-console\n console.error(`could not apply runtime messages: unknown message ${JSON.stringify(message)}`);\n return;\n }\n });\n };\n\n #handleMetadataMessage = (rootUuid: string, message: RuntimeMetadataMessage[\"data\"]) => {\n // only display name could be set to fixture.\n const fixtureResult = this.state.getWrappedFixtureResult(rootUuid);\n const { links, labels, parameters, displayName, testCaseId, historyId, description, descriptionHtml } = message;\n\n if (fixtureResult) {\n if (displayName) {\n this.updateFixture(rootUuid, (result) => {\n result.name = displayName;\n });\n }\n\n if (historyId) {\n // eslint-disable-next-line no-console\n console.error(\"historyId can't be changed within test fixtures\");\n }\n if (testCaseId) {\n // eslint-disable-next-line no-console\n console.error(\"testCaseId can't be changed within test fixtures\");\n }\n\n if (links || labels || parameters || description || descriptionHtml) {\n // in some frameworks, afterEach methods can be executed before test stop event, while\n // in others after. To remove the possible undetermined behaviour we only allow\n // using runtime metadata API in before hooks.\n if (fixtureResult.type === \"after\") {\n // eslint-disable-next-line no-console\n console.error(\"metadata messages isn't supported for after test fixtures\");\n return;\n }\n\n this.updateScope(fixtureResult.scopeUuid, (scope) => {\n if (links) {\n scope.links = [...scope.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n scope.labels = [...scope.labels, ...labels];\n }\n if (parameters) {\n scope.parameters = [...scope.parameters, ...parameters];\n }\n if (description) {\n scope.description = description;\n }\n if (descriptionHtml) {\n scope.descriptionHtml = descriptionHtml;\n }\n });\n }\n\n return;\n }\n\n this.updateTest(rootUuid, (result) => {\n if (links) {\n result.links = [...result.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n result.labels = [...result.labels, ...labels];\n }\n if (parameters) {\n result.parameters = [...result.parameters, ...parameters];\n }\n if (displayName) {\n result.name = displayName;\n }\n if (testCaseId) {\n result.testCaseId = testCaseId;\n }\n if (historyId) {\n result.historyId = historyId;\n }\n if (description) {\n result.description = description;\n }\n if (descriptionHtml) {\n result.descriptionHtml = descriptionHtml;\n }\n });\n };\n\n #handleStepMetadataMessage = (rootUuid: string, message: RuntimeStepMetadataMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step metadata message: no step is running\");\n return;\n }\n const { name, parameters } = message;\n this.updateStep(stepUuid, (stepResult) => {\n if (name) {\n stepResult.name = name;\n }\n if (parameters) {\n stepResult.parameters = [...stepResult.parameters, ...parameters];\n }\n });\n };\n\n #handleStartStepMessage = (rootUuid: string, message: RuntimeStartStepMessage[\"data\"]) => {\n this.startStep(rootUuid, undefined, { ...message });\n };\n\n #handleStopStepMessage = (rootUuid: string, message: RuntimeStopStepMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step stop message: no step is running\");\n return;\n }\n this.updateStep(stepUuid, (result) => {\n if (message.status && !result.status) {\n result.status = message.status;\n }\n if (message.statusDetails) {\n result.statusDetails = { ...result.statusDetails, ...message.statusDetails };\n }\n });\n this.stopStep(stepUuid, { stop: message.stop });\n };\n\n #handleAttachmentContentMessage = (rootUuid: string, message: RuntimeAttachmentContentMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, Buffer.from(message.content, message.encoding), {\n encoding: message.encoding,\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #handleAttachmentPathMessage = (rootUuid: string, message: RuntimeAttachmentPathMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, message.path, {\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #findParent = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n ): FixtureResult | TestResult | StepResult | undefined => {\n const root = this.state.getExecutionItem(rootUuid);\n if (!root) {\n return;\n }\n\n if (parentStepUuid === null) {\n return root;\n } else if (parentStepUuid === undefined) {\n const stepUuid = this.currentStep(rootUuid);\n return stepUuid ? this.state.getStepResult(stepUuid) : root;\n } else {\n return this.state.getStepResult(parentStepUuid);\n }\n };\n\n #writeFixturesOfScope = ({ fixtures, tests }: TestScope) => {\n const writtenFixtures = new Set<string>();\n if (tests.length) {\n for (const wrappedFixture of fixtures) {\n if (!writtenFixtures.has(wrappedFixture.uuid)) {\n this.#writeContainer(tests, wrappedFixture);\n this.state.deleteFixtureResult(wrappedFixture.uuid);\n writtenFixtures.add(wrappedFixture.uuid);\n }\n }\n }\n };\n\n #writeContainer = (tests: string[], wrappedFixture: FixtureResultWrapper) => {\n const fixture = wrappedFixture.value;\n const befores = wrappedFixture.type === \"before\" ? [wrappedFixture.value] : [];\n const afters = wrappedFixture.type === \"after\" ? [wrappedFixture.value] : [];\n this.writer.writeGroup({\n uuid: wrappedFixture.uuid,\n name: fixture.name,\n children: [...new Set(tests)],\n befores,\n afters,\n });\n };\n\n #calculateTimings = (\n start?: number,\n stop?: number,\n duration?: number,\n ): {\n start?: number;\n stop?: number;\n } => {\n const result: { start?: number; stop?: number } = { start, stop };\n if (duration) {\n const normalisedDuration = Math.max(0, duration);\n if (result.stop !== undefined) {\n result.start = result.stop - normalisedDuration;\n } else if (result.start !== undefined) {\n result.stop = result.start + normalisedDuration;\n } else {\n result.stop = Date.now();\n result.start = result.stop - normalisedDuration;\n }\n } else {\n if (result.stop === undefined) {\n result.stop = Date.now();\n }\n if (result.start === undefined) {\n result.start = result.stop;\n }\n }\n return {\n start: result.start ? Math.round(result.start) : undefined,\n stop: result.stop ? Math.round(result.stop) : und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C,IAAI,CAAC8B,QAAQ,GAAG,IAAIvG,QAAQ,CAAC;MAAE0E;IAAU,CAAC,CAAC;IAC3C,IAAI,CAACE,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACD,eAAe,GAAGA,eAAe;IACtC,IAAI,CAACgG,UAAU,GAAG9F,MAAK;IAEvB,IAAIuH,KAAK,CAACC,OAAO,CAACvH,YAAY,CAAC,EAAE;MAC/B,IAAI,CAACA,YAAY,GAAGA,YAAY;IAClC,CAAC,MAAM,IAAIwH,MAAM,CAACC,IAAI,CAACzH,YAAY,CAAC,CAACnC,MAAM,EAAE;MAC3C,IAAI,CAACmC,YAAY,GAAGwH,MAAM,CAACE,OAAO,CAAC1H,YAAY,CAAC,CAAC2H,OAAO,CAACC,KAAA,IAAmB;QAAA,IAAlB,CAACnD,IAAI,EAAE5F,KAAK,CAAC,GAAA+I,KAAA;QACrE,IAAIN,KAAK,CAACC,OAAO,CAAC1I,KAAK,CAAC,EAAE;UACxB,OAAOA,KAAK,CAACmG,GAAG,CAAE6C,CAAC,KAAM;YAAEpD,IAAI;YAAE5F,KAAK,EAAEgJ;UAAE,CAAC,CAAC,CAAC;QAC/C;QAEA,OAAO;UACLpD,IAAI;UACJ5F;QACF,CAAC;MACH,CAAC,CAAC;IACJ;EACF;AA6jBF","ignoreList":[]}
@@ -3,7 +3,7 @@ export * from "./utils.js";
3
3
  export * from "./testplan.js";
4
4
  export * from "./factory.js";
5
5
  export { LifecycleState } from "./LifecycleState.js";
6
- export { ReporterRuntime } from "./ReporterRuntime.js";
6
+ export { DefaultStepStack, ReporterRuntime, ShallowStepsStack } from "./ReporterRuntime.js";
7
7
  export { InMemoryWriter } from "./writer/InMemoryWriter.js";
8
8
  export { FileSystemWriter } from "./writer/FileSystemWriter.js";
9
9
  export { MessageWriter } from "./writer/MessageWriter.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ALLURE_METADATA_CONTENT_TYPE","ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE","LifecycleState","ReporterRuntime","InMemoryWriter","FileSystemWriter","MessageWriter","MessageReader","getEnvironmentLabels","getHostLabel","getThreadLabel","getPackageLabel","getLanguageLabel","getFrameworkLabel","parseEnvInfo","stringifyEnvInfo"],"sources":["../../../../src/sdk/reporter/index.ts"],"sourcesContent":["export type * from \"./types.js\";\nexport { ALLURE_METADATA_CONTENT_TYPE, ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE } from \"./types.js\";\nexport * from \"./utils.js\";\nexport * from \"./testplan.js\";\nexport * from \"./factory.js\";\nexport { LifecycleState } from \"./LifecycleState.js\";\nexport { ReporterRuntime } from \"./ReporterRuntime.js\";\nexport { InMemoryWriter } from \"./writer/InMemoryWriter.js\";\nexport { FileSystemWriter } from \"./writer/FileSystemWriter.js\";\nexport { MessageWriter } from \"./writer/MessageWriter.js\";\nexport { MessageReader } from \"./writer/MessageReader.js\";\nexport {\n getEnvironmentLabels,\n getHostLabel,\n getThreadLabel,\n getPackageLabel,\n getLanguageLabel,\n getFrameworkLabel,\n} from \"./utils/labels.js\";\nexport { parseEnvInfo, stringifyEnvInfo } from \"./utils/envInfo.js\";\n"],"mappings":"AACA,SAASA,4BAA4B,EAAEC,mCAAmC,QAAQ,YAAY;AAC9F,cAAc,YAAY;AAC1B,cAAc,eAAe;AAC7B,cAAc,cAAc;AAC5B,SAASC,cAAc,QAAQ,qBAAqB;AACpD,SAASC,eAAe,QAAQ,sBAAsB;AACtD,SAASC,cAAc,QAAQ,4BAA4B;AAC3D,SAASC,gBAAgB,QAAQ,8BAA8B;AAC/D,SAASC,aAAa,QAAQ,2BAA2B;AACzD,SAASC,aAAa,QAAQ,2BAA2B;AACzD,SACEC,oBAAoB,EACpBC,YAAY,EACZC,cAAc,EACdC,eAAe,EACfC,gBAAgB,EAChBC,iBAAiB,QACZ,mBAAmB;AAC1B,SAASC,YAAY,EAAEC,gBAAgB,QAAQ,oBAAoB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["ALLURE_METADATA_CONTENT_TYPE","ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE","LifecycleState","DefaultStepStack","ReporterRuntime","ShallowStepsStack","InMemoryWriter","FileSystemWriter","MessageWriter","MessageReader","getEnvironmentLabels","getHostLabel","getThreadLabel","getPackageLabel","getLanguageLabel","getFrameworkLabel","parseEnvInfo","stringifyEnvInfo"],"sources":["../../../../src/sdk/reporter/index.ts"],"sourcesContent":["export type * from \"./types.js\";\nexport { ALLURE_METADATA_CONTENT_TYPE, ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE } from \"./types.js\";\nexport * from \"./utils.js\";\nexport * from \"./testplan.js\";\nexport * from \"./factory.js\";\nexport { LifecycleState } from \"./LifecycleState.js\";\nexport { type StepStack, DefaultStepStack, ReporterRuntime, ShallowStepsStack } from \"./ReporterRuntime.js\";\nexport { InMemoryWriter } from \"./writer/InMemoryWriter.js\";\nexport { FileSystemWriter } from \"./writer/FileSystemWriter.js\";\nexport { MessageWriter } from \"./writer/MessageWriter.js\";\nexport { MessageReader } from \"./writer/MessageReader.js\";\nexport {\n getEnvironmentLabels,\n getHostLabel,\n getThreadLabel,\n getPackageLabel,\n getLanguageLabel,\n getFrameworkLabel,\n} from \"./utils/labels.js\";\nexport { parseEnvInfo, stringifyEnvInfo } from \"./utils/envInfo.js\";\n"],"mappings":"AACA,SAASA,4BAA4B,EAAEC,mCAAmC,QAAQ,YAAY;AAC9F,cAAc,YAAY;AAC1B,cAAc,eAAe;AAC7B,cAAc,cAAc;AAC5B,SAASC,cAAc,QAAQ,qBAAqB;AACpD,SAAyBC,gBAAgB,EAAEC,eAAe,EAAEC,iBAAiB,QAAQ,sBAAsB;AAC3G,SAASC,cAAc,QAAQ,4BAA4B;AAC3D,SAASC,gBAAgB,QAAQ,8BAA8B;AAC/D,SAASC,aAAa,QAAQ,2BAA2B;AACzD,SAASC,aAAa,QAAQ,2BAA2B;AACzD,SACEC,oBAAoB,EACpBC,YAAY,EACZC,cAAc,EACdC,eAAe,EACfC,gBAAgB,EAChBC,iBAAiB,QACZ,mBAAmB;AAC1B,SAASC,YAAY,EAAEC,gBAAgB,QAAQ,oBAAoB","ignoreList":[]}
@@ -624,6 +624,7 @@ export var EXTENSIONS_BY_TYPE = {
624
624
  "application/xspf+xml": ".xspf",
625
625
  "application/xv+xml": ".mxml",
626
626
  "application/zip": ".zip",
627
+ "application/vnd.allure.playwright-trace": ".zip",
627
628
  "application/zstd": ".zst",
628
629
  "audio/ac3": ".ac3",
629
630
  "audio/adpcm": ".adp",