allure-js-commons 3.14.0 → 3.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/README.md +14 -1
  2. package/dist/cjs/facade.js +37 -1
  3. package/dist/cjs/facade.js.map +1 -1
  4. package/dist/cjs/index.js +36 -0
  5. package/dist/cjs/index.js.map +1 -1
  6. package/dist/cjs/model.js +6 -2
  7. package/dist/cjs/model.js.map +1 -1
  8. package/dist/cjs/sdk/index.js.map +1 -1
  9. package/dist/cjs/sdk/reporter/ReporterRuntime.js +76 -18
  10. package/dist/cjs/sdk/reporter/ReporterRuntime.js.map +1 -1
  11. package/dist/cjs/sdk/reporter/index.js.map +1 -1
  12. package/dist/cjs/sdk/reporter/testplan.js +17 -8
  13. package/dist/cjs/sdk/reporter/testplan.js.map +1 -1
  14. package/dist/cjs/sdk/reporter/types.js.map +1 -1
  15. package/dist/cjs/sdk/reporter/utils.js +12 -1
  16. package/dist/cjs/sdk/reporter/utils.js.map +1 -1
  17. package/dist/cjs/sdk/reporter/writer/FileSystemWriter.js +1 -1
  18. package/dist/cjs/sdk/reporter/writer/FileSystemWriter.js.map +1 -1
  19. package/dist/cjs/sdk/reporter/writer/InMemoryWriter.js +4 -5
  20. package/dist/cjs/sdk/reporter/writer/InMemoryWriter.js.map +1 -1
  21. package/dist/cjs/sdk/reporter/writer/MessageReader.js +10 -8
  22. package/dist/cjs/sdk/reporter/writer/MessageReader.js.map +1 -1
  23. package/dist/cjs/sdk/reporter/writer/MessageWriter.js +2 -2
  24. package/dist/cjs/sdk/reporter/writer/MessageWriter.js.map +1 -1
  25. package/dist/cjs/sdk/runtime/MessageTestRuntime.js +98 -30
  26. package/dist/cjs/sdk/runtime/MessageTestRuntime.js.map +1 -1
  27. package/dist/cjs/sdk/runtime/NoopTestRuntime.js +48 -12
  28. package/dist/cjs/sdk/runtime/NoopTestRuntime.js.map +1 -1
  29. package/dist/cjs/sdk/runtime/types.js.map +1 -1
  30. package/dist/cjs/sdk/types.js.map +1 -1
  31. package/dist/cjs/sdk/utils.js +9 -7
  32. package/dist/cjs/sdk/utils.js.map +1 -1
  33. package/dist/cjs/sync.js +24 -0
  34. package/dist/cjs/sync.js.map +1 -1
  35. package/dist/cjs/syncFacade.js +17 -1
  36. package/dist/cjs/syncFacade.js.map +1 -1
  37. package/dist/esm/facade.js +31 -0
  38. package/dist/esm/facade.js.map +1 -1
  39. package/dist/esm/index.js +2 -2
  40. package/dist/esm/index.js.map +1 -1
  41. package/dist/esm/model.js +6 -0
  42. package/dist/esm/model.js.map +1 -1
  43. package/dist/esm/sdk/index.js.map +1 -1
  44. package/dist/esm/sdk/reporter/ReporterRuntime.js +76 -18
  45. package/dist/esm/sdk/reporter/ReporterRuntime.js.map +1 -1
  46. package/dist/esm/sdk/reporter/index.js.map +1 -1
  47. package/dist/esm/sdk/reporter/testplan.js +17 -6
  48. package/dist/esm/sdk/reporter/testplan.js.map +1 -1
  49. package/dist/esm/sdk/reporter/types.js.map +1 -1
  50. package/dist/esm/sdk/reporter/utils.js +10 -1
  51. package/dist/esm/sdk/reporter/utils.js.map +1 -1
  52. package/dist/esm/sdk/reporter/writer/FileSystemWriter.js +1 -1
  53. package/dist/esm/sdk/reporter/writer/FileSystemWriter.js.map +1 -1
  54. package/dist/esm/sdk/reporter/writer/InMemoryWriter.js +4 -5
  55. package/dist/esm/sdk/reporter/writer/InMemoryWriter.js.map +1 -1
  56. package/dist/esm/sdk/reporter/writer/MessageReader.js +10 -8
  57. package/dist/esm/sdk/reporter/writer/MessageReader.js.map +1 -1
  58. package/dist/esm/sdk/reporter/writer/MessageWriter.js +2 -2
  59. package/dist/esm/sdk/reporter/writer/MessageWriter.js.map +1 -1
  60. package/dist/esm/sdk/runtime/MessageTestRuntime.js +98 -30
  61. package/dist/esm/sdk/runtime/MessageTestRuntime.js.map +1 -1
  62. package/dist/esm/sdk/runtime/NoopTestRuntime.js +48 -12
  63. package/dist/esm/sdk/runtime/NoopTestRuntime.js.map +1 -1
  64. package/dist/esm/sdk/runtime/types.js.map +1 -1
  65. package/dist/esm/sdk/types.js.map +1 -1
  66. package/dist/esm/sdk/utils.js +9 -6
  67. package/dist/esm/sdk/utils.js.map +1 -1
  68. package/dist/esm/sync.js +1 -1
  69. package/dist/esm/sync.js.map +1 -1
  70. package/dist/esm/syncFacade.js +12 -0
  71. package/dist/esm/syncFacade.js.map +1 -1
  72. package/dist/types/facade.d.ts +6 -0
  73. package/dist/types/index.d.ts +3 -3
  74. package/dist/types/model.d.ts +9 -1
  75. package/dist/types/sdk/index.d.ts +1 -1
  76. package/dist/types/sdk/reporter/ReporterRuntime.d.ts +11 -1
  77. package/dist/types/sdk/reporter/index.d.ts +1 -1
  78. package/dist/types/sdk/reporter/testplan.d.ts +5 -1
  79. package/dist/types/sdk/reporter/types.d.ts +6 -2
  80. package/dist/types/sdk/reporter/utils.d.ts +3 -0
  81. package/dist/types/sdk/reporter/writer/FileSystemWriter.d.ts +2 -2
  82. package/dist/types/sdk/reporter/writer/InMemoryWriter.d.ts +3 -3
  83. package/dist/types/sdk/reporter/writer/MessageWriter.d.ts +2 -2
  84. package/dist/types/sdk/runtime/MessageTestRuntime.d.ts +6 -2
  85. package/dist/types/sdk/runtime/NoopTestRuntime.d.ts +9 -1
  86. package/dist/types/sdk/runtime/types.d.ts +10 -2
  87. package/dist/types/sdk/types.d.ts +10 -5
  88. package/dist/types/sdk/utils.d.ts +4 -3
  89. package/dist/types/sync.d.ts +1 -1
  90. package/dist/types/syncFacade.d.ts +4 -0
  91. package/package.json +2 -5
@@ -1 +1 @@
1
- {"version":3,"file":"ReporterRuntime.js","names":["_nodePath","_interopRequireDefault","require","_path","_model","_factory","_LifecycleState","_Notifier","_testplan","_utils","_attachments","_loader","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_classPrivateMethodInitSpec","a","_checkPrivateRedeclaration","add","_classPrivateFieldInitSpec","set","has","TypeError","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","String","Number","_classPrivateGetter","s","_assertClassBrand","_classPrivateFieldGet","get","n","_runningSteps","WeakMap","_ShallowStepsStack_brand","WeakSet","ShallowStepsStack","constructor","currentStep","_get_currentStep","startStep","step","stepResult","createStepResult","steps","updateStep","updateFunc","console","error","stopStep","opts","stop","duration","result","start","undefined","pop","findStepByUuid","uuid","findRecursively","found","addAttachment","attachment","writer","isPath","path","fileExt","extname","fileName","buildAttachmentFileName","contentType","fileExtension","writeAttachmentFromPath","body","writeAttachment","exports","_this","DefaultStepStack","Map","stepsByRoot","clear","rootsByStep","rootUuid","maybeValue","delete","stepUuid","removeStep","newValue","_handleMetadataMessage","_handleStepMetadataMessage","_handleStartStepMessage","_handleStopStepMessage","_handleAttachmentContentMessage","_handleAttachmentPathMessage","_handleGlobalAttachmentContentMessage","_handleGlobalAttachmentPathMessage","_handleGlobalErrorMessage","_handlePerformanceResultMessage","_findParent","_writeAttachmentFile","_createAttachment","_createGlobalAttachment","_writeGlobals","_writeFixturesOfScope","_writeContainer","_calculateTimings","ReporterRuntime","_ref","_this2","listeners","environmentInfo","categories","links","globalLabels","LifecycleState","randomUuid","state","setScope","scope","getScope","concat","deleteScope","scopeUuid","type","fixtureResult","wrappedFixture","setFixtureResult","createFixtureResult","Date","now","fixtures","fixture","getFixtureResult","startStop","stage","Stage","FINISHED","scopeUuids","testResult","createTestResult","deepClone","notifier","beforeTestResultStart","tests","setTestResult","afterTestResultStart","getTestResult","beforeTestResultUpdate","afterTestResultUpdate","_testResult$testCaseI","_testResult$historyId","wrapped","getWrappedTestResult","beforeTestResultStop","labels","parameters","description","_testResult$descripti","descriptionHtml","_testResult$descripti2","testCaseId","getTestResultTestCaseId","historyId","getTestResultHistoryId","afterTestResultStop","hasSkipLabel","deleteTestResult","beforeTestResultWrite","writeResult","afterTestResultWrite","stepStack","parentStepUuid","parent","JSON","stringify","setStepResult","addStep","getStepResult","beforeStepStop","afterStepStop","attachmentName","attachmentContentOrPath","options","_options$fileExtensio","attachmentFileName","wrapInStep","timestamp","name","attachments","writeEnvironmentInfo","serializedCategories","map","c","messageRegex","RegExp","source","traceRegex","writeCategoriesDefinitions","messages","message","data","getWrappedFixtureResult","displayName","updateFixture","updateScope","linkConfig","formatLinks","updateTest","status","statusDetails","Buffer","from","content","encoding","attachmentContent","attachmentSource","errors","_message$fileExtensio","results","_this$writer$writePer","_this$writer","writePerformanceResults","root","getExecutionItem","globals","writeGlobals","_ref2","writtenFixtures","Set","deleteFixtureResult","befores","afters","writeGroup","children","normalisedDuration","Math","max","round","resolveWriter","Notifier","Array","isArray","entries","flatMap","_ref3","v"],"sources":["../../../../src/sdk/reporter/ReporterRuntime.ts"],"sourcesContent":["/* eslint max-lines: 0 */\nimport path from \"node:path\";\nimport { extname } from \"path\";\n\nimport {\n type Attachment,\n type AttachmentOptions,\n type FixtureResult,\n type Globals,\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 RuntimeGlobalAttachmentContentMessage,\n RuntimeGlobalAttachmentPathMessage,\n RuntimeGlobalErrorMessage,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimePerformanceResultMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n} from \"../types.js\";\nimport { createFixtureResult, createStepResult, createTestResult } from \"./factory.js\";\nimport { LifecycleState } from \"./LifecycleState.js\";\nimport { Notifier } from \"./Notifier.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 currentStep() {\n return this.#currentStep;\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 findStepByUuid(uuid: string): StepResult | undefined {\n const findRecursively = (steps: StepResult[]): StepResult | undefined => {\n for (const s of steps) {\n if (s.uuid === uuid) {\n return s;\n }\n const found = findRecursively(s.steps);\n if (found) {\n return found;\n }\n }\n return undefined;\n };\n return findRecursively(this.steps);\n }\n\n addAttachment(attachment: AttachmentOptions, writer: Writer) {\n const isPath = !!attachment.path;\n const fileExt = attachment.path ? path.extname(attachment.path) : undefined;\n const fileName = buildAttachmentFileName({\n contentType: attachment.contentType,\n fileExtension: fileExt,\n });\n if (isPath) {\n writer.writeAttachmentFromPath(fileName, attachment.path as string);\n } else if (attachment.body) {\n writer.writeAttachment(fileName, attachment.body);\n }\n return fileName;\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 attachmentFileName = this.#writeAttachmentFile(attachmentContentOrPath, {\n ...options,\n fileExtension: options.fileExtension ?? (isPath ? extname(attachmentContentOrPath) : undefined),\n });\n const attachment = this.#createAttachment(attachmentName, options.contentType, attachmentFileName);\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 case \"global_attachment_content\":\n this.#handleGlobalAttachmentContentMessage(message.data);\n return;\n case \"global_attachment_path\":\n this.#handleGlobalAttachmentPathMessage(message.data);\n return;\n case \"global_error\":\n this.#handleGlobalErrorMessage(message.data);\n return;\n case \"performance_result\":\n this.#handlePerformanceResultMessage(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 applyGlobalRuntimeMessages = (messages: RuntimeMessage[]) => {\n messages.forEach((message) => {\n switch (message.type) {\n case \"global_attachment_content\":\n this.#handleGlobalAttachmentContentMessage(message.data);\n break;\n case \"global_attachment_path\":\n this.#handleGlobalAttachmentPathMessage(message.data);\n break;\n case \"global_error\":\n this.#handleGlobalErrorMessage(message.data);\n break;\n case \"performance_result\":\n this.#handlePerformanceResultMessage(message.data);\n break;\n default:\n break;\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 #handleGlobalAttachmentContentMessage = (message: RuntimeGlobalAttachmentContentMessage[\"data\"]) => {\n const attachmentContent = Buffer.from(message.content, message.encoding);\n const attachmentSource = this.#writeAttachmentFile(attachmentContent, {\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n });\n\n this.#writeGlobals({\n attachments: [this.#createGlobalAttachment(message.name, message.contentType, attachmentSource)],\n errors: [],\n });\n };\n\n #handleGlobalAttachmentPathMessage = (message: RuntimeGlobalAttachmentPathMessage[\"data\"]) => {\n const attachmentSource = this.#writeAttachmentFile(message.path, {\n contentType: message.contentType,\n fileExtension: message.fileExtension ?? extname(message.path),\n });\n\n this.#writeGlobals({\n attachments: [this.#createGlobalAttachment(message.name, message.contentType, attachmentSource)],\n errors: [],\n });\n };\n\n #handleGlobalErrorMessage = (message: RuntimeGlobalErrorMessage[\"data\"]) => {\n this.#writeGlobals({\n attachments: [],\n errors: [{ ...message, timestamp: Date.now() }],\n });\n };\n\n #handlePerformanceResultMessage = (results: RuntimePerformanceResultMessage[\"data\"]) => {\n this.writer.writePerformanceResults?.(`${randomUuid()}-perf.json`, results);\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 #writeAttachmentFile = (\n attachmentContentOrPath: Buffer | string,\n options: Pick<AttachmentOptions, \"contentType\" | \"fileExtension\">,\n ) => {\n const isPath = typeof attachmentContentOrPath === \"string\";\n const attachmentFileName = buildAttachmentFileName({\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n });\n\n if (isPath) {\n this.writer.writeAttachmentFromPath(attachmentFileName, attachmentContentOrPath);\n } else {\n this.writer.writeAttachment(attachmentFileName, attachmentContentOrPath);\n }\n\n return attachmentFileName;\n };\n\n #createAttachment = (name: string, contentType: string, source: string): Attachment => ({\n name,\n source,\n type: contentType,\n });\n\n #createGlobalAttachment = (name: string, contentType: string, source: string): Globals[\"attachments\"][number] => ({\n ...this.#createAttachment(name, contentType, source),\n timestamp: Date.now(),\n });\n\n #writeGlobals = (globals: Globals): void => {\n this.writer.writeGlobals(`${randomUuid()}-globals.json`, globals);\n };\n\n #writeFixturesOfScope = ({ fixtures, tests }: TestScope) => {\n const writtenFixtures = new Set<string>();\n if (tests.length) {\n for (const wrappedFixture of fixtures) {\n if (!writtenFixtures.has(wrappedFixture.uuid)) {\n this.#writeContainer(tests, wrappedFixture);\n this.state.deleteFixtureResult(wrappedFixture.uuid);\n writtenFixtures.add(wrappedFixture.uuid);\n }\n }\n }\n };\n\n #writeContainer = (tests: string[], wrappedFixture: FixtureResultWrapper) => {\n const fixture = wrappedFixture.value;\n const befores = wrappedFixture.type === \"before\" ? [wrappedFixture.value] : [];\n const afters = wrappedFixture.type === \"after\" ? [wrappedFixture.value] : [];\n this.writer.writeGroup({\n uuid: wrappedFixture.uuid,\n name: fixture.name,\n children: [...new Set(tests)],\n befores,\n afters,\n });\n };\n\n #calculateTimings = (\n start?: number,\n stop?: number,\n duration?: number,\n ): {\n start?: number;\n stop?: number;\n } => {\n const result: { start?: number; stop?: number } = { start, stop };\n if (duration) {\n const normalisedDuration = Math.max(0, duration);\n if (result.stop !== undefined) {\n result.start = result.stop - normalisedDuration;\n } else if (result.start !== undefined) {\n result.stop = result.start + normalisedDuration;\n } else {\n result.stop = Date.now();\n result.start = result.stop - normalisedDuration;\n }\n } else {\n if (result.stop === undefined) {\n result.stop = Date.now();\n }\n if (result.start === undefined) {\n result.start = result.stop;\n }\n }\n return {\n start: result.start ? Math.round(result.start) : undefined,\n stop: result.stop ? Math.round(result.stop) : undefined,\n };\n };\n}\n"],"mappings":";;;;;;AACA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAyBA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AASA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AAAmD,SAAAD,uBAAAW,CAAA,WAAAA,CAAA,IAAAA,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,IAAlB,CAACzD,IAAI,EAAE3K,KAAK,CAAC,GAAAoO,KAAA;QACrE,IAAIJ,KAAK,CAACC,OAAO,CAACjO,KAAK,CAAC,EAAE;UACxB,OAAOA,KAAK,CAAC+K,GAAG,CAAEsD,CAAC,KAAM;YAAE1D,IAAI;YAAE3K,KAAK,EAAEqO;UAAE,CAAC,CAAC,CAAC;QAC/C;QAEA,OAAO;UACL1D,IAAI;UACJ3K;QACF,CAAC;MACH,CAAC,CAAC;IACJ;EACF;AAwpBF;AAAC2D,OAAA,CAAA+B,eAAA,GAAAA,eAAA","ignoreList":[]}
1
+ {"version":3,"file":"ReporterRuntime.js","names":["_nodePath","_interopRequireDefault","require","_path","_model","_factory","_LifecycleState","_Notifier","_testplan","_utils","_attachments","_loader","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_classPrivateMethodInitSpec","a","_checkPrivateRedeclaration","add","_classPrivateFieldInitSpec","set","has","TypeError","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","String","Number","_classPrivateGetter","s","_assertClassBrand","_classPrivateFieldGet","get","n","attachmentReferenceBrand","_runningSteps","WeakMap","_ShallowStepsStack_brand","WeakSet","ShallowStepsStack","constructor","currentStep","_get_currentStep","startStep","step","stepResult","createStepResult","steps","updateStep","updateFunc","console","error","stopStep","opts","stop","duration","result","start","undefined","pop","findStepByUuid","uuid","findRecursively","found","addAttachment","attachment","writer","isPath","path","fileExt","extname","fileName","buildAttachmentFileName","contentType","fileExtension","writeAttachmentFromPath","body","writeAttachment","exports","_this","DefaultStepStack","Map","stepsByRoot","clear","rootsByStep","rootUuid","maybeValue","delete","stepUuid","removeStep","newValue","_emittedAttachments","_handleMetadataMessage","_handleStepMetadataMessage","_handleStartStepMessage","_handleStopStepMessage","_handleAttachmentContentMessage","_handleAttachmentPathMessage","_handleGlobalAttachmentContentMessage","_handleGlobalAttachmentPathMessage","_handleGlobalErrorMessage","_handleMetricResultMessage","_findParent","_writeAttachmentFile","_createAttachment","_createGlobalAttachment","_writeGlobals","_writeFixturesOfScope","_writeContainer","_calculateTimings","ReporterRuntime","_ref","_this2","listeners","environmentInfo","categories","links","globalLabels","LifecycleState","randomUuid","state","setScope","scope","getScope","concat","deleteScope","scopeUuid","type","fixtureResult","wrappedFixture","setFixtureResult","createFixtureResult","Date","now","fixtures","fixture","getFixtureResult","startStop","stage","Stage","FINISHED","scopeUuids","testResult","createTestResult","deepClone","notifier","beforeTestResultStart","tests","setTestResult","afterTestResultStart","getTestResult","beforeTestResultUpdate","afterTestResultUpdate","_testResult$testCaseI","_testResult$historyId","wrapped","getWrappedTestResult","beforeTestResultStop","labels","parameters","description","_testResult$descripti","descriptionHtml","_testResult$descripti2","precondition","_testResult$precondit","preconditionHtml","_testResult$precondit2","expectedResult","_testResult$expectedR","expectedResultHtml","_testResult$expectedR2","testCaseId","getTestResultTestCaseId","historyId","getTestResultHistoryId","afterTestResultStop","hasSkipLabel","deleteTestResult","beforeTestResultWrite","writeResult","afterTestResultWrite","stepStack","parentStepUuid","parent","JSON","stringify","setStepResult","addStep","getStepResult","beforeStepStop","afterStepStop","attachmentContentOrPath","options","source","reference","attachmentName","attachmentFileName","Buffer","isBuffer","Error","wrapInStep","timestamp","name","attachments","writeEnvironmentInfo","serializedCategories","map","c","messageRegex","RegExp","traceRegex","writeCategoriesDefinitions","messages","message","data","getWrappedFixtureResult","displayName","updateFixture","updateScope","linkConfig","formatLinks","updateTest","status","statusDetails","from","content","encoding","attachmentContent","attachmentSource","errors","results","_this$writer$writeMet","_this$writer","writeMetricResults","root","getExecutionItem","_options$fileExtensio","globals","writeGlobals","_ref2","writtenFixtures","Set","deleteFixtureResult","befores","afters","writeGroup","children","normalisedDuration","Math","max","round","resolveWriter","Notifier","Array","isArray","entries","flatMap","_ref3","v"],"sources":["../../../../src/sdk/reporter/ReporterRuntime.ts"],"sourcesContent":["/* eslint max-lines: 0 */\nimport path from \"node:path\";\nimport { extname } from \"path\";\n\nimport {\n type Attachment,\n type AttachmentOptions,\n type FixtureResult,\n type Globals,\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 RuntimeGlobalAttachmentContentMessage,\n RuntimeGlobalAttachmentPathMessage,\n RuntimeGlobalErrorMessage,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeMetricResultMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n} from \"../types.js\";\nimport { createFixtureResult, createStepResult, createTestResult } from \"./factory.js\";\nimport { LifecycleState } from \"./LifecycleState.js\";\nimport { Notifier } from \"./Notifier.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\nconst attachmentReferenceBrand = Symbol(\"AttachmentReference\");\n\nexport type AttachmentReference = { readonly [attachmentReferenceBrand]: true };\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 currentStep() {\n return this.#currentStep;\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 findStepByUuid(uuid: string): StepResult | undefined {\n const findRecursively = (steps: StepResult[]): StepResult | undefined => {\n for (const s of steps) {\n if (s.uuid === uuid) {\n return s;\n }\n const found = findRecursively(s.steps);\n if (found) {\n return found;\n }\n }\n return undefined;\n };\n return findRecursively(this.steps);\n }\n\n addAttachment(attachment: AttachmentOptions, writer: Writer) {\n const isPath = !!attachment.path;\n const fileExt = attachment.path ? path.extname(attachment.path) : undefined;\n const fileName = buildAttachmentFileName({\n contentType: attachment.contentType,\n fileExtension: fileExt,\n });\n if (isPath) {\n writer.writeAttachmentFromPath(fileName, attachment.path as string);\n } else if (attachment.body) {\n writer.writeAttachment(fileName, attachment.body);\n }\n return fileName;\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 readonly #emittedAttachments = new WeakMap<AttachmentReference, string>();\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 if (scope?.precondition) {\n testResult.precondition = testResult.precondition ?? scope.precondition;\n }\n\n if (scope?.preconditionHtml) {\n testResult.preconditionHtml = testResult.preconditionHtml ?? scope.preconditionHtml;\n }\n\n if (scope?.expectedResult) {\n testResult.expectedResult = testResult.expectedResult ?? scope.expectedResult;\n }\n\n if (scope?.expectedResultHtml) {\n testResult.expectedResultHtml = testResult.expectedResultHtml ?? scope.expectedResultHtml;\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 /**\n * Writes attachment bytes or copies a source file without linking it to a result.\n * Pass the returned reference to this runtime's writeAttachment to link it later.\n */\n emitAttachment = (\n attachmentContentOrPath: Buffer | string,\n options: Pick<AttachmentOptions, \"contentType\" | \"fileExtension\">,\n ): AttachmentReference => {\n const source = this.#writeAttachmentFile(attachmentContentOrPath, options);\n const reference: AttachmentReference = { [attachmentReferenceBrand]: true };\n this.#emittedAttachments.set(reference, source);\n return reference;\n };\n\n writeAttachment = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n attachmentName: string,\n attachmentContentOrPath: Buffer | string | AttachmentReference,\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 attachmentFileName =\n typeof attachmentContentOrPath === \"string\" || Buffer.isBuffer(attachmentContentOrPath)\n ? this.#writeAttachmentFile(attachmentContentOrPath, options)\n : this.#emittedAttachments.get(attachmentContentOrPath);\n if (!attachmentFileName) {\n throw new Error(\"Invalid attachment reference for this reporter runtime\");\n }\n const attachment = this.#createAttachment(attachmentName, options.contentType, attachmentFileName);\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 case \"global_attachment_content\":\n this.#handleGlobalAttachmentContentMessage(message.data);\n return;\n case \"global_attachment_path\":\n this.#handleGlobalAttachmentPathMessage(message.data);\n return;\n case \"global_error\":\n this.#handleGlobalErrorMessage(message.data);\n return;\n case \"metric_result\":\n this.#handleMetricResultMessage(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 applyGlobalRuntimeMessages = (messages: RuntimeMessage[]) => {\n messages.forEach((message) => {\n switch (message.type) {\n case \"global_attachment_content\":\n this.#handleGlobalAttachmentContentMessage(message.data);\n break;\n case \"global_attachment_path\":\n this.#handleGlobalAttachmentPathMessage(message.data);\n break;\n case \"global_error\":\n this.#handleGlobalErrorMessage(message.data);\n break;\n case \"metric_result\":\n this.#handleMetricResultMessage(message.data);\n break;\n default:\n break;\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 {\n links,\n labels,\n parameters,\n displayName,\n testCaseId,\n historyId,\n description,\n descriptionHtml,\n precondition,\n preconditionHtml,\n expectedResult,\n expectedResultHtml,\n } = 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 (\n links ||\n labels ||\n parameters ||\n description ||\n descriptionHtml ||\n precondition ||\n preconditionHtml ||\n expectedResult ||\n expectedResultHtml\n ) {\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 if (precondition) {\n scope.precondition = precondition;\n }\n if (preconditionHtml) {\n scope.preconditionHtml = preconditionHtml;\n }\n if (expectedResult) {\n scope.expectedResult = expectedResult;\n }\n if (expectedResultHtml) {\n scope.expectedResultHtml = expectedResultHtml;\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 if (precondition) {\n result.precondition = precondition;\n }\n if (preconditionHtml) {\n result.preconditionHtml = preconditionHtml;\n }\n if (expectedResult) {\n result.expectedResult = expectedResult;\n }\n if (expectedResultHtml) {\n result.expectedResultHtml = expectedResultHtml;\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 #handleGlobalAttachmentContentMessage = (message: RuntimeGlobalAttachmentContentMessage[\"data\"]) => {\n const attachmentContent = Buffer.from(message.content, message.encoding);\n const attachmentSource = this.#writeAttachmentFile(attachmentContent, {\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n });\n\n this.#writeGlobals({\n attachments: [this.#createGlobalAttachment(message.name, message.contentType, attachmentSource)],\n errors: [],\n });\n };\n\n #handleGlobalAttachmentPathMessage = (message: RuntimeGlobalAttachmentPathMessage[\"data\"]) => {\n const attachmentSource = this.#writeAttachmentFile(message.path, {\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n });\n\n this.#writeGlobals({\n attachments: [this.#createGlobalAttachment(message.name, message.contentType, attachmentSource)],\n errors: [],\n });\n };\n\n #handleGlobalErrorMessage = (message: RuntimeGlobalErrorMessage[\"data\"]) => {\n this.#writeGlobals({\n attachments: [],\n errors: [{ ...message, timestamp: Date.now() }],\n });\n };\n\n #handleMetricResultMessage = (results: RuntimeMetricResultMessage[\"data\"]) => {\n this.writer.writeMetricResults?.(`${randomUuid()}-metric.json`, results);\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 #writeAttachmentFile = (\n attachmentContentOrPath: Buffer | string,\n options: Pick<AttachmentOptions, \"contentType\" | \"fileExtension\">,\n ) => {\n const isPath = typeof attachmentContentOrPath === \"string\";\n const attachmentFileName = buildAttachmentFileName({\n contentType: options.contentType,\n fileExtension: options.fileExtension ?? (isPath ? extname(attachmentContentOrPath) : undefined),\n });\n\n if (isPath) {\n this.writer.writeAttachmentFromPath(attachmentFileName, attachmentContentOrPath);\n } else {\n this.writer.writeAttachment(attachmentFileName, attachmentContentOrPath);\n }\n\n return attachmentFileName;\n };\n\n #createAttachment = (name: string, contentType: string, source: string): Attachment => ({\n name,\n source,\n type: contentType,\n });\n\n #createGlobalAttachment = (name: string, contentType: string, source: string): Globals[\"attachments\"][number] => ({\n ...this.#createAttachment(name, contentType, source),\n timestamp: Date.now(),\n });\n\n #writeGlobals = (globals: Globals): void => {\n this.writer.writeGlobals(`${randomUuid()}-globals.json`, globals);\n };\n\n #writeFixturesOfScope = ({ fixtures, tests }: TestScope) => {\n const writtenFixtures = new Set<string>();\n if (tests.length) {\n for (const wrappedFixture of fixtures) {\n if (!writtenFixtures.has(wrappedFixture.uuid)) {\n this.#writeContainer(tests, wrappedFixture);\n this.state.deleteFixtureResult(wrappedFixture.uuid);\n writtenFixtures.add(wrappedFixture.uuid);\n }\n }\n }\n };\n\n #writeContainer = (tests: string[], wrappedFixture: FixtureResultWrapper) => {\n const fixture = wrappedFixture.value;\n const befores = wrappedFixture.type === \"before\" ? [wrappedFixture.value] : [];\n const afters = wrappedFixture.type === \"after\" ? [wrappedFixture.value] : [];\n this.writer.writeGroup({\n uuid: wrappedFixture.uuid,\n name: fixture.name,\n children: [...new Set(tests)],\n befores,\n afters,\n });\n };\n\n #calculateTimings = (\n start?: number,\n stop?: number,\n duration?: number,\n ): {\n start?: number;\n stop?: number;\n } => {\n const result: { start?: number; stop?: number } = { start, stop };\n if (duration) {\n const normalisedDuration = Math.max(0, duration);\n if (result.stop !== undefined) {\n result.start = result.stop - normalisedDuration;\n } else if (result.start !== undefined) {\n result.stop = result.start + normalisedDuration;\n } else {\n result.stop = Date.now();\n result.start = result.stop - normalisedDuration;\n }\n } else {\n if (result.stop === undefined) {\n result.stop = Date.now();\n }\n if (result.start === undefined) {\n result.start = result.stop;\n }\n }\n return {\n start: result.start ? Math.round(result.start) : undefined,\n stop: result.stop ? Math.round(result.stop) : undefined,\n };\n };\n}\n"],"mappings":";;;;;;AACA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAyBA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AASA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AAAmD,SAAAD,uBAAAW,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,QAAAH,CAAA,EAAAI,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAP,CAAA,OAAAM,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAR,CAAA,GAAAI,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAX,CAAA,EAAAI,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAf,CAAA,aAAAI,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WA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A,UAAU;IAC5B,IAAI,CAACD,eAAe,GAAGA,eAAe;IACtC,IAAI,CAAC0G,UAAU,GAAGxG,MAAK;IAEvB,IAAI0I,KAAK,CAACC,OAAO,CAAC1I,YAAY,CAAC,EAAE;MAC/B,IAAI,CAACA,YAAY,GAAGA,YAAY;IAClC,CAAC,MAAM,IAAI7H,MAAM,CAACC,IAAI,CAAC4H,YAAY,CAAC,CAAClH,MAAM,EAAE;MAC3C,IAAI,CAACkH,YAAY,GAAG7H,MAAM,CAACwQ,OAAO,CAAC3I,YAAY,CAAC,CAAC4I,OAAO,CAACC,KAAA,IAAmB;QAAA,IAAlB,CAACvD,IAAI,EAAEzL,KAAK,CAAC,GAAAgP,KAAA;QACrE,IAAIJ,KAAK,CAACC,OAAO,CAAC7O,KAAK,CAAC,EAAE;UACxB,OAAOA,KAAK,CAAC6L,GAAG,CAAEoD,CAAC,KAAM;YAAExD,IAAI;YAAEzL,KAAK,EAAEiP;UAAE,CAAC,CAAC,CAAC;QAC/C;QAEA,OAAO;UACLxD,IAAI;UACJzL;QACF,CAAC;MACH,CAAC,CAAC;IACJ;EACF;AAuuBF;AAAC4D,OAAA,CAAAgC,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_types","require","_utils","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_testplan","_factory","_LifecycleState","_ReporterRuntime","_InMemoryWriter","_FileSystemWriter","_MessageWriter","_MessageReader","_labels","_envInfo"],"sources":["../../../../src/sdk/reporter/index.ts"],"sourcesContent":["export type * from \"./types.js\";\nexport { ALLURE_METADATA_CONTENT_TYPE, ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE } from \"./types.js\";\nexport * from \"./utils.js\";\nexport * from \"./testplan.js\";\nexport * from \"./factory.js\";\nexport { LifecycleState } from \"./LifecycleState.js\";\nexport { type StepStack, DefaultStepStack, ReporterRuntime, ShallowStepsStack } from \"./ReporterRuntime.js\";\nexport { InMemoryWriter } from \"./writer/InMemoryWriter.js\";\nexport { FileSystemWriter } from \"./writer/FileSystemWriter.js\";\nexport { MessageWriter } from \"./writer/MessageWriter.js\";\nexport { MessageReader } from \"./writer/MessageReader.js\";\nexport {\n getEnvironmentLabels,\n getHostLabel,\n getThreadLabel,\n getPackageLabel,\n getLanguageLabel,\n getFrameworkLabel,\n} from \"./utils/labels.js\";\nexport { parseEnvInfo, stringifyEnvInfo } from \"./utils/envInfo.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,SAAA,GAAAd,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAW,SAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,SAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAC,SAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AACA,IAAAU,QAAA,GAAAf,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAY,QAAA,EAAAX,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAU,QAAA,CAAAV,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAE,QAAA,CAAAV,GAAA;IAAA;EAAA;AAAA;AACA,IAAAW,eAAA,GAAAhB,OAAA;AACA,IAAAiB,gBAAA,GAAAjB,OAAA;AACA,IAAAkB,eAAA,GAAAlB,OAAA;AACA,IAAAmB,iBAAA,GAAAnB,OAAA;AACA,IAAAoB,cAAA,GAAApB,OAAA;AACA,IAAAqB,cAAA,GAAArB,OAAA;AACA,IAAAsB,OAAA,GAAAtB,OAAA;AAQA,IAAAuB,QAAA,GAAAvB,OAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_types","require","_utils","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_testplan","_factory","_LifecycleState","_ReporterRuntime","_InMemoryWriter","_FileSystemWriter","_MessageWriter","_MessageReader","_labels","_envInfo"],"sources":["../../../../src/sdk/reporter/index.ts"],"sourcesContent":["export type * from \"./types.js\";\nexport { ALLURE_METADATA_CONTENT_TYPE, ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE } from \"./types.js\";\nexport * from \"./utils.js\";\nexport * from \"./testplan.js\";\nexport * from \"./factory.js\";\nexport { LifecycleState } from \"./LifecycleState.js\";\nexport {\n type AttachmentReference,\n type StepStack,\n DefaultStepStack,\n ReporterRuntime,\n ShallowStepsStack,\n} from \"./ReporterRuntime.js\";\nexport { InMemoryWriter } from \"./writer/InMemoryWriter.js\";\nexport { FileSystemWriter } from \"./writer/FileSystemWriter.js\";\nexport { MessageWriter } from \"./writer/MessageWriter.js\";\nexport { MessageReader } from \"./writer/MessageReader.js\";\nexport {\n getEnvironmentLabels,\n getHostLabel,\n getThreadLabel,\n getPackageLabel,\n getLanguageLabel,\n getFrameworkLabel,\n} from \"./utils/labels.js\";\nexport { parseEnvInfo, stringifyEnvInfo } from \"./utils/envInfo.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,SAAA,GAAAd,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAW,SAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,SAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAC,SAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AACA,IAAAU,QAAA,GAAAf,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAY,QAAA,EAAAX,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAU,QAAA,CAAAV,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAE,QAAA,CAAAV,GAAA;IAAA;EAAA;AAAA;AACA,IAAAW,eAAA,GAAAhB,OAAA;AACA,IAAAiB,gBAAA,GAAAjB,OAAA;AAOA,IAAAkB,eAAA,GAAAlB,OAAA;AACA,IAAAmB,iBAAA,GAAAnB,OAAA;AACA,IAAAoB,cAAA,GAAApB,OAAA;AACA,IAAAqB,cAAA,GAAArB,OAAA;AACA,IAAAsB,OAAA,GAAAtB,OAAA;AAQA,IAAAuB,QAAA,GAAAvB,OAAA","ignoreList":[]}
@@ -6,7 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.parseTestPlan = exports.includedInTestPlan = exports.hasSkipLabel = exports.addSkipLabelAsMeta = exports.addSkipLabel = void 0;
7
7
  var _nodeFs = require("node:fs");
8
8
  var _utils = require("../utils.js");
9
- var parseTestPlan = () => {
9
+ var parseTestPlan = exports.parseTestPlan = function parseTestPlan() {
10
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10
11
  var testPlanPath = process.env.ALLURE_TESTPLAN_PATH;
11
12
  if (!testPlanPath) {
12
13
  return undefined;
@@ -24,9 +25,14 @@ var parseTestPlan = () => {
24
25
  console.error("Test plan version is unsupported. Skipping test plan usage:", testPlan.version);
25
26
  return undefined;
26
27
  }
28
+ var hasMutedTests = options.includeMutedTests && Array.isArray(testPlan.mutedTests) && testPlan.mutedTests.length > 0;
29
+ if (hasMutedTests) {
30
+ var _testPlan$tests;
31
+ (_testPlan$tests = testPlan.tests) !== null && _testPlan$tests !== void 0 ? _testPlan$tests : testPlan.tests = [];
32
+ }
27
33
 
28
34
  // Execute all tests if test plan is empty
29
- if (!Array.isArray(testPlan.tests) || testPlan.tests.length === 0) {
35
+ if (!Array.isArray(testPlan.tests) || testPlan.tests.length === 0 && !hasMutedTests) {
30
36
  return undefined;
31
37
  }
32
38
  return testPlan;
@@ -36,9 +42,9 @@ var parseTestPlan = () => {
36
42
  return undefined;
37
43
  }
38
44
  };
39
- exports.parseTestPlan = parseTestPlan;
40
- var includedInTestPlan = (testPlan, subject) => {
41
- var _ref;
45
+ var includedInTestPlan = exports.includedInTestPlan = function includedInTestPlan(testPlan, subject) {
46
+ var _ref, _testPlan$mutedTests, _testPlan$mutedTests2;
47
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
42
48
  var {
43
49
  allureId,
44
50
  id,
@@ -50,14 +56,17 @@ var includedInTestPlan = (testPlan, subject) => {
50
56
  var _tag$match;
51
57
  return tag === null || tag === void 0 || (_tag$match = tag.match(_utils.allureIdRegexp)) === null || _tag$match === void 0 || (_tag$match = _tag$match.groups) === null || _tag$match === void 0 ? void 0 : _tag$match.id;
52
58
  }).find(maybeId => maybeId !== undefined);
53
- return testPlan.tests.some(test => {
59
+ var matchesTest = test => {
54
60
  var idMatched = effectiveId !== undefined && test.id !== undefined && String(test.id) === effectiveId;
55
61
  var selectorMatched = fullName !== undefined && test.selector === fullName;
56
62
  var nativeSelectorMatched = nativeSelector !== undefined && test.selector === nativeSelector;
57
63
  return idMatched || selectorMatched || nativeSelectorMatched;
58
- });
64
+ };
65
+ if (testPlan.tests.length === 0 && ((_testPlan$mutedTests = testPlan.mutedTests) === null || _testPlan$mutedTests === void 0 ? void 0 : _testPlan$mutedTests.length) === 0) return true;
66
+ var selected = testPlan.tests.length === 0 || testPlan.tests.some(matchesTest);
67
+ if (!options.enableMutedTests) return selected;
68
+ return selected && !((_testPlan$mutedTests2 = testPlan.mutedTests) !== null && _testPlan$mutedTests2 !== void 0 && _testPlan$mutedTests2.some(matchesTest));
59
69
  };
60
- exports.includedInTestPlan = includedInTestPlan;
61
70
  var addSkipLabel = labels => {
62
71
  labels.push({
63
72
  name: "ALLURE_TESTPLAN_SKIP",
@@ -1 +1 @@
1
- {"version":3,"file":"testplan.js","names":["_nodeFs","require","_utils","parseTestPlan","testPlanPath","process","env","ALLURE_TESTPLAN_PATH","undefined","existsSync","console","error","file","readFileSync","testPlan","JSON","parse","version","Array","isArray","tests","length","e","concat","exports","includedInTestPlan","subject","_ref","allureId","id","fullName","nativeSelector","tags","effectiveId","map","tag","_tag$match","match","allureIdRegexp","groups","find","maybeId","some","test","idMatched","String","selectorMatched","selector","nativeSelectorMatched","addSkipLabel","labels","push","name","value","addSkipLabelAsMeta","hasSkipLabel","_ref2"],"sources":["../../../../src/sdk/reporter/testplan.ts"],"sourcesContent":["import { existsSync, readFileSync } from \"node:fs\";\n\nimport type { Label } from \"../../model.js\";\nimport type { TestPlanV1 } from \"../types.js\";\nimport { allureIdRegexp } from \"../utils.js\";\n\nexport const parseTestPlan = (): TestPlanV1 | undefined => {\n const testPlanPath = process.env.ALLURE_TESTPLAN_PATH;\n\n if (!testPlanPath) {\n return undefined;\n }\n\n if (!existsSync(testPlanPath)) {\n // eslint-disable-next-line no-console\n console.error(\"Test plan file is missing. Skipping test plan usage:\", testPlanPath);\n return undefined;\n }\n\n try {\n const file = readFileSync(testPlanPath, \"utf8\");\n const testPlan = JSON.parse(file) as Partial<TestPlanV1> & { version?: string };\n\n if (testPlan.version !== \"1.0\") {\n // eslint-disable-next-line no-console\n console.error(\"Test plan version is unsupported. Skipping test plan usage:\", testPlan.version);\n return undefined;\n }\n\n // Execute all tests if test plan is empty\n if (!Array.isArray(testPlan.tests) || testPlan.tests.length === 0) {\n return undefined;\n }\n\n return testPlan as TestPlanV1;\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(`could not parse test plan ${testPlanPath}`, e);\n return undefined;\n }\n};\n\nexport const includedInTestPlan = (\n testPlan: TestPlanV1,\n subject: { allureId?: string; id?: string; fullName?: string; nativeSelector?: string; tags?: string[] },\n): boolean => {\n const { allureId, id, fullName, nativeSelector, tags = [] } = subject;\n const effectiveId =\n allureId ??\n id ??\n tags.map((tag) => tag?.match(allureIdRegexp)?.groups?.id).find((maybeId) => maybeId !== undefined);\n\n return testPlan.tests.some((test) => {\n const idMatched = effectiveId !== undefined && test.id !== undefined && String(test.id) === effectiveId;\n const selectorMatched = fullName !== undefined && test.selector === fullName;\n const nativeSelectorMatched = nativeSelector !== undefined && test.selector === nativeSelector;\n\n return idMatched || selectorMatched || nativeSelectorMatched;\n });\n};\n\nexport const addSkipLabel = (labels: Label[]) => {\n labels.push({ name: \"ALLURE_TESTPLAN_SKIP\", value: \"true\" });\n};\n\nexport const addSkipLabelAsMeta = (name: string) => {\n return `${name} @allure.label.ALLURE_TESTPLAN_SKIP:true`;\n};\n\nexport const hasSkipLabel = (labels: readonly Label[]) => labels.some(({ name }) => name === \"ALLURE_TESTPLAN_SKIP\");\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAIA,IAAAC,MAAA,GAAAD,OAAA;AAEO,IAAME,aAAa,GAAGA,CAAA,KAA8B;EACzD,IAAMC,YAAY,GAAGC,OAAO,CAACC,GAAG,C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C,GAAAI,KAAA;EAAA,OAAKJ,IAAI,KAAK,sBAAsB;AAAA,EAAC;AAAC5B,OAAA,CAAA+B,YAAA,GAAAA,YAAA","ignoreList":[]}
1
+ {"version":3,"file":"testplan.js","names":["_nodeFs","require","_utils","parseTestPlan","exports","options","arguments","length","undefined","testPlanPath","process","env","ALLURE_TESTPLAN_PATH","existsSync","console","error","file","readFileSync","testPlan","JSON","parse","version","hasMutedTests","includeMutedTests","Array","isArray","mutedTests","_testPlan$tests","tests","e","concat","includedInTestPlan","subject","_ref","_testPlan$mutedTests","_testPlan$mutedTests2","allureId","id","fullName","nativeSelector","tags","effectiveId","map","tag","_tag$match","match","allureIdRegexp","groups","find","maybeId","matchesTest","test","idMatched","String","selectorMatched","selector","nativeSelectorMatched","selected","some","enableMutedTests","addSkipLabel","labels","push","name","value","addSkipLabelAsMeta","hasSkipLabel","_ref2"],"sources":["../../../../src/sdk/reporter/testplan.ts"],"sourcesContent":["import { existsSync, readFileSync } from \"node:fs\";\n\nimport type { Label } from \"../../model.js\";\nimport type { TestPlanV1, TestPlanV1Test } from \"../types.js\";\nimport { allureIdRegexp } from \"../utils.js\";\n\nexport const parseTestPlan = (options: { includeMutedTests?: boolean } = {}): TestPlanV1 | undefined => {\n const testPlanPath = process.env.ALLURE_TESTPLAN_PATH;\n\n if (!testPlanPath) {\n return undefined;\n }\n\n if (!existsSync(testPlanPath)) {\n // eslint-disable-next-line no-console\n console.error(\"Test plan file is missing. Skipping test plan usage:\", testPlanPath);\n return undefined;\n }\n\n try {\n const file = readFileSync(testPlanPath, \"utf8\");\n const testPlan = JSON.parse(file) as Partial<TestPlanV1> & { version?: string };\n\n if (testPlan.version !== \"1.0\") {\n // eslint-disable-next-line no-console\n console.error(\"Test plan version is unsupported. Skipping test plan usage:\", testPlan.version);\n return undefined;\n }\n\n const hasMutedTests =\n options.includeMutedTests && Array.isArray(testPlan.mutedTests) && testPlan.mutedTests.length > 0;\n\n if (hasMutedTests) {\n testPlan.tests ??= [];\n }\n\n // Execute all tests if test plan is empty\n if (!Array.isArray(testPlan.tests) || (testPlan.tests.length === 0 && !hasMutedTests)) {\n return undefined;\n }\n\n return testPlan as TestPlanV1;\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(`could not parse test plan ${testPlanPath}`, e);\n return undefined;\n }\n};\n\nexport const includedInTestPlan = (\n testPlan: TestPlanV1,\n subject: { allureId?: string; id?: string; fullName?: string; nativeSelector?: string; tags?: string[] },\n options: { enableMutedTests?: boolean } = {},\n): boolean => {\n const { allureId, id, fullName, nativeSelector, tags = [] } = subject;\n const effectiveId =\n allureId ??\n id ??\n tags.map((tag) => tag?.match(allureIdRegexp)?.groups?.id).find((maybeId) => maybeId !== undefined);\n\n const matchesTest = (test: TestPlanV1Test) => {\n const idMatched = effectiveId !== undefined && test.id !== undefined && String(test.id) === effectiveId;\n const selectorMatched = fullName !== undefined && test.selector === fullName;\n const nativeSelectorMatched = nativeSelector !== undefined && test.selector === nativeSelector;\n\n return idMatched || selectorMatched || nativeSelectorMatched;\n };\n\n if (testPlan.tests.length === 0 && testPlan.mutedTests?.length === 0) return true;\n\n const selected = testPlan.tests.length === 0 || testPlan.tests.some(matchesTest);\n if (!options.enableMutedTests) return selected;\n\n return selected && !testPlan.mutedTests?.some(matchesTest);\n};\n\nexport const addSkipLabel = (labels: Label[]) => {\n labels.push({ name: \"ALLURE_TESTPLAN_SKIP\", value: \"true\" });\n};\n\nexport const addSkipLabelAsMeta = (name: string) => {\n return `${name} @allure.label.ALLURE_TESTPLAN_SKIP:true`;\n};\n\nexport const hasSkipLabel = (labels: readonly Label[]) => labels.some(({ name }) => name === \"ALLURE_TESTPLAN_SKIP\");\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAIA,IAAAC,MAAA,GAAAD,OAAA;AAEO,IAAME,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG,SAAhBA,aAAaA,CAAA,EAA8E;EAAA,IAA1EE,OAAwC,GAAAC,SAAA,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_TYPE","exports","ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE"],"sources":["../../../../src/sdk/reporter/types.ts"],"sourcesContent":["import type {\n AllurePerformanceResult,\n FixtureResult,\n Globals,\n Label,\n LabelName,\n Link,\n LinkType,\n Parameter,\n StepResult,\n TestResult,\n TestResultContainer,\n} from \"../../model.js\";\nimport type { Category, EnvironmentInfo } from \"../types.js\";\n\nexport const ALLURE_METADATA_CONTENT_TYPE = \"application/vnd.allure.metadata+json\";\nexport const ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE = \"application/vnd.allure.message+json\";\n\nexport interface LifecycleListener {\n beforeTestResultStart?: (result: TestResult) => void;\n\n afterTestResultStart?: (result: TestResult) => void;\n\n beforeTestResultStop?: (result: TestResult) => void;\n\n afterTestResultStop?: (result: TestResult) => void;\n\n beforeTestResultUpdate?: (result: TestResult) => void;\n\n afterTestResultUpdate?: (result: TestResult) => void;\n\n beforeTestResultWrite?: (result: TestResult) => void;\n\n afterTestResultWrite?: (result: TestResult) => void;\n\n beforeStepStop?: (result: StepResult) => void;\n\n afterStepStop?: (result: StepResult) => void;\n}\n\nexport type LinkTemplate = string | ((url: string) => string);\n\nexport type LinkTypeOptions = {\n urlTemplate: LinkTemplate;\n nameTemplate?: LinkTemplate;\n};\n\nexport type LinkConfig<TOpts extends LinkTypeOptions = LinkTypeOptions> = Partial<Record<LinkType, TOpts>> &\n Record<string, TOpts>;\n\nexport type WriterDescriptor = [cls: string, ...args: readonly unknown[]] | string;\n\nexport type GlobalLabelsConfig = Partial<Record<LabelName, string | string[]>> & Record<string, string | string[]>;\n\nexport interface ReporterConfig {\n readonly resultsDir?: string;\n readonly links?: LinkConfig;\n readonly globalLabels?: Label[] | GlobalLabelsConfig;\n readonly listeners?: LifecycleListener[];\n readonly environmentInfo?: EnvironmentInfo;\n readonly categories?: Category[];\n}\n\nexport interface ReporterRuntimeConfig extends Omit<ReporterConfig, \"resultsDir\"> {\n readonly writer: Writer | WriterDescriptor;\n}\n\nexport interface Writer {\n writeResult(result: TestResult): void;\n\n writeGroup(result: TestResultContainer): void;\n\n writeAttachment(distFileName: string, content: Buffer): void;\n\n writeAttachmentFromPath(distFileName: string, from: string): void;\n\n writeEnvironmentInfo(info: EnvironmentInfo): void;\n\n writeCategoriesDefinitions(categories: Category[]): void;\n\n writeGlobals(distFileName: string, info: Globals): void;\n\n writePerformanceResults?(distFileName: string, results: AllurePerformanceResult[]): void;\n}\n\nexport type TestScope = {\n uuid: string;\n tests: string[];\n fixtures: FixtureResultWrapper[];\n labels: Label[];\n links: Link[];\n parameters: Parameter[];\n description?: string;\n descriptionHtml?: string;\n};\n\nexport type FixtureType = \"before\" | \"after\";\n\nexport type FixtureResultWrapper = {\n uuid: string;\n value: FixtureResult;\n type: FixtureType;\n scopeUuid: string;\n};\n\nexport type TestResultWrapper = {\n value: TestResult;\n scopeUuids: string[];\n};\n"],"mappings":";;;;;;AAeO,IAAMA,4BAA4B,GAAAC,OAAA,CAAAD,4BAAA,GAAG,sCAAsC;AAC3E,IAAME,mCAAmC,GAAAD,OAAA,CAAAC,mCAAA,GAAG,qCAAqC","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":["ALLURE_METADATA_CONTENT_TYPE","exports","ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE"],"sources":["../../../../src/sdk/reporter/types.ts"],"sourcesContent":["import type {\n AllureMetricResult,\n FixtureResult,\n Globals,\n Label,\n LabelName,\n Link,\n LinkType,\n Parameter,\n StepResult,\n TestResult,\n TestResultContainer,\n} from \"../../model.js\";\nimport type { Category, EnvironmentInfo } from \"../types.js\";\n\nexport const ALLURE_METADATA_CONTENT_TYPE = \"application/vnd.allure.metadata+json\";\nexport const ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE = \"application/vnd.allure.message+json\";\n\nexport interface LifecycleListener {\n beforeTestResultStart?: (result: TestResult) => void;\n\n afterTestResultStart?: (result: TestResult) => void;\n\n beforeTestResultStop?: (result: TestResult) => void;\n\n afterTestResultStop?: (result: TestResult) => void;\n\n beforeTestResultUpdate?: (result: TestResult) => void;\n\n afterTestResultUpdate?: (result: TestResult) => void;\n\n beforeTestResultWrite?: (result: TestResult) => void;\n\n afterTestResultWrite?: (result: TestResult) => void;\n\n beforeStepStop?: (result: StepResult) => void;\n\n afterStepStop?: (result: StepResult) => void;\n}\n\nexport type LinkTemplate = string | ((url: string) => string);\n\nexport type LinkTypeOptions = {\n urlTemplate: LinkTemplate;\n nameTemplate?: LinkTemplate;\n};\n\nexport type LinkConfig<TOpts extends LinkTypeOptions = LinkTypeOptions> = Partial<Record<LinkType, TOpts>> &\n Record<string, TOpts>;\n\nexport type WriterDescriptor = [cls: string, ...args: readonly unknown[]] | string;\n\nexport type GlobalLabelsConfig = Partial<Record<LabelName, string | string[]>> & Record<string, string | string[]>;\n\nexport interface ReporterConfig {\n readonly resultsDir?: string;\n readonly links?: LinkConfig;\n readonly globalLabels?: Label[] | GlobalLabelsConfig;\n readonly listeners?: LifecycleListener[];\n readonly environmentInfo?: EnvironmentInfo;\n readonly categories?: Category[];\n}\n\nexport interface ReporterRuntimeConfig extends Omit<ReporterConfig, \"resultsDir\"> {\n readonly writer: Writer | WriterDescriptor;\n}\n\nexport interface Writer {\n writeResult(result: TestResult): void;\n\n writeGroup(result: TestResultContainer): void;\n\n writeAttachment(distFileName: string, content: Buffer): void;\n\n writeAttachmentFromPath(distFileName: string, from: string): void;\n\n writeEnvironmentInfo(info: EnvironmentInfo): void;\n\n writeCategoriesDefinitions(categories: Category[]): void;\n\n writeGlobals(distFileName: string, info: Globals): void;\n\n writeMetricResults?(distFileName: string, results: AllureMetricResult[]): void;\n}\n\nexport type TestScope = {\n uuid: string;\n tests: string[];\n fixtures: FixtureResultWrapper[];\n labels: Label[];\n links: Link[];\n parameters: Parameter[];\n description?: string;\n descriptionHtml?: string;\n precondition?: string;\n preconditionHtml?: string;\n expectedResult?: string;\n expectedResultHtml?: string;\n};\n\nexport type FixtureType = \"before\" | \"after\";\n\nexport type FixtureResultWrapper = {\n uuid: string;\n value: FixtureResult;\n type: FixtureType;\n scopeUuid: string;\n};\n\nexport type TestResultWrapper = {\n value: TestResult;\n scopeUuids: string[];\n};\n"],"mappings":";;;;;;AAeO,IAAMA,4BAA4B,GAAAC,OAAA,CAAAD,4BAAA,GAAG,sCAAsC;AAC3E,IAAME,mCAAmC,GAAAD,OAAA,CAAAC,mCAAA,GAAG,qCAAqC","ignoreList":[]}
@@ -3,13 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.readImageAsBase64 = exports.randomUuid = exports.md5 = exports.getWorstTestStepResult = exports.getTestResultTestCaseId = exports.getTestResultHistoryId = exports.getSuiteLabels = exports.getRelativePath = exports.getProjectRoot = exports.getProjectName = exports.getPosixPath = exports.getFallbackTestCaseIdLabel = exports.formatLinks = exports.formatLink = exports.escapeRegExp = exports.ensureSuiteLabels = exports.deepClone = exports.createDefaultWriter = exports.applyLinkTemplate = exports.FALLBACK_TEST_CASE_ID_LABEL_NAME = void 0;
6
+ exports.readImageAsBase64 = exports.randomUuid = exports.md5 = exports.isUrl = exports.getWorstTestStepResult = exports.getTestResultTestCaseId = exports.getTestResultHistoryId = exports.getSuiteLabels = exports.getRelativePath = exports.getProjectRoot = exports.getProjectName = exports.getPosixPath = exports.getFallbackTestCaseIdLabel = exports.getDefaultSuiteLabels = exports.formatLinks = exports.formatLink = exports.escapeRegExp = exports.ensureSuiteLabels = exports.deepClone = exports.createDefaultWriter = exports.applyLinkTemplate = exports.FALLBACK_TEST_CASE_ID_LABEL_NAME = void 0;
7
7
  var _nodeCrypto = require("node:crypto");
8
8
  var _nodeFs = _interopRequireDefault(require("node:fs"));
9
9
  var _promises = require("node:fs/promises");
10
10
  var _nodePath = _interopRequireDefault(require("node:path"));
11
11
  var _nodeProcess = _interopRequireDefault(require("node:process"));
12
12
  var _model = require("../../model.js");
13
+ var _utils = require("../utils.js");
13
14
  var _FileSystemWriter = require("./writer/FileSystemWriter.js");
14
15
  var _MessageWriter = require("./writer/MessageWriter.js");
15
16
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -212,7 +213,16 @@ var getSuiteLabels = suites => {
212
213
  }
213
214
  return labels;
214
215
  };
216
+
217
+ /** Returns generated suite labels for levels not already present in the result. */
215
218
  exports.getSuiteLabels = getSuiteLabels;
219
+ var getDefaultSuiteLabels = (test, suites) => getSuiteLabels(suites).filter(_ref2 => {
220
+ var {
221
+ name
222
+ } = _ref2;
223
+ return !(0, _utils.hasLabel)(test, name);
224
+ });
225
+ exports.getDefaultSuiteLabels = getDefaultSuiteLabels;
216
226
  var suiteLabelNames = [_model.LabelName.PARENT_SUITE, _model.LabelName.SUITE, _model.LabelName.SUB_SUITE];
217
227
 
218
228
  /**
@@ -261,6 +271,7 @@ var isUrl = potentialUrl => {
261
271
  return false;
262
272
  }
263
273
  };
274
+ exports.isUrl = isUrl;
264
275
  var applyLinkTemplate = (template, value) => typeof template === "string" ? template.replace("%s", value) : template(value);
265
276
  exports.applyLinkTemplate = applyLinkTemplate;
266
277
  var formatLink = (templates, link) => {