allure-js-commons 3.0.6 → 3.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/sdk/reporter/ReporterRuntime.js +4 -1
- package/dist/cjs/sdk/reporter/ReporterRuntime.js.map +1 -1
- package/dist/cjs/sdk/types.js.map +1 -1
- package/dist/cjs/sdk/utils.js +12 -6
- package/dist/cjs/sdk/utils.js.map +1 -1
- package/dist/esm/sdk/reporter/ReporterRuntime.js +4 -1
- package/dist/esm/sdk/reporter/ReporterRuntime.js.map +1 -1
- package/dist/esm/sdk/types.js.map +1 -1
- package/dist/esm/sdk/utils.js +12 -6
- package/dist/esm/sdk/utils.js.map +1 -1
- package/dist/types/sdk/types.d.ts +2 -0
- package/dist/types/sdk/utils.d.ts +2 -2
- package/package.json +7 -7
|
@@ -575,7 +575,10 @@ class ReporterRuntime {
|
|
|
575
575
|
result.start = result.stop;
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
|
-
return
|
|
578
|
+
return {
|
|
579
|
+
start: result.start ? Math.round(result.start) : undefined,
|
|
580
|
+
stop: result.stop ? Math.round(result.stop) : undefined
|
|
581
|
+
};
|
|
579
582
|
});
|
|
580
583
|
this.writer = (0, _loader.resolveWriter)(writer);
|
|
581
584
|
this.notifier = new _Notifier.Notifier({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReporterRuntime.js","names":["_path","require","_model","_LifecycleState","_Notifier","_factory","_testplan","_utils","_attachments","_loader","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","set","has","TypeError","_classPrivateFieldGet","s","get","_assertClassBrand","n","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","String","Number","DefaultStepStack","constructor","Map","stepsByRoot","clear","rootsByStep","rootUuid","maybeValue","delete","stepUuid","removeStep","newValue","_handleMetadataMessage","WeakMap","_handleStepMetadataMessage","_handleStartStepMessage","_handleStopStepMessage","_handleAttachmentContentMessage","_handleAttachmentPathMessage","_findParent","_writeFixturesOfScope","_writeContainer","_calculateTimings","ReporterRuntime","_ref","_this","writer","listeners","environmentInfo","categories","links","LifecycleState","uuid","randomUuid","state","setScope","updateFunc","scope","getScope","console","error","concat","deleteScope","scopeUuid","type","fixtureResult","wrappedFixture","setFixtureResult","createFixtureResult","start","Date","now","fixtures","fixture","getFixtureResult","opts","startStop","stop","duration","stage","Stage","FINISHED","result","scopeUuids","undefined","testResult","createTestResult","deepClone","notifier","beforeTestResultStart","tests","setTestResult","afterTestResultStart","getTestResult","beforeTestResultUpdate","afterTestResultUpdate","_testResult$testCaseI","_testResult$historyId","wrapped","getWrappedTestResult","beforeTestResultStop","testCaseId","getTestResultTestCaseId","historyId","getTestResultHistoryId","labels","parameters","description","_testResult$descripti","descriptionHtml","_testResult$descripti2","afterTestResultStop","hasSkipLabel","deleteTestResult","beforeTestResultWrite","writeResult","afterTestResultWrite","stepStack","currentStep","parentStepUuid","parent","JSON","stringify","stepResult","createStepResult","steps","setStepResult","addStep","step","getStepResult","beforeStepStop","afterStepStop","attachmentName","attachmentContentOrPath","options","_options$fileExtensio","isPath","fileExtension","extname","attachmentFileName","buildAttachmentFileName","contentType","writeAttachmentFromPath","writeAttachment","attachment","name","source","wrapInStep","timestamp","attachments","writeEnvironmentInfo","serializedCategories","map","c","messageRegex","RegExp","traceRegex","writeCategoriesDefinitions","messages","message","data","getWrappedFixtureResult","displayName","updateFixture","updateScope","linkConfig","formatLinks","updateTest","updateStep","startStep","status","statusDetails","stopStep","Buffer","from","content","encoding","path","root","getExecutionItem","_ref2","writtenFixtures","Set","deleteFixtureResult","add","befores","afters","writeGroup","children","normalisedDuration","Math","max","resolveWriter","Notifier","exports"],"sources":["../../../../src/sdk/reporter/ReporterRuntime.ts"],"sourcesContent":["/* eslint max-lines: 0 */\nimport { extname } from \"path\";\nimport {\n type Attachment,\n type AttachmentOptions,\n type FixtureResult,\n Stage,\n type StepResult,\n type TestResult,\n} from \"../../model.js\";\nimport type {\n Category,\n EnvironmentInfo,\n RuntimeAttachmentContentMessage,\n RuntimeAttachmentPathMessage,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n} from \"../types.js\";\nimport { LifecycleState } from \"./LifecycleState.js\";\nimport { Notifier } from \"./Notifier.js\";\nimport { createFixtureResult, createStepResult, createTestResult } from \"./factory.js\";\nimport { hasSkipLabel } from \"./testplan.js\";\nimport type {\n FixtureResultWrapper,\n FixtureType,\n LinkConfig,\n ReporterRuntimeConfig,\n TestScope,\n Writer,\n} from \"./types.js\";\nimport { deepClone, formatLinks, getTestResultHistoryId, getTestResultTestCaseId, randomUuid } from \"./utils.js\";\nimport { buildAttachmentFileName } from \"./utils/attachments.js\";\nimport { resolveWriter } from \"./writer/loader.js\";\n\ninterface StepStack {\n clear(): void;\n\n removeRoot(rootUuid: string): void;\n\n currentStep(rootUuid: string): string | undefined;\n\n addStep(rootUuid: string, stepUuid: string): void;\n\n removeStep(stepUuid: string): void;\n}\n\nclass DefaultStepStack implements StepStack {\n private stepsByRoot: Map<string, string[]> = new Map();\n private rootsByStep: Map<string, string> = new Map();\n\n clear = (): void => {\n this.stepsByRoot.clear();\n this.rootsByStep.clear();\n };\n\n removeRoot = (rootUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n this.stepsByRoot.delete(rootUuid);\n if (maybeValue) {\n maybeValue.forEach((stepUuid) => this.rootsByStep.delete(stepUuid));\n }\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n return maybeValue[maybeValue.length - 1];\n };\n\n addStep = (rootUuid: string, stepUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n this.stepsByRoot.set(rootUuid, [stepUuid]);\n } else {\n maybeValue.push(stepUuid);\n }\n this.rootsByStep.set(stepUuid, rootUuid);\n };\n\n removeStep(stepUuid: string) {\n const rootUuid = this.rootsByStep.get(stepUuid);\n if (!rootUuid) {\n return;\n }\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n const newValue = maybeValue.filter((value) => value !== stepUuid);\n this.stepsByRoot.set(rootUuid, newValue);\n }\n}\n\nexport class ReporterRuntime {\n private readonly state = new LifecycleState();\n private notifier: Notifier;\n private stepStack: StepStack = new DefaultStepStack();\n writer: Writer;\n categories?: Category[];\n environmentInfo?: EnvironmentInfo;\n linkConfig?: LinkConfig;\n\n constructor({ writer, listeners = [], environmentInfo, categories, links }: 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\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 testResult.testCaseId ??= getTestResultTestCaseId(testResult);\n testResult.historyId ??= getTestResultHistoryId(testResult);\n\n const startStop = this.#calculateTimings(testResult.start, opts?.stop, opts?.duration);\n testResult.start = startStop.start;\n testResult.stop = startStop.stop;\n\n const scopeUuids = wrapped.scopeUuids;\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n if (scope?.labels) {\n testResult.labels = [...testResult.labels, ...scope.labels];\n }\n if (scope?.links) {\n testResult.links = [...testResult.links, ...scope.links];\n }\n if (scope?.parameters) {\n testResult.parameters = [...testResult.parameters, ...scope.parameters];\n }\n if (scope?.description) {\n testResult.description = testResult.description ?? scope.description;\n }\n if (scope?.descriptionHtml) {\n testResult.descriptionHtml = testResult.descriptionHtml ?? scope.descriptionHtml;\n }\n });\n\n this.notifier.afterTestResultStop(testResult);\n };\n\n writeTest = (uuid: string) => {\n const testResult = this.state.getTestResult(uuid);\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not write test result: no test with uuid ${uuid} is found`);\n return;\n }\n\n if (hasSkipLabel(testResult.labels)) {\n this.state.deleteTestResult(uuid);\n return;\n }\n\n this.notifier.beforeTestResultWrite(testResult);\n\n this.writer.writeResult(testResult);\n this.state.deleteTestResult(uuid);\n\n this.notifier.afterTestResultWrite(testResult);\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n return this.stepStack.currentStep(rootUuid);\n };\n\n startStep = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n result: Partial<StepResult>,\n ): string | undefined => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not start test step: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n const stepResult: StepResult = {\n ...createStepResult(),\n start: Date.now(),\n ...result,\n };\n parent.steps.push(stepResult);\n const stepUuid = randomUuid();\n this.state.setStepResult(stepUuid, stepResult);\n\n this.stepStack.addStep(rootUuid, stepUuid);\n\n return stepUuid;\n };\n\n updateStep = (uuid: string, updateFunc: (stepResult: StepResult) => void) => {\n const step = this.state.getStepResult(uuid)!;\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not update test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(step);\n };\n\n stopStep = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const step = this.state.getStepResult(uuid);\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n this.notifier.beforeStepStop(step);\n\n const startStop = this.#calculateTimings(step.start, opts?.stop, opts?.duration);\n step.start = startStop.start;\n step.stop = startStop.stop;\n\n step.stage = Stage.FINISHED;\n\n this.stepStack.removeStep(uuid);\n\n this.notifier.afterStepStop(step);\n };\n\n writeAttachment = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n attachmentName: string,\n attachmentContentOrPath: Buffer | string,\n options: AttachmentOptions & { wrapInStep?: boolean; timestamp?: number },\n ) => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not write test attachment: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n\n const isPath = typeof attachmentContentOrPath === \"string\";\n const fileExtension = options.fileExtension ?? (isPath ? extname(attachmentContentOrPath) : undefined);\n const attachmentFileName = buildAttachmentFileName({\n contentType: options.contentType,\n fileExtension,\n });\n\n if (isPath) {\n this.writer.writeAttachmentFromPath(attachmentFileName, attachmentContentOrPath);\n } else {\n this.writer.writeAttachment(attachmentFileName, attachmentContentOrPath);\n }\n\n const attachment: Attachment = {\n name: attachmentName,\n source: attachmentFileName,\n type: options.contentType,\n };\n\n if (options.wrapInStep) {\n const { timestamp = Date.now() } = options;\n parent.steps.push({\n name: attachmentName,\n attachments: [attachment],\n start: timestamp,\n stop: timestamp,\n } as StepResult);\n } else {\n parent.attachments.push(attachment);\n }\n };\n\n writeEnvironmentInfo = () => {\n if (!this.environmentInfo) {\n return;\n }\n\n this.writer.writeEnvironmentInfo(this.environmentInfo);\n };\n\n writeCategoriesDefinitions = () => {\n if (!this.categories) {\n return;\n }\n\n const serializedCategories = this.categories.map((c) => {\n if (c.messageRegex instanceof RegExp) {\n c.messageRegex = c.messageRegex.source;\n }\n\n if (c.traceRegex instanceof RegExp) {\n c.traceRegex = c.traceRegex.source;\n }\n\n return c;\n });\n\n this.writer.writeCategoriesDefinitions(serializedCategories);\n };\n\n applyRuntimeMessages = (rootUuid: string, messages: RuntimeMessage[]) => {\n messages.forEach((message) => {\n switch (message.type) {\n case \"metadata\":\n this.#handleMetadataMessage(rootUuid, message.data);\n return;\n case \"step_metadata\":\n this.#handleStepMetadataMessage(rootUuid, message.data);\n return;\n case \"step_start\":\n this.#handleStartStepMessage(rootUuid, message.data);\n return;\n case \"step_stop\":\n this.#handleStopStepMessage(rootUuid, message.data);\n return;\n case \"attachment_content\":\n this.#handleAttachmentContentMessage(rootUuid, message.data);\n return;\n case \"attachment_path\":\n this.#handleAttachmentPathMessage(rootUuid, message.data);\n return;\n default:\n // eslint-disable-next-line no-console\n console.error(`could not apply runtime messages: unknown message ${JSON.stringify(message)}`);\n return;\n }\n });\n };\n\n #handleMetadataMessage = (rootUuid: string, message: RuntimeMetadataMessage[\"data\"]) => {\n // only display name could be set to fixture.\n const fixtureResult = this.state.getWrappedFixtureResult(rootUuid);\n const { links, labels, parameters, displayName, testCaseId, historyId, description, descriptionHtml } = message;\n\n if (fixtureResult) {\n if (displayName) {\n this.updateFixture(rootUuid, (result) => {\n result.name = displayName;\n });\n }\n\n if (historyId) {\n // eslint-disable-next-line no-console\n console.error(\"historyId can't be changed within test fixtures\");\n }\n if (testCaseId) {\n // eslint-disable-next-line no-console\n console.error(\"testCaseId can't be changed within test fixtures\");\n }\n\n if (links || labels || parameters || description || descriptionHtml) {\n // in some frameworks, afterEach methods can be executed before test stop event, while\n // in others after. To remove the possible undetermined behaviour we only allow\n // using runtime metadata API in before hooks.\n if (fixtureResult.type === \"after\") {\n // eslint-disable-next-line no-console\n console.error(\"metadata messages isn't supported for after test fixtures\");\n return;\n }\n\n this.updateScope(fixtureResult.scopeUuid, (scope) => {\n if (links) {\n scope.links = [...scope.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n scope.labels = [...scope.labels, ...labels];\n }\n if (parameters) {\n scope.parameters = [...scope.parameters, ...parameters];\n }\n if (description) {\n scope.description = description;\n }\n if (descriptionHtml) {\n scope.descriptionHtml = descriptionHtml;\n }\n });\n }\n\n return;\n }\n\n this.updateTest(rootUuid, (result) => {\n if (links) {\n result.links = [...result.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n result.labels = [...result.labels, ...labels];\n }\n if (parameters) {\n result.parameters = [...result.parameters, ...parameters];\n }\n if (displayName) {\n result.name = displayName;\n }\n if (testCaseId) {\n result.testCaseId = testCaseId;\n }\n if (historyId) {\n result.historyId = historyId;\n }\n if (description) {\n result.description = description;\n }\n if (descriptionHtml) {\n result.descriptionHtml = descriptionHtml;\n }\n });\n };\n\n #handleStepMetadataMessage = (rootUuid: string, message: RuntimeStepMetadataMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step metadata message: no step is running\");\n return;\n }\n const { name, parameters } = message;\n this.updateStep(stepUuid, (stepResult) => {\n if (name) {\n stepResult.name = name;\n }\n if (parameters) {\n stepResult.parameters = [...stepResult.parameters, ...parameters];\n }\n });\n };\n\n #handleStartStepMessage = (rootUuid: string, message: RuntimeStartStepMessage[\"data\"]) => {\n this.startStep(rootUuid, undefined, { ...message });\n };\n\n #handleStopStepMessage = (rootUuid: string, message: RuntimeStopStepMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step stop message: no step is running\");\n return;\n }\n this.updateStep(stepUuid, (result) => {\n if (message.status && !result.status) {\n result.status = message.status;\n }\n if (message.statusDetails) {\n result.statusDetails = { ...result.statusDetails, ...message.statusDetails };\n }\n });\n this.stopStep(stepUuid, { stop: message.stop });\n };\n\n #handleAttachmentContentMessage = (rootUuid: string, message: RuntimeAttachmentContentMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, Buffer.from(message.content, message.encoding), {\n encoding: message.encoding,\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #handleAttachmentPathMessage = (rootUuid: string, message: RuntimeAttachmentPathMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, message.path, {\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #findParent = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n ): FixtureResult | TestResult | StepResult | undefined => {\n const root = this.state.getExecutionItem(rootUuid);\n if (!root) {\n return;\n }\n\n if (parentStepUuid === null) {\n return root;\n } else if (parentStepUuid === undefined) {\n const stepUuid = this.currentStep(rootUuid);\n return stepUuid ? this.state.getStepResult(stepUuid) : root;\n } else {\n return this.state.getStepResult(parentStepUuid);\n }\n };\n\n #writeFixturesOfScope = ({ fixtures, tests }: TestScope) => {\n const writtenFixtures = new Set<string>();\n if (tests.length) {\n for (const wrappedFixture of fixtures) {\n if (!writtenFixtures.has(wrappedFixture.uuid)) {\n this.#writeContainer(tests, wrappedFixture);\n this.state.deleteFixtureResult(wrappedFixture.uuid);\n writtenFixtures.add(wrappedFixture.uuid);\n }\n }\n }\n };\n\n #writeContainer = (tests: string[], wrappedFixture: FixtureResultWrapper) => {\n const fixture = wrappedFixture.value;\n const befores = wrappedFixture.type === \"before\" ? [wrappedFixture.value] : [];\n const afters = wrappedFixture.type === \"after\" ? [wrappedFixture.value] : [];\n this.writer.writeGroup({\n uuid: wrappedFixture.uuid,\n name: fixture.name,\n children: [...new Set(tests)],\n befores,\n afters,\n });\n };\n\n #calculateTimings = (start?: number, stop?: number, duration?: number): { start?: number; stop?: number } => {\n const result: { start?: number; stop?: number } = { start, stop };\n if (duration) {\n const normalisedDuration = Math.max(0, duration);\n if (result.stop !== undefined) {\n result.start = result.stop - normalisedDuration;\n } else if (result.start !== undefined) {\n result.stop = result.start + normalisedDuration;\n } else {\n result.stop = Date.now();\n result.start = result.stop - normalisedDuration;\n }\n } else {\n if (result.stop === undefined) {\n result.stop = Date.now();\n }\n if (result.start === undefined) {\n result.start = result.stop;\n }\n }\n return result;\n };\n}\n"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAmBA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AASA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AAAmD,SAAAS,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cA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IAAI3G,MAAM,CAACb,KAAK,KAAKe,SAAS,EAAE;UACrCF,MAAM,CAACL,IAAI,GAAGK,MAAM,CAACb,KAAK,GAAGwH,kBAAkB;QACjD,CAAC,MAAM;UACL3G,MAAM,CAACL,IAAI,GAAGP,IAAI,CAACC,GAAG,CAAC,CAAC;UACxBW,MAAM,CAACb,KAAK,GAAGa,MAAM,CAACL,IAAI,GAAGgH,kBAAkB;QACjD;MACF,CAAC,MAAM;QACL,IAAI3G,MAAM,CAACL,IAAI,KAAKO,SAAS,EAAE;UAC7BF,MAAM,CAACL,IAAI,GAAGP,IAAI,CAACC,GAAG,CAAC,CAAC;QAC1B;QACA,IAAIW,MAAM,CAACb,KAAK,KAAKe,SAAS,EAAE;UAC9BF,MAAM,CAACb,KAAK,GAAGa,MAAM,CAACL,IAAI;QAC5B;MACF;MACA,OAAOK,MAAM;IACf,CAAC;IA7iBC,IAAI,CAACpC,MAAM,GAAG,IAAAkJ,qBAAa,EAAClJ,MAAM,CAAC;IACnC,IAAI,CAAC0C,QAAQ,GAAG,IAAIyG,kBAAQ,CAAC;MAAElJ;IAAU,CAAC,CAAC;IAC3C,IAAI,CAACE,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACD,eAAe,GAAGA,eAAe;IACtC,IAAI,CAACqH,UAAU,GAAGnH,MAAK;EACzB;AAyiBF;AAACgJ,OAAA,CAAAvJ,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ReporterRuntime.js","names":["_path","require","_model","_LifecycleState","_Notifier","_factory","_testplan","_utils","_attachments","_loader","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","set","has","TypeError","_classPrivateFieldGet","s","get","_assertClassBrand","n","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","String","Number","DefaultStepStack","constructor","Map","stepsByRoot","clear","rootsByStep","rootUuid","maybeValue","delete","stepUuid","removeStep","newValue","_handleMetadataMessage","WeakMap","_handleStepMetadataMessage","_handleStartStepMessage","_handleStopStepMessage","_handleAttachmentContentMessage","_handleAttachmentPathMessage","_findParent","_writeFixturesOfScope","_writeContainer","_calculateTimings","ReporterRuntime","_ref","_this","writer","listeners","environmentInfo","categories","links","LifecycleState","uuid","randomUuid","state","setScope","updateFunc","scope","getScope","console","error","concat","deleteScope","scopeUuid","type","fixtureResult","wrappedFixture","setFixtureResult","createFixtureResult","start","Date","now","fixtures","fixture","getFixtureResult","opts","startStop","stop","duration","stage","Stage","FINISHED","result","scopeUuids","undefined","testResult","createTestResult","deepClone","notifier","beforeTestResultStart","tests","setTestResult","afterTestResultStart","getTestResult","beforeTestResultUpdate","afterTestResultUpdate","_testResult$testCaseI","_testResult$historyId","wrapped","getWrappedTestResult","beforeTestResultStop","testCaseId","getTestResultTestCaseId","historyId","getTestResultHistoryId","labels","parameters","description","_testResult$descripti","descriptionHtml","_testResult$descripti2","afterTestResultStop","hasSkipLabel","deleteTestResult","beforeTestResultWrite","writeResult","afterTestResultWrite","stepStack","currentStep","parentStepUuid","parent","JSON","stringify","stepResult","createStepResult","steps","setStepResult","addStep","step","getStepResult","beforeStepStop","afterStepStop","attachmentName","attachmentContentOrPath","options","_options$fileExtensio","isPath","fileExtension","extname","attachmentFileName","buildAttachmentFileName","contentType","writeAttachmentFromPath","writeAttachment","attachment","name","source","wrapInStep","timestamp","attachments","writeEnvironmentInfo","serializedCategories","map","c","messageRegex","RegExp","traceRegex","writeCategoriesDefinitions","messages","message","data","getWrappedFixtureResult","displayName","updateFixture","updateScope","linkConfig","formatLinks","updateTest","updateStep","startStep","status","statusDetails","stopStep","Buffer","from","content","encoding","path","root","getExecutionItem","_ref2","writtenFixtures","Set","deleteFixtureResult","add","befores","afters","writeGroup","children","normalisedDuration","Math","max","round","resolveWriter","Notifier","exports"],"sources":["../../../../src/sdk/reporter/ReporterRuntime.ts"],"sourcesContent":["/* eslint max-lines: 0 */\nimport { extname } from \"path\";\nimport {\n type Attachment,\n type AttachmentOptions,\n type FixtureResult,\n Stage,\n type StepResult,\n type TestResult,\n} from \"../../model.js\";\nimport type {\n Category,\n EnvironmentInfo,\n RuntimeAttachmentContentMessage,\n RuntimeAttachmentPathMessage,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n} from \"../types.js\";\nimport { LifecycleState } from \"./LifecycleState.js\";\nimport { Notifier } from \"./Notifier.js\";\nimport { createFixtureResult, createStepResult, createTestResult } from \"./factory.js\";\nimport { hasSkipLabel } from \"./testplan.js\";\nimport type {\n FixtureResultWrapper,\n FixtureType,\n LinkConfig,\n ReporterRuntimeConfig,\n TestScope,\n Writer,\n} from \"./types.js\";\nimport { deepClone, formatLinks, getTestResultHistoryId, getTestResultTestCaseId, randomUuid } from \"./utils.js\";\nimport { buildAttachmentFileName } from \"./utils/attachments.js\";\nimport { resolveWriter } from \"./writer/loader.js\";\n\ninterface StepStack {\n clear(): void;\n\n removeRoot(rootUuid: string): void;\n\n currentStep(rootUuid: string): string | undefined;\n\n addStep(rootUuid: string, stepUuid: string): void;\n\n removeStep(stepUuid: string): void;\n}\n\nclass DefaultStepStack implements StepStack {\n private stepsByRoot: Map<string, string[]> = new Map();\n private rootsByStep: Map<string, string> = new Map();\n\n clear = (): void => {\n this.stepsByRoot.clear();\n this.rootsByStep.clear();\n };\n\n removeRoot = (rootUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n this.stepsByRoot.delete(rootUuid);\n if (maybeValue) {\n maybeValue.forEach((stepUuid) => this.rootsByStep.delete(stepUuid));\n }\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n return maybeValue[maybeValue.length - 1];\n };\n\n addStep = (rootUuid: string, stepUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n this.stepsByRoot.set(rootUuid, [stepUuid]);\n } else {\n maybeValue.push(stepUuid);\n }\n this.rootsByStep.set(stepUuid, rootUuid);\n };\n\n removeStep(stepUuid: string) {\n const rootUuid = this.rootsByStep.get(stepUuid);\n if (!rootUuid) {\n return;\n }\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n const newValue = maybeValue.filter((value) => value !== stepUuid);\n this.stepsByRoot.set(rootUuid, newValue);\n }\n}\n\nexport class ReporterRuntime {\n private readonly state = new LifecycleState();\n private notifier: Notifier;\n private stepStack: StepStack = new DefaultStepStack();\n writer: Writer;\n categories?: Category[];\n environmentInfo?: EnvironmentInfo;\n linkConfig?: LinkConfig;\n\n constructor({ writer, listeners = [], environmentInfo, categories, links }: 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\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 testResult.testCaseId ??= getTestResultTestCaseId(testResult);\n testResult.historyId ??= getTestResultHistoryId(testResult);\n\n const startStop = this.#calculateTimings(testResult.start, opts?.stop, opts?.duration);\n testResult.start = startStop.start;\n testResult.stop = startStop.stop;\n\n const scopeUuids = wrapped.scopeUuids;\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n if (scope?.labels) {\n testResult.labels = [...testResult.labels, ...scope.labels];\n }\n if (scope?.links) {\n testResult.links = [...testResult.links, ...scope.links];\n }\n if (scope?.parameters) {\n testResult.parameters = [...testResult.parameters, ...scope.parameters];\n }\n if (scope?.description) {\n testResult.description = testResult.description ?? scope.description;\n }\n if (scope?.descriptionHtml) {\n testResult.descriptionHtml = testResult.descriptionHtml ?? scope.descriptionHtml;\n }\n });\n\n this.notifier.afterTestResultStop(testResult);\n };\n\n writeTest = (uuid: string) => {\n const testResult = this.state.getTestResult(uuid);\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not write test result: no test with uuid ${uuid} is found`);\n return;\n }\n\n if (hasSkipLabel(testResult.labels)) {\n this.state.deleteTestResult(uuid);\n return;\n }\n\n this.notifier.beforeTestResultWrite(testResult);\n\n this.writer.writeResult(testResult);\n this.state.deleteTestResult(uuid);\n\n this.notifier.afterTestResultWrite(testResult);\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n return this.stepStack.currentStep(rootUuid);\n };\n\n startStep = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n result: Partial<StepResult>,\n ): string | undefined => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not start test step: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n const stepResult: StepResult = {\n ...createStepResult(),\n start: Date.now(),\n ...result,\n };\n parent.steps.push(stepResult);\n const stepUuid = randomUuid();\n this.state.setStepResult(stepUuid, stepResult);\n\n this.stepStack.addStep(rootUuid, stepUuid);\n\n return stepUuid;\n };\n\n updateStep = (uuid: string, updateFunc: (stepResult: StepResult) => void) => {\n const step = this.state.getStepResult(uuid)!;\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not update test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(step);\n };\n\n stopStep = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const step = this.state.getStepResult(uuid);\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n this.notifier.beforeStepStop(step);\n\n const startStop = this.#calculateTimings(step.start, opts?.stop, opts?.duration);\n step.start = startStop.start;\n step.stop = startStop.stop;\n\n step.stage = Stage.FINISHED;\n\n this.stepStack.removeStep(uuid);\n\n this.notifier.afterStepStop(step);\n };\n\n writeAttachment = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n attachmentName: string,\n attachmentContentOrPath: Buffer | string,\n options: AttachmentOptions & { wrapInStep?: boolean; timestamp?: number },\n ) => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not write test attachment: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n\n const isPath = typeof attachmentContentOrPath === \"string\";\n const fileExtension = options.fileExtension ?? (isPath ? extname(attachmentContentOrPath) : undefined);\n const attachmentFileName = buildAttachmentFileName({\n contentType: options.contentType,\n fileExtension,\n });\n\n if (isPath) {\n this.writer.writeAttachmentFromPath(attachmentFileName, attachmentContentOrPath);\n } else {\n this.writer.writeAttachment(attachmentFileName, attachmentContentOrPath);\n }\n\n const attachment: Attachment = {\n name: attachmentName,\n source: attachmentFileName,\n type: options.contentType,\n };\n\n if (options.wrapInStep) {\n const { timestamp = Date.now() } = options;\n parent.steps.push({\n name: attachmentName,\n attachments: [attachment],\n start: timestamp,\n stop: timestamp,\n } as StepResult);\n } else {\n parent.attachments.push(attachment);\n }\n };\n\n writeEnvironmentInfo = () => {\n if (!this.environmentInfo) {\n return;\n }\n\n this.writer.writeEnvironmentInfo(this.environmentInfo);\n };\n\n writeCategoriesDefinitions = () => {\n if (!this.categories) {\n return;\n }\n\n const serializedCategories = this.categories.map((c) => {\n if (c.messageRegex instanceof RegExp) {\n c.messageRegex = c.messageRegex.source;\n }\n\n if (c.traceRegex instanceof RegExp) {\n c.traceRegex = c.traceRegex.source;\n }\n\n return c;\n });\n\n this.writer.writeCategoriesDefinitions(serializedCategories);\n };\n\n applyRuntimeMessages = (rootUuid: string, messages: RuntimeMessage[]) => {\n messages.forEach((message) => {\n switch (message.type) {\n case \"metadata\":\n this.#handleMetadataMessage(rootUuid, message.data);\n return;\n case \"step_metadata\":\n this.#handleStepMetadataMessage(rootUuid, message.data);\n return;\n case \"step_start\":\n this.#handleStartStepMessage(rootUuid, message.data);\n return;\n case \"step_stop\":\n this.#handleStopStepMessage(rootUuid, message.data);\n return;\n case \"attachment_content\":\n this.#handleAttachmentContentMessage(rootUuid, message.data);\n return;\n case \"attachment_path\":\n this.#handleAttachmentPathMessage(rootUuid, message.data);\n return;\n default:\n // eslint-disable-next-line no-console\n console.error(`could not apply runtime messages: unknown message ${JSON.stringify(message)}`);\n return;\n }\n });\n };\n\n #handleMetadataMessage = (rootUuid: string, message: RuntimeMetadataMessage[\"data\"]) => {\n // only display name could be set to fixture.\n const fixtureResult = this.state.getWrappedFixtureResult(rootUuid);\n const { links, labels, parameters, displayName, testCaseId, historyId, description, descriptionHtml } = message;\n\n if (fixtureResult) {\n if (displayName) {\n this.updateFixture(rootUuid, (result) => {\n result.name = displayName;\n });\n }\n\n if (historyId) {\n // eslint-disable-next-line no-console\n console.error(\"historyId can't be changed within test fixtures\");\n }\n if (testCaseId) {\n // eslint-disable-next-line no-console\n console.error(\"testCaseId can't be changed within test fixtures\");\n }\n\n if (links || labels || parameters || description || descriptionHtml) {\n // in some frameworks, afterEach methods can be executed before test stop event, while\n // in others after. To remove the possible undetermined behaviour we only allow\n // using runtime metadata API in before hooks.\n if (fixtureResult.type === \"after\") {\n // eslint-disable-next-line no-console\n console.error(\"metadata messages isn't supported for after test fixtures\");\n return;\n }\n\n this.updateScope(fixtureResult.scopeUuid, (scope) => {\n if (links) {\n scope.links = [...scope.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n scope.labels = [...scope.labels, ...labels];\n }\n if (parameters) {\n scope.parameters = [...scope.parameters, ...parameters];\n }\n if (description) {\n scope.description = description;\n }\n if (descriptionHtml) {\n scope.descriptionHtml = descriptionHtml;\n }\n });\n }\n\n return;\n }\n\n this.updateTest(rootUuid, (result) => {\n if (links) {\n result.links = [...result.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n result.labels = [...result.labels, ...labels];\n }\n if (parameters) {\n result.parameters = [...result.parameters, ...parameters];\n }\n if (displayName) {\n result.name = displayName;\n }\n if (testCaseId) {\n result.testCaseId = testCaseId;\n }\n if (historyId) {\n result.historyId = historyId;\n }\n if (description) {\n result.description = description;\n }\n if (descriptionHtml) {\n result.descriptionHtml = descriptionHtml;\n }\n });\n };\n\n #handleStepMetadataMessage = (rootUuid: string, message: RuntimeStepMetadataMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step metadata message: no step is running\");\n return;\n }\n const { name, parameters } = message;\n this.updateStep(stepUuid, (stepResult) => {\n if (name) {\n stepResult.name = name;\n }\n if (parameters) {\n stepResult.parameters = [...stepResult.parameters, ...parameters];\n }\n });\n };\n\n #handleStartStepMessage = (rootUuid: string, message: RuntimeStartStepMessage[\"data\"]) => {\n this.startStep(rootUuid, undefined, { ...message });\n };\n\n #handleStopStepMessage = (rootUuid: string, message: RuntimeStopStepMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step stop message: no step is running\");\n return;\n }\n this.updateStep(stepUuid, (result) => {\n if (message.status && !result.status) {\n result.status = message.status;\n }\n if (message.statusDetails) {\n result.statusDetails = { ...result.statusDetails, ...message.statusDetails };\n }\n });\n this.stopStep(stepUuid, { stop: message.stop });\n };\n\n #handleAttachmentContentMessage = (rootUuid: string, message: RuntimeAttachmentContentMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, Buffer.from(message.content, message.encoding), {\n encoding: message.encoding,\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #handleAttachmentPathMessage = (rootUuid: string, message: RuntimeAttachmentPathMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, message.path, {\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #findParent = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n ): FixtureResult | TestResult | StepResult | undefined => {\n const root = this.state.getExecutionItem(rootUuid);\n if (!root) {\n return;\n }\n\n if (parentStepUuid === null) {\n return root;\n } else if (parentStepUuid === undefined) {\n const stepUuid = this.currentStep(rootUuid);\n return stepUuid ? this.state.getStepResult(stepUuid) : root;\n } else {\n return this.state.getStepResult(parentStepUuid);\n }\n };\n\n #writeFixturesOfScope = ({ fixtures, tests }: TestScope) => {\n const writtenFixtures = new Set<string>();\n if (tests.length) {\n for (const wrappedFixture of fixtures) {\n if (!writtenFixtures.has(wrappedFixture.uuid)) {\n this.#writeContainer(tests, wrappedFixture);\n this.state.deleteFixtureResult(wrappedFixture.uuid);\n writtenFixtures.add(wrappedFixture.uuid);\n }\n }\n }\n };\n\n #writeContainer = (tests: string[], wrappedFixture: FixtureResultWrapper) => {\n const fixture = wrappedFixture.value;\n const befores = wrappedFixture.type === \"before\" ? [wrappedFixture.value] : [];\n const afters = wrappedFixture.type === \"after\" ? [wrappedFixture.value] : [];\n this.writer.writeGroup({\n uuid: wrappedFixture.uuid,\n name: fixture.name,\n children: [...new Set(tests)],\n befores,\n afters,\n });\n };\n\n #calculateTimings = (start?: number, stop?: number, duration?: number): { start?: number; stop?: number } => {\n const result: { start?: number; stop?: number } = { start, stop };\n if (duration) {\n const normalisedDuration = Math.max(0, duration);\n if (result.stop !== undefined) {\n result.start = result.stop - normalisedDuration;\n } else if (result.start !== undefined) {\n result.stop = result.start + normalisedDuration;\n } else {\n result.stop = Date.now();\n result.start = result.stop - normalisedDuration;\n }\n } else {\n if (result.stop === undefined) {\n result.stop = Date.now();\n }\n if (result.start === undefined) {\n result.start = result.stop;\n }\n }\n return {\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,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAmBA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AASA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AAAmD,SAAAS,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAA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
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../src/sdk/types.ts"],"sourcesContent":["import type { Label, Link, Parameter, Status, StatusDetails, TestResult, TestResultContainer } from \"../model.js\";\n\ntype RuntimeMessageBase<T extends string> = {\n type: T;\n};\n\nexport type RuntimeMetadataMessage = RuntimeMessageBase<\"metadata\"> & {\n data: {\n labels?: Label[];\n links?: Link[];\n parameters?: Parameter[];\n description?: string;\n descriptionHtml?: string;\n testCaseId?: string;\n historyId?: string;\n displayName?: string;\n };\n};\n\nexport type RuntimeStartStepMessage = RuntimeMessageBase<\"step_start\"> & {\n data: {\n name: string;\n start: number;\n };\n};\n\nexport type RuntimeStepMetadataMessage = RuntimeMessageBase<\"step_metadata\"> & {\n data: {\n name?: string;\n parameters?: Parameter[];\n };\n};\n\nexport type RuntimeStopStepMessage = RuntimeMessageBase<\"step_stop\"> & {\n data: {\n stop: number;\n status: Status;\n statusDetails?: StatusDetails;\n };\n};\n\nexport type RuntimeAttachmentContentMessage = RuntimeMessageBase<\"attachment_content\"> & {\n data: {\n name: string;\n content: string;\n encoding: BufferEncoding;\n contentType: string;\n fileExtension?: string;\n wrapInStep?: boolean;\n timestamp?: number;\n };\n};\n\nexport type RuntimeAttachmentPathMessage = RuntimeMessageBase<\"attachment_path\"> & {\n data: {\n name: string;\n path: string;\n contentType: string;\n fileExtension?: string;\n wrapInStep?: boolean;\n timestamp?: number;\n };\n};\n\nexport type RuntimeMessage =\n | RuntimeMetadataMessage\n | RuntimeStartStepMessage\n | RuntimeStepMetadataMessage\n | RuntimeStopStepMessage\n | RuntimeAttachmentContentMessage\n | RuntimeAttachmentPathMessage;\n\nexport interface TestPlanV1Test {\n id?: string | number;\n selector?: string;\n}\n\nexport interface TestPlanV1 {\n version: \"1.0\";\n tests: TestPlanV1Test[];\n}\n\nexport type EnvironmentInfo = Record<string, string | undefined>;\n\nexport interface Category {\n name?: string;\n description?: string;\n descriptionHtml?: string;\n messageRegex?: string | RegExp;\n traceRegex?: string | RegExp;\n matchedStatuses?: Status[];\n flaky?: boolean;\n}\n\nexport interface ExecutorInfo {\n name?: string;\n type?: string;\n url?: string;\n buildOrder?: number;\n buildName?: string;\n buildUrl?: string;\n reportUrl?: string;\n reportName?: string;\n}\n\nexport interface AllureResults {\n tests: TestResult[];\n groups: TestResultContainer[];\n attachments: Record<string, Buffer | string>;\n envInfo?: EnvironmentInfo;\n categories?: Category[];\n}\n\nexport type SerializeOptions = {\n maxDepth?: number;\n maxLength?: number;\n};\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/sdk/types.ts"],"sourcesContent":["import type { Label, Link, Parameter, Status, StatusDetails, TestResult, TestResultContainer } from \"../model.js\";\n\ntype RuntimeMessageBase<T extends string> = {\n type: T;\n};\n\nexport type RuntimeMetadataMessage = RuntimeMessageBase<\"metadata\"> & {\n data: {\n labels?: Label[];\n links?: Link[];\n parameters?: Parameter[];\n description?: string;\n descriptionHtml?: string;\n testCaseId?: string;\n historyId?: string;\n displayName?: string;\n };\n};\n\nexport type RuntimeStartStepMessage = RuntimeMessageBase<\"step_start\"> & {\n data: {\n name: string;\n start: number;\n };\n};\n\nexport type RuntimeStepMetadataMessage = RuntimeMessageBase<\"step_metadata\"> & {\n data: {\n name?: string;\n parameters?: Parameter[];\n };\n};\n\nexport type RuntimeStopStepMessage = RuntimeMessageBase<\"step_stop\"> & {\n data: {\n stop: number;\n status: Status;\n statusDetails?: StatusDetails;\n };\n};\n\nexport type RuntimeAttachmentContentMessage = RuntimeMessageBase<\"attachment_content\"> & {\n data: {\n name: string;\n content: string;\n encoding: BufferEncoding;\n contentType: string;\n fileExtension?: string;\n wrapInStep?: boolean;\n timestamp?: number;\n };\n};\n\nexport type RuntimeAttachmentPathMessage = RuntimeMessageBase<\"attachment_path\"> & {\n data: {\n name: string;\n path: string;\n contentType: string;\n fileExtension?: string;\n wrapInStep?: boolean;\n timestamp?: number;\n };\n};\n\nexport type RuntimeMessage =\n | RuntimeMetadataMessage\n | RuntimeStartStepMessage\n | RuntimeStepMetadataMessage\n | RuntimeStopStepMessage\n | RuntimeAttachmentContentMessage\n | RuntimeAttachmentPathMessage;\n\nexport interface TestPlanV1Test {\n id?: string | number;\n selector?: string;\n}\n\nexport interface TestPlanV1 {\n version: \"1.0\";\n tests: TestPlanV1Test[];\n}\n\nexport type EnvironmentInfo = Record<string, string | undefined>;\n\nexport interface Category {\n name?: string;\n description?: string;\n descriptionHtml?: string;\n messageRegex?: string | RegExp;\n traceRegex?: string | RegExp;\n matchedStatuses?: Status[];\n flaky?: boolean;\n}\n\nexport interface ExecutorInfo {\n name?: string;\n type?: string;\n url?: string;\n buildOrder?: number;\n buildName?: string;\n buildUrl?: string;\n reportUrl?: string;\n reportName?: string;\n}\n\nexport interface AllureResults {\n tests: TestResult[];\n groups: TestResultContainer[];\n attachments: Record<string, Buffer | string>;\n envInfo?: EnvironmentInfo;\n categories?: Category[];\n}\n\nexport type SerializerReplacerFunc = (this: unknown, key: string, value: unknown) => unknown;\n\nexport type SerializeOptions = {\n maxDepth?: number;\n maxLength?: number;\n replacer?: SerializerReplacerFunc;\n};\n"],"mappings":"","ignoreList":[]}
|
package/dist/cjs/sdk/utils.js
CHANGED
|
@@ -18,11 +18,12 @@ var getStatusFromError = error => {
|
|
|
18
18
|
*/
|
|
19
19
|
case /assert/gi.test(error.constructor.name):
|
|
20
20
|
case /expectation/gi.test(error.constructor.name):
|
|
21
|
-
case /assert/gi.test(error.name):
|
|
22
|
-
case /assert/gi.test(error.message):
|
|
21
|
+
case error.name && /assert/gi.test(error.name):
|
|
22
|
+
case error.message && /assert/gi.test(error.message):
|
|
23
23
|
case error.stack && /@vitest\/expect/gi.test(error.stack):
|
|
24
24
|
case error.stack && /playwright\/lib\/matchers\/expect\.js/gi.test(error.stack):
|
|
25
25
|
case "matcherResult" in error:
|
|
26
|
+
case "inspect" in error && typeof error.inspect === "function":
|
|
26
27
|
return _model.Status.FAILED;
|
|
27
28
|
default:
|
|
28
29
|
return _model.Status.BROKEN;
|
|
@@ -149,13 +150,14 @@ exports.isPromise = isPromise;
|
|
|
149
150
|
var serialize = exports.serialize = function serialize(value) {
|
|
150
151
|
var {
|
|
151
152
|
maxDepth = 0,
|
|
152
|
-
maxLength = 0
|
|
153
|
+
maxLength = 0,
|
|
154
|
+
replacer
|
|
153
155
|
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
154
|
-
return limitString(typeof value === "object" ? JSON.stringify(value, createSerializeReplacer(maxDepth)) : String(value), maxLength);
|
|
156
|
+
return limitString(typeof value === "object" ? JSON.stringify(value, createSerializeReplacer(maxDepth, replacer)) : String(value), maxLength);
|
|
155
157
|
};
|
|
156
|
-
var createSerializeReplacer = maxDepth => {
|
|
158
|
+
var createSerializeReplacer = (maxDepth, userDefinedReplacer) => {
|
|
157
159
|
var parents = [];
|
|
158
|
-
|
|
160
|
+
var limitingReplacer = function limitingReplacer(_, value) {
|
|
159
161
|
if (typeof value !== "object" || value === null) {
|
|
160
162
|
return value;
|
|
161
163
|
}
|
|
@@ -168,6 +170,10 @@ var createSerializeReplacer = maxDepth => {
|
|
|
168
170
|
parents.push(value);
|
|
169
171
|
return value instanceof Map ? excludeCircularRefsFromMap(parents, value) : value instanceof Set ? excludeCircularRefsFromSet(parents, value) : value;
|
|
170
172
|
};
|
|
173
|
+
return userDefinedReplacer ? composeReplacers(userDefinedReplacer, limitingReplacer) : limitingReplacer;
|
|
174
|
+
};
|
|
175
|
+
var composeReplacers = (first, second) => function (k, v) {
|
|
176
|
+
return second.call(this, k, first.call(this, k, v));
|
|
171
177
|
};
|
|
172
178
|
var excludeCircularRefsFromMap = (parents, map) => {
|
|
173
179
|
return Array.from(map).filter(_ref => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["_model","require","_wrapRegExp","e","r","BabelRegExp","RegExp","prototype","WeakMap","t","p","o","set","get","_setPrototypeOf","buildGroups","Object","keys","reduce","i","length","create","_inherits","exec","call","groups","indices","Symbol","replace","Array","isArray","join","arguments","slice","push","apply","TypeError","constructor","value","writable","configurable","defineProperty","setPrototypeOf","bind","__proto__","getStatusFromError","error","test","name","message","stack","Status","FAILED","BROKEN","exports","ansiRegex","onlyFirst","undefined","pattern","stripAnsi","str","regex","getMessageAndTraceFromError","trace","allureIdRegexp","id","allureIdRegexpGlobal","allureLabelRegexp","allureLabelRegexpGlobal","isMetadataTag","tag","extractMetadataFromString","title","labels","split","forEach","val","_val$match","idValue","match","LabelName","ALLURE_ID","labelMatch","cleanTitle","trim","isAnyStepFailed","item","isFailed","status","steps","find","step","isAllStepsEnded","every","stop","hasLabel","testResult","labelName","l","hasStepMessage","messages","some","type","getStepsMessagesPair","acc","unfinishedStepIdx","findLastIndex","getUnfinishedStepsMessages","grouppedStepsMessage","filter","isPromise","obj","then","serialize","maxDepth","maxLength","limitString","JSON","stringify","createSerializeReplacer","String","parents","_","is","at","pop","includes","Map","excludeCircularRefsFromMap","Set","excludeCircularRefsFromSet","map","from","_ref","k","_ref2","v","concat","substring"],"sources":["../../../src/sdk/utils.ts"],"sourcesContent":["import type { FixtureResult, Label, StatusDetails, StepResult, TestResult } from \"../model.js\";\nimport { LabelName, Status } from \"../model.js\";\nimport type { RuntimeMessage, SerializeOptions } from \"./types.js\";\n\nexport const getStatusFromError = (error: Error): Status => {\n switch (true) {\n /**\n * Native `node:assert` and `chai` (`vitest` uses it under the hood) throw `AssertionError`\n * `jest` throws `JestAssertionError` instance\n * `jasmine` throws `ExpectationFailed` instance\n * `vitest` throws `Error` for extended assertions, so we look into stack\n */\n case /assert/gi.test(error.constructor.name):\n case /expectation/gi.test(error.constructor.name):\n case /assert/gi.test(error.name):\n case /assert/gi.test(error.message):\n case error.stack && /@vitest\\/expect/gi.test(error.stack):\n case error.stack && /playwright\\/lib\\/matchers\\/expect\\.js/gi.test(error.stack):\n case \"matcherResult\" in error:\n return Status.FAILED;\n default:\n return Status.BROKEN;\n }\n};\n\n/**\n * Source: https://github.com/chalk/ansi-regex\n */\nconst ansiRegex = ({ onlyFirst = false } = {}) => {\n const pattern = [\n \"[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)\",\n \"(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-nq-uy=><~]))\",\n ].join(\"|\");\n\n return new RegExp(pattern, onlyFirst ? undefined : \"g\");\n};\n\n/**\n * https://github.com/chalk/strip-ansi\n */\nexport const stripAnsi = (str: string): string => {\n const regex = ansiRegex();\n return str.replace(regex, \"\");\n};\n\nexport const getMessageAndTraceFromError = (\n error: Error | { message?: string; stack?: string },\n): Pick<StatusDetails, \"message\" | \"trace\"> => {\n const { message, stack } = error;\n return {\n message: message ? stripAnsi(message) : undefined,\n trace: stack ? stripAnsi(stack) : undefined,\n };\n};\n\nexport const allureIdRegexp = /(?:^|\\s)@?allure\\.id[:=](?<id>[^\\s]+)/;\nexport const allureIdRegexpGlobal = new RegExp(allureIdRegexp, \"g\");\nexport const allureLabelRegexp = /(?:^|\\s)@?allure\\.label\\.(?<name>[^:=\\s]+)[:=](?<value>[^\\s]+)/;\nexport const allureLabelRegexpGlobal = new RegExp(allureLabelRegexp, \"g\");\n\nexport const isMetadataTag = (tag: string) => {\n return allureIdRegexp.test(tag) || allureLabelRegexp.test(tag);\n};\n\nexport const extractMetadataFromString = (\n title: string,\n): {\n labels: Label[];\n cleanTitle: string;\n} => {\n const labels = [] as Label[];\n\n title.split(\" \").forEach((val) => {\n const idValue = val.match(allureIdRegexp)?.groups?.id;\n\n if (idValue) {\n labels.push({ name: LabelName.ALLURE_ID, value: idValue });\n }\n\n const labelMatch = val.match(allureLabelRegexp);\n const { name, value } = labelMatch?.groups || {};\n\n if (name && value) {\n labels?.push({ name, value });\n }\n });\n\n const cleanTitle = title.replace(allureLabelRegexpGlobal, \"\").replace(allureIdRegexpGlobal, \"\").trim();\n\n return { labels, cleanTitle };\n};\n\nexport const isAnyStepFailed = (item: StepResult | TestResult | FixtureResult): boolean => {\n const isFailed = item.status === Status.FAILED;\n\n if (isFailed || item.steps.length === 0) {\n return isFailed;\n }\n\n return !!item.steps.find((step) => isAnyStepFailed(step));\n};\n\nexport const isAllStepsEnded = (item: StepResult | TestResult | FixtureResult): boolean => {\n return item.steps.every((val) => val.stop && isAllStepsEnded(val));\n};\n\nexport const hasLabel = (testResult: TestResult, labelName: LabelName | string): boolean => {\n return !!testResult.labels.find((l) => l.name === labelName);\n};\n\nexport const hasStepMessage = (messages: RuntimeMessage[]) => {\n return messages.some((message) => message.type === \"step_start\" || message.type === \"step_stop\");\n};\n\nexport const getStepsMessagesPair = (messages: RuntimeMessage[]) =>\n messages.reduce((acc, message) => {\n if (message.type !== \"step_start\" && message.type !== \"step_stop\") {\n return acc;\n }\n\n if (message.type === \"step_start\") {\n acc.push([message]);\n\n return acc;\n }\n\n const unfinishedStepIdx = acc.findLastIndex((step) => step.length === 1);\n\n if (unfinishedStepIdx === -1) {\n return acc;\n }\n\n acc[unfinishedStepIdx].push(message);\n\n return acc;\n }, [] as RuntimeMessage[][]);\n\nexport const getUnfinishedStepsMessages = (messages: RuntimeMessage[]) => {\n const grouppedStepsMessage = getStepsMessagesPair(messages);\n\n return grouppedStepsMessage.filter((step) => step.length === 1);\n};\n\nexport const isPromise = <T = any>(obj: any): obj is PromiseLike<T> =>\n !!obj && (typeof obj === \"object\" || typeof obj === \"function\") && typeof obj.then === \"function\";\n\nexport const serialize = (value: any, { maxDepth = 0, maxLength = 0 }: SerializeOptions = {}): string =>\n limitString(\n typeof value === \"object\" ? JSON.stringify(value, createSerializeReplacer(maxDepth)) : String(value),\n maxLength,\n );\n\nconst createSerializeReplacer = (maxDepth: number) => {\n const parents: any[] = [];\n return function (this: any, _: string, value: unknown) {\n if (typeof value !== \"object\" || value === null) {\n return value;\n }\n\n while (parents.length > 0 && !Object.is(parents.at(-1), this)) {\n parents.pop();\n }\n\n if ((maxDepth && parents.length >= maxDepth) || parents.includes(value)) {\n return undefined;\n }\n\n parents.push(value);\n\n return value instanceof Map\n ? excludeCircularRefsFromMap(parents, value)\n : value instanceof Set\n ? excludeCircularRefsFromSet(parents, value)\n : value;\n };\n};\n\nconst excludeCircularRefsFromMap = (parents: any[], map: Map<any, any>) => {\n return Array.from(map)\n .filter(([k]) => !parents.includes(k))\n .map(([k, v]) => [k, parents.includes(v) ? undefined : v]);\n};\n\nconst excludeCircularRefsFromSet = (parents: any[], set: Set<any>) => {\n return Array.from(set).map((v) => (parents.includes(v) ? undefined : v));\n};\n\nconst limitString = (value: string, maxLength: number) =>\n maxLength && value.length > maxLength ? `${value.substring(0, maxLength)}...` : value;\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAAgD,SAAAC,YAAA,IAAAA,WAAA,YAAAA,YAAAC,CAAA,EAAAC,CAAA,eAAAC,WAAA,CAAAF,CAAA,UAAAC,CAAA,UAAAD,CAAA,GAAAG,MAAA,CAAAC,SAAA,EAAAH,CAAA,OAAAI,OAAA,aAAAH,YAAAF,CAAA,EAAAM,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAL,MAAA,CAAAH,CAAA,EAAAM,CAAA,UAAAL,CAAA,CAAAQ,GAAA,CAAAD,CAAA,EAAAD,CAAA,IAAAN,CAAA,CAAAS,GAAA,CAAAV,CAAA,IAAAW,eAAA,CAAAH,CAAA,EAAAN,WAAA,CAAAE,SAAA,cAAAQ,YAAAZ,CAAA,EAAAM,CAAA,QAAAC,CAAA,GAAAN,CAAA,CAAAS,GAAA,CAAAJ,CAAA,UAAAO,MAAA,CAAAC,IAAA,CAAAP,CAAA,EAAAQ,MAAA,WAAAd,CAAA,EAAAK,CAAA,QAAAE,CAAA,GAAAD,CAAA,CAAAD,CAAA,0BAAAE,CAAA,EAAAP,CAAA,CAAAK,C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;IAEnB,OAAOA,KAAK,YAAYyF,GAAG,GACvBC,0BAA0B,CAACP,OAAO,EAAEnF,KAAK,CAAC,GAC1CA,KAAK,YAAY2F,GAAG,GAClBC,0BAA0B,CAACT,OAAO,EAAEnF,KAAK,CAAC,GAC1CA,KAAK;EACb,CAAC;AACH,CAAC;AAED,IAAM0F,0BAA0B,GAAGA,CAACP,OAAc,EAAEU,GAAkB,KAAK;EACzE,OAAOtG,KAAK,CAACuG,IAAI,CAACD,GAAG,CAAC,CACnBtB,MAAM,CAACwB,IAAA;IAAA,IAAC,CAACC,CAAC,CAAC,GAAAD,IAAA;IAAA,OAAK,CAACZ,OAAO,CAACK,QAAQ,CAACQ,CAAC,CAAC;EAAA,EAAC,CACrCH,GAAG,CAACI,KAAA;IAAA,IAAC,CAACD,CAAC,EAAEE,CAAC,CAAC,GAAAD,KAAA;IAAA,OAAK,CAACD,CAAC,EAAEb,OAAO,CAACK,QAAQ,CAACU,CAAC,CAAC,GAAG/E,SAAS,GAAG+E,CAAC,CAAC;EAAA,EAAC;AAC9D,CAAC;AAED,IAAMN,0BAA0B,GAAGA,CAACT,OAAc,EAAE7G,GAAa,KAAK;EACpE,OAAOiB,KAAK,CAACuG,IAAI,CAACxH,GAAG,CAAC,CAACuH,GAAG,CAAEK,CAAC,IAAMf,OAAO,CAACK,QAAQ,CAACU,CAAC,CAAC,GAAG/E,SAAS,GAAG+E,CAAE,CAAC;AAC1E,CAAC;AAED,IAAMpB,WAAW,GAAGA,CAAC9E,KAAa,EAAE6E,SAAiB,KACnDA,SAAS,IAAI7E,KAAK,CAAClB,MAAM,GAAG+F,SAAS,MAAAsB,MAAA,CAAMnG,KAAK,CAACoG,SAAS,CAAC,CAAC,EAAEvB,SAAS,CAAC,WAAQ7E,KAAK","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"utils.js","names":["_model","require","_wrapRegExp","e","r","BabelRegExp","RegExp","prototype","WeakMap","t","p","o","set","get","_setPrototypeOf","buildGroups","Object","keys","reduce","i","length","create","_inherits","exec","call","groups","indices","Symbol","replace","Array","isArray","join","arguments","slice","push","apply","TypeError","constructor","value","writable","configurable","defineProperty","setPrototypeOf","bind","__proto__","getStatusFromError","error","test","name","message","stack","inspect","Status","FAILED","BROKEN","exports","ansiRegex","onlyFirst","undefined","pattern","stripAnsi","str","regex","getMessageAndTraceFromError","trace","allureIdRegexp","id","allureIdRegexpGlobal","allureLabelRegexp","allureLabelRegexpGlobal","isMetadataTag","tag","extractMetadataFromString","title","labels","split","forEach","val","_val$match","idValue","match","LabelName","ALLURE_ID","labelMatch","cleanTitle","trim","isAnyStepFailed","item","isFailed","status","steps","find","step","isAllStepsEnded","every","stop","hasLabel","testResult","labelName","l","hasStepMessage","messages","some","type","getStepsMessagesPair","acc","unfinishedStepIdx","findLastIndex","getUnfinishedStepsMessages","grouppedStepsMessage","filter","isPromise","obj","then","serialize","maxDepth","maxLength","replacer","limitString","JSON","stringify","createSerializeReplacer","String","userDefinedReplacer","parents","limitingReplacer","_","is","at","pop","includes","Map","excludeCircularRefsFromMap","Set","excludeCircularRefsFromSet","composeReplacers","first","second","k","v","map","from","_ref","_ref2","concat","substring"],"sources":["../../../src/sdk/utils.ts"],"sourcesContent":["import type { FixtureResult, Label, StatusDetails, StepResult, TestResult } from \"../model.js\";\nimport { LabelName, Status } from \"../model.js\";\nimport type { RuntimeMessage, SerializeOptions, SerializerReplacerFunc } from \"./types.js\";\n\nexport const getStatusFromError = (error: Partial<Error>): Status => {\n switch (true) {\n /**\n * Native `node:assert` and `chai` (`vitest` uses it under the hood) throw `AssertionError`\n * `jest` throws `JestAssertionError` instance\n * `jasmine` throws `ExpectationFailed` instance\n * `vitest` throws `Error` for extended assertions, so we look into stack\n */\n case /assert/gi.test(error.constructor.name):\n case /expectation/gi.test(error.constructor.name):\n case error.name && /assert/gi.test(error.name):\n case error.message && /assert/gi.test(error.message):\n case error.stack && /@vitest\\/expect/gi.test(error.stack):\n case error.stack && /playwright\\/lib\\/matchers\\/expect\\.js/gi.test(error.stack):\n case \"matcherResult\" in error:\n case \"inspect\" in error && typeof error.inspect === \"function\":\n return Status.FAILED;\n default:\n return Status.BROKEN;\n }\n};\n\n/**\n * Source: https://github.com/chalk/ansi-regex\n */\nconst ansiRegex = ({ onlyFirst = false } = {}) => {\n const pattern = [\n \"[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)\",\n \"(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-nq-uy=><~]))\",\n ].join(\"|\");\n\n return new RegExp(pattern, onlyFirst ? undefined : \"g\");\n};\n\n/**\n * https://github.com/chalk/strip-ansi\n */\nexport const stripAnsi = (str: string): string => {\n const regex = ansiRegex();\n return str.replace(regex, \"\");\n};\n\nexport const getMessageAndTraceFromError = (\n error: Error | { message?: string; stack?: string },\n): Pick<StatusDetails, \"message\" | \"trace\"> => {\n const { message, stack } = error;\n return {\n message: message ? stripAnsi(message) : undefined,\n trace: stack ? stripAnsi(stack) : undefined,\n };\n};\n\nexport const allureIdRegexp = /(?:^|\\s)@?allure\\.id[:=](?<id>[^\\s]+)/;\nexport const allureIdRegexpGlobal = new RegExp(allureIdRegexp, \"g\");\nexport const allureLabelRegexp = /(?:^|\\s)@?allure\\.label\\.(?<name>[^:=\\s]+)[:=](?<value>[^\\s]+)/;\nexport const allureLabelRegexpGlobal = new RegExp(allureLabelRegexp, \"g\");\n\nexport const isMetadataTag = (tag: string) => {\n return allureIdRegexp.test(tag) || allureLabelRegexp.test(tag);\n};\n\nexport const extractMetadataFromString = (\n title: string,\n): {\n labels: Label[];\n cleanTitle: string;\n} => {\n const labels = [] as Label[];\n\n title.split(\" \").forEach((val) => {\n const idValue = val.match(allureIdRegexp)?.groups?.id;\n\n if (idValue) {\n labels.push({ name: LabelName.ALLURE_ID, value: idValue });\n }\n\n const labelMatch = val.match(allureLabelRegexp);\n const { name, value } = labelMatch?.groups || {};\n\n if (name && value) {\n labels?.push({ name, value });\n }\n });\n\n const cleanTitle = title.replace(allureLabelRegexpGlobal, \"\").replace(allureIdRegexpGlobal, \"\").trim();\n\n return { labels, cleanTitle };\n};\n\nexport const isAnyStepFailed = (item: StepResult | TestResult | FixtureResult): boolean => {\n const isFailed = item.status === Status.FAILED;\n\n if (isFailed || item.steps.length === 0) {\n return isFailed;\n }\n\n return !!item.steps.find((step) => isAnyStepFailed(step));\n};\n\nexport const isAllStepsEnded = (item: StepResult | TestResult | FixtureResult): boolean => {\n return item.steps.every((val) => val.stop && isAllStepsEnded(val));\n};\n\nexport const hasLabel = (testResult: TestResult, labelName: LabelName | string): boolean => {\n return !!testResult.labels.find((l) => l.name === labelName);\n};\n\nexport const hasStepMessage = (messages: RuntimeMessage[]) => {\n return messages.some((message) => message.type === \"step_start\" || message.type === \"step_stop\");\n};\n\nexport const getStepsMessagesPair = (messages: RuntimeMessage[]) =>\n messages.reduce((acc, message) => {\n if (message.type !== \"step_start\" && message.type !== \"step_stop\") {\n return acc;\n }\n\n if (message.type === \"step_start\") {\n acc.push([message]);\n\n return acc;\n }\n\n const unfinishedStepIdx = acc.findLastIndex((step) => step.length === 1);\n\n if (unfinishedStepIdx === -1) {\n return acc;\n }\n\n acc[unfinishedStepIdx].push(message);\n\n return acc;\n }, [] as RuntimeMessage[][]);\n\nexport const getUnfinishedStepsMessages = (messages: RuntimeMessage[]) => {\n const grouppedStepsMessage = getStepsMessagesPair(messages);\n\n return grouppedStepsMessage.filter((step) => step.length === 1);\n};\n\nexport const isPromise = <T = any>(obj: any): obj is PromiseLike<T> =>\n !!obj && (typeof obj === \"object\" || typeof obj === \"function\") && typeof obj.then === \"function\";\n\nexport const serialize = (value: any, { maxDepth = 0, maxLength = 0, replacer }: SerializeOptions = {}): string =>\n limitString(\n typeof value === \"object\" ? JSON.stringify(value, createSerializeReplacer(maxDepth, replacer)) : String(value),\n maxLength,\n );\n\nconst createSerializeReplacer = (maxDepth: number, userDefinedReplacer: SerializeOptions[\"replacer\"]) => {\n const parents: unknown[] = [];\n const limitingReplacer = function (this: unknown, _: string, value: unknown) {\n if (typeof value !== \"object\" || value === null) {\n return value;\n }\n\n while (parents.length > 0 && !Object.is(parents.at(-1), this)) {\n parents.pop();\n }\n\n if ((maxDepth && parents.length >= maxDepth) || parents.includes(value)) {\n return undefined;\n }\n\n parents.push(value);\n\n return value instanceof Map\n ? excludeCircularRefsFromMap(parents, value)\n : value instanceof Set\n ? excludeCircularRefsFromSet(parents, value)\n : value;\n };\n return userDefinedReplacer ? composeReplacers(userDefinedReplacer, limitingReplacer) : limitingReplacer;\n};\n\nconst composeReplacers = (first: SerializerReplacerFunc, second: SerializerReplacerFunc): SerializerReplacerFunc =>\n function (k, v) {\n return second.call(this, k, first.call(this, k, v));\n };\n\nconst excludeCircularRefsFromMap = (parents: any[], map: Map<any, any>) => {\n return Array.from(map)\n .filter(([k]) => !parents.includes(k))\n .map(([k, v]) => [k, parents.includes(v) ? undefined : v]);\n};\n\nconst excludeCircularRefsFromSet = (parents: any[], set: Set<any>) => {\n return Array.from(set).map((v) => (parents.includes(v) ? undefined : v));\n};\n\nconst limitString = (value: string, maxLength: number) =>\n maxLength && value.length > maxLength ? `${value.substring(0, maxLength)}...` : value;\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAAgD,SAAAC,YAAA,IAAAA,WAAA,YAAAA,YAAAC,CAAA,EAAAC,CAAA,eAAAC,WAAA,CAAAF,CAAA,UAAAC,CAAA,UAAAD,CAAA,GAAAG,MAAA,CAAAC,SAAA,EAAAH,CAAA,OAAAI,OAAA,aAAAH,YAAAF,CAAA,EAAAM,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAL,MAAA,CAAAH,CAAA,EAAAM,CAAA,UAAAL,CAAA,CAAAQ,GAAA,CAAAD,CAAA,EAAAD,CAAA,IAA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CAACJ,CAAC,CAAC,GAAAI,IAAA;IAAA,OAAK,CAAClB,OAAO,CAACM,QAAQ,CAACQ,CAAC,CAAC;EAAA,EAAC,CACrCE,GAAG,CAACG,KAAA;IAAA,IAAC,CAACL,CAAC,EAAEC,CAAC,CAAC,GAAAI,KAAA;IAAA,OAAK,CAACL,CAAC,EAAEd,OAAO,CAACM,QAAQ,CAACS,CAAC,CAAC,GAAGjF,SAAS,GAAGiF,CAAC,CAAC;EAAA,EAAC;AAC9D,CAAC;AAED,IAAML,0BAA0B,GAAGA,CAACV,OAAc,EAAEhH,GAAa,KAAK;EACpE,OAAOiB,KAAK,CAACgH,IAAI,CAACjI,GAAG,CAAC,CAACgI,GAAG,CAAED,CAAC,IAAMf,OAAO,CAACM,QAAQ,CAACS,CAAC,CAAC,GAAGjF,SAAS,GAAGiF,CAAE,CAAC;AAC1E,CAAC;AAED,IAAMrB,WAAW,GAAGA,CAAChF,KAAa,EAAE8E,SAAiB,KACnDA,SAAS,IAAI9E,KAAK,CAAClB,MAAM,GAAGgG,SAAS,MAAA4B,MAAA,CAAM1G,KAAK,CAAC2G,SAAS,CAAC,CAAC,EAAE7B,SAAS,CAAC,WAAQ9E,KAAK","ignoreList":[]}
|
|
@@ -570,7 +570,10 @@ export class ReporterRuntime {
|
|
|
570
570
|
result.start = result.stop;
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
return
|
|
573
|
+
return {
|
|
574
|
+
start: result.start ? Math.round(result.start) : undefined,
|
|
575
|
+
stop: result.stop ? Math.round(result.stop) : undefined
|
|
576
|
+
};
|
|
574
577
|
});
|
|
575
578
|
this.writer = resolveWriter(writer);
|
|
576
579
|
this.notifier = new Notifier({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReporterRuntime.js","names":["extname","Stage","LifecycleState","Notifier","createFixtureResult","createStepResult","createTestResult","hasSkipLabel","deepClone","formatLinks","getTestResultHistoryId","getTestResultTestCaseId","randomUuid","buildAttachmentFileName","resolveWriter","DefaultStepStack","constructor","_defineProperty","Map","stepsByRoot","clear","rootsByStep","rootUuid","maybeValue","get","delete","forEach","stepUuid","length","set","push","removeStep","newValue","filter","value","_handleMetadataMessage","WeakMap","_handleStepMetadataMessage","_handleStartStepMessage","_handleStopStepMessage","_handleAttachmentContentMessage","_handleAttachmentPathMessage","_findParent","_writeFixturesOfScope","_writeContainer","_calculateTimings","ReporterRuntime","_ref","_this","writer","listeners","environmentInfo","categories","links","uuid","state","setScope","updateFunc","scope","getScope","console","error","concat","_classPrivateFieldGet","call","deleteScope","scopeUuid","type","fixtureResult","wrappedFixture","setFixtureResult","_objectSpread","start","Date","now","fixtures","fixture","getFixtureResult","opts","startStop","stop","duration","stage","FINISHED","result","scopeUuids","arguments","undefined","testResult","notifier","beforeTestResultStart","tests","setTestResult","afterTestResultStart","getTestResult","beforeTestResultUpdate","afterTestResultUpdate","_testResult$testCaseI","_testResult$historyId","wrapped","getWrappedTestResult","beforeTestResultStop","testCaseId","historyId","labels","parameters","description","_testResult$descripti","descriptionHtml","_testResult$descripti2","afterTestResultStop","deleteTestResult","beforeTestResultWrite","writeResult","afterTestResultWrite","stepStack","currentStep","parentStepUuid","parent","JSON","stringify","stepResult","steps","setStepResult","addStep","step","getStepResult","beforeStepStop","afterStepStop","attachmentName","attachmentContentOrPath","options","_options$fileExtensio","isPath","fileExtension","attachmentFileName","contentType","writeAttachmentFromPath","writeAttachment","attachment","name","source","wrapInStep","timestamp","attachments","writeEnvironmentInfo","serializedCategories","map","c","messageRegex","RegExp","traceRegex","writeCategoriesDefinitions","messages","message","data","_classPrivateFieldInitSpec","getWrappedFixtureResult","displayName","updateFixture","updateScope","linkConfig","updateTest","updateStep","startStep","status","statusDetails","stopStep","Buffer","from","content","encoding","path","root","getExecutionItem","_ref2","writtenFixtures","Set","has","deleteFixtureResult","add","befores","afters","writeGroup","children","normalisedDuration","Math","max"],"sources":["../../../../src/sdk/reporter/ReporterRuntime.ts"],"sourcesContent":["/* eslint max-lines: 0 */\nimport { extname } from \"path\";\nimport {\n type Attachment,\n type AttachmentOptions,\n type FixtureResult,\n Stage,\n type StepResult,\n type TestResult,\n} from \"../../model.js\";\nimport type {\n Category,\n EnvironmentInfo,\n RuntimeAttachmentContentMessage,\n RuntimeAttachmentPathMessage,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n} from \"../types.js\";\nimport { LifecycleState } from \"./LifecycleState.js\";\nimport { Notifier } from \"./Notifier.js\";\nimport { createFixtureResult, createStepResult, createTestResult } from \"./factory.js\";\nimport { hasSkipLabel } from \"./testplan.js\";\nimport type {\n FixtureResultWrapper,\n FixtureType,\n LinkConfig,\n ReporterRuntimeConfig,\n TestScope,\n Writer,\n} from \"./types.js\";\nimport { deepClone, formatLinks, getTestResultHistoryId, getTestResultTestCaseId, randomUuid } from \"./utils.js\";\nimport { buildAttachmentFileName } from \"./utils/attachments.js\";\nimport { resolveWriter } from \"./writer/loader.js\";\n\ninterface StepStack {\n clear(): void;\n\n removeRoot(rootUuid: string): void;\n\n currentStep(rootUuid: string): string | undefined;\n\n addStep(rootUuid: string, stepUuid: string): void;\n\n removeStep(stepUuid: string): void;\n}\n\nclass DefaultStepStack implements StepStack {\n private stepsByRoot: Map<string, string[]> = new Map();\n private rootsByStep: Map<string, string> = new Map();\n\n clear = (): void => {\n this.stepsByRoot.clear();\n this.rootsByStep.clear();\n };\n\n removeRoot = (rootUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n this.stepsByRoot.delete(rootUuid);\n if (maybeValue) {\n maybeValue.forEach((stepUuid) => this.rootsByStep.delete(stepUuid));\n }\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n return maybeValue[maybeValue.length - 1];\n };\n\n addStep = (rootUuid: string, stepUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n this.stepsByRoot.set(rootUuid, [stepUuid]);\n } else {\n maybeValue.push(stepUuid);\n }\n this.rootsByStep.set(stepUuid, rootUuid);\n };\n\n removeStep(stepUuid: string) {\n const rootUuid = this.rootsByStep.get(stepUuid);\n if (!rootUuid) {\n return;\n }\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n const newValue = maybeValue.filter((value) => value !== stepUuid);\n this.stepsByRoot.set(rootUuid, newValue);\n }\n}\n\nexport class ReporterRuntime {\n private readonly state = new LifecycleState();\n private notifier: Notifier;\n private stepStack: StepStack = new DefaultStepStack();\n writer: Writer;\n categories?: Category[];\n environmentInfo?: EnvironmentInfo;\n linkConfig?: LinkConfig;\n\n constructor({ writer, listeners = [], environmentInfo, categories, links }: 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\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 testResult.testCaseId ??= getTestResultTestCaseId(testResult);\n testResult.historyId ??= getTestResultHistoryId(testResult);\n\n const startStop = this.#calculateTimings(testResult.start, opts?.stop, opts?.duration);\n testResult.start = startStop.start;\n testResult.stop = startStop.stop;\n\n const scopeUuids = wrapped.scopeUuids;\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n if (scope?.labels) {\n testResult.labels = [...testResult.labels, ...scope.labels];\n }\n if (scope?.links) {\n testResult.links = [...testResult.links, ...scope.links];\n }\n if (scope?.parameters) {\n testResult.parameters = [...testResult.parameters, ...scope.parameters];\n }\n if (scope?.description) {\n testResult.description = testResult.description ?? scope.description;\n }\n if (scope?.descriptionHtml) {\n testResult.descriptionHtml = testResult.descriptionHtml ?? scope.descriptionHtml;\n }\n });\n\n this.notifier.afterTestResultStop(testResult);\n };\n\n writeTest = (uuid: string) => {\n const testResult = this.state.getTestResult(uuid);\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not write test result: no test with uuid ${uuid} is found`);\n return;\n }\n\n if (hasSkipLabel(testResult.labels)) {\n this.state.deleteTestResult(uuid);\n return;\n }\n\n this.notifier.beforeTestResultWrite(testResult);\n\n this.writer.writeResult(testResult);\n this.state.deleteTestResult(uuid);\n\n this.notifier.afterTestResultWrite(testResult);\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n return this.stepStack.currentStep(rootUuid);\n };\n\n startStep = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n result: Partial<StepResult>,\n ): string | undefined => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not start test step: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n const stepResult: StepResult = {\n ...createStepResult(),\n start: Date.now(),\n ...result,\n };\n parent.steps.push(stepResult);\n const stepUuid = randomUuid();\n this.state.setStepResult(stepUuid, stepResult);\n\n this.stepStack.addStep(rootUuid, stepUuid);\n\n return stepUuid;\n };\n\n updateStep = (uuid: string, updateFunc: (stepResult: StepResult) => void) => {\n const step = this.state.getStepResult(uuid)!;\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not update test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(step);\n };\n\n stopStep = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const step = this.state.getStepResult(uuid);\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n this.notifier.beforeStepStop(step);\n\n const startStop = this.#calculateTimings(step.start, opts?.stop, opts?.duration);\n step.start = startStop.start;\n step.stop = startStop.stop;\n\n step.stage = Stage.FINISHED;\n\n this.stepStack.removeStep(uuid);\n\n this.notifier.afterStepStop(step);\n };\n\n writeAttachment = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n attachmentName: string,\n attachmentContentOrPath: Buffer | string,\n options: AttachmentOptions & { wrapInStep?: boolean; timestamp?: number },\n ) => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not write test attachment: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n\n const isPath = typeof attachmentContentOrPath === \"string\";\n const fileExtension = options.fileExtension ?? (isPath ? extname(attachmentContentOrPath) : undefined);\n const attachmentFileName = buildAttachmentFileName({\n contentType: options.contentType,\n fileExtension,\n });\n\n if (isPath) {\n this.writer.writeAttachmentFromPath(attachmentFileName, attachmentContentOrPath);\n } else {\n this.writer.writeAttachment(attachmentFileName, attachmentContentOrPath);\n }\n\n const attachment: Attachment = {\n name: attachmentName,\n source: attachmentFileName,\n type: options.contentType,\n };\n\n if (options.wrapInStep) {\n const { timestamp = Date.now() } = options;\n parent.steps.push({\n name: attachmentName,\n attachments: [attachment],\n start: timestamp,\n stop: timestamp,\n } as StepResult);\n } else {\n parent.attachments.push(attachment);\n }\n };\n\n writeEnvironmentInfo = () => {\n if (!this.environmentInfo) {\n return;\n }\n\n this.writer.writeEnvironmentInfo(this.environmentInfo);\n };\n\n writeCategoriesDefinitions = () => {\n if (!this.categories) {\n return;\n }\n\n const serializedCategories = this.categories.map((c) => {\n if (c.messageRegex instanceof RegExp) {\n c.messageRegex = c.messageRegex.source;\n }\n\n if (c.traceRegex instanceof RegExp) {\n c.traceRegex = c.traceRegex.source;\n }\n\n return c;\n });\n\n this.writer.writeCategoriesDefinitions(serializedCategories);\n };\n\n applyRuntimeMessages = (rootUuid: string, messages: RuntimeMessage[]) => {\n messages.forEach((message) => {\n switch (message.type) {\n case \"metadata\":\n this.#handleMetadataMessage(rootUuid, message.data);\n return;\n case \"step_metadata\":\n this.#handleStepMetadataMessage(rootUuid, message.data);\n return;\n case \"step_start\":\n this.#handleStartStepMessage(rootUuid, message.data);\n return;\n case \"step_stop\":\n this.#handleStopStepMessage(rootUuid, message.data);\n return;\n case \"attachment_content\":\n this.#handleAttachmentContentMessage(rootUuid, message.data);\n return;\n case \"attachment_path\":\n this.#handleAttachmentPathMessage(rootUuid, message.data);\n return;\n default:\n // eslint-disable-next-line no-console\n console.error(`could not apply runtime messages: unknown message ${JSON.stringify(message)}`);\n return;\n }\n });\n };\n\n #handleMetadataMessage = (rootUuid: string, message: RuntimeMetadataMessage[\"data\"]) => {\n // only display name could be set to fixture.\n const fixtureResult = this.state.getWrappedFixtureResult(rootUuid);\n const { links, labels, parameters, displayName, testCaseId, historyId, description, descriptionHtml } = message;\n\n if (fixtureResult) {\n if (displayName) {\n this.updateFixture(rootUuid, (result) => {\n result.name = displayName;\n });\n }\n\n if (historyId) {\n // eslint-disable-next-line no-console\n console.error(\"historyId can't be changed within test fixtures\");\n }\n if (testCaseId) {\n // eslint-disable-next-line no-console\n console.error(\"testCaseId can't be changed within test fixtures\");\n }\n\n if (links || labels || parameters || description || descriptionHtml) {\n // in some frameworks, afterEach methods can be executed before test stop event, while\n // in others after. To remove the possible undetermined behaviour we only allow\n // using runtime metadata API in before hooks.\n if (fixtureResult.type === \"after\") {\n // eslint-disable-next-line no-console\n console.error(\"metadata messages isn't supported for after test fixtures\");\n return;\n }\n\n this.updateScope(fixtureResult.scopeUuid, (scope) => {\n if (links) {\n scope.links = [...scope.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n scope.labels = [...scope.labels, ...labels];\n }\n if (parameters) {\n scope.parameters = [...scope.parameters, ...parameters];\n }\n if (description) {\n scope.description = description;\n }\n if (descriptionHtml) {\n scope.descriptionHtml = descriptionHtml;\n }\n });\n }\n\n return;\n }\n\n this.updateTest(rootUuid, (result) => {\n if (links) {\n result.links = [...result.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n result.labels = [...result.labels, ...labels];\n }\n if (parameters) {\n result.parameters = [...result.parameters, ...parameters];\n }\n if (displayName) {\n result.name = displayName;\n }\n if (testCaseId) {\n result.testCaseId = testCaseId;\n }\n if (historyId) {\n result.historyId = historyId;\n }\n if (description) {\n result.description = description;\n }\n if (descriptionHtml) {\n result.descriptionHtml = descriptionHtml;\n }\n });\n };\n\n #handleStepMetadataMessage = (rootUuid: string, message: RuntimeStepMetadataMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step metadata message: no step is running\");\n return;\n }\n const { name, parameters } = message;\n this.updateStep(stepUuid, (stepResult) => {\n if (name) {\n stepResult.name = name;\n }\n if (parameters) {\n stepResult.parameters = [...stepResult.parameters, ...parameters];\n }\n });\n };\n\n #handleStartStepMessage = (rootUuid: string, message: RuntimeStartStepMessage[\"data\"]) => {\n this.startStep(rootUuid, undefined, { ...message });\n };\n\n #handleStopStepMessage = (rootUuid: string, message: RuntimeStopStepMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step stop message: no step is running\");\n return;\n }\n this.updateStep(stepUuid, (result) => {\n if (message.status && !result.status) {\n result.status = message.status;\n }\n if (message.statusDetails) {\n result.statusDetails = { ...result.statusDetails, ...message.statusDetails };\n }\n });\n this.stopStep(stepUuid, { stop: message.stop });\n };\n\n #handleAttachmentContentMessage = (rootUuid: string, message: RuntimeAttachmentContentMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, Buffer.from(message.content, message.encoding), {\n encoding: message.encoding,\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #handleAttachmentPathMessage = (rootUuid: string, message: RuntimeAttachmentPathMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, message.path, {\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #findParent = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n ): FixtureResult | TestResult | StepResult | undefined => {\n const root = this.state.getExecutionItem(rootUuid);\n if (!root) {\n return;\n }\n\n if (parentStepUuid === null) {\n return root;\n } else if (parentStepUuid === undefined) {\n const stepUuid = this.currentStep(rootUuid);\n return stepUuid ? this.state.getStepResult(stepUuid) : root;\n } else {\n return this.state.getStepResult(parentStepUuid);\n }\n };\n\n #writeFixturesOfScope = ({ fixtures, tests }: TestScope) => {\n const writtenFixtures = new Set<string>();\n if (tests.length) {\n for (const wrappedFixture of fixtures) {\n if (!writtenFixtures.has(wrappedFixture.uuid)) {\n this.#writeContainer(tests, wrappedFixture);\n this.state.deleteFixtureResult(wrappedFixture.uuid);\n writtenFixtures.add(wrappedFixture.uuid);\n }\n }\n }\n };\n\n #writeContainer = (tests: string[], wrappedFixture: FixtureResultWrapper) => {\n const fixture = wrappedFixture.value;\n const befores = wrappedFixture.type === \"before\" ? [wrappedFixture.value] : [];\n const afters = wrappedFixture.type === \"after\" ? [wrappedFixture.value] : [];\n this.writer.writeGroup({\n uuid: wrappedFixture.uuid,\n name: fixture.name,\n children: [...new Set(tests)],\n befores,\n afters,\n });\n };\n\n #calculateTimings = (start?: number, stop?: number, duration?: number): { start?: number; stop?: number } => {\n const result: { start?: number; stop?: number } = { start, stop };\n if (duration) {\n const normalisedDuration = Math.max(0, duration);\n if (result.stop !== undefined) {\n result.start = result.stop - normalisedDuration;\n } else if (result.start !== undefined) {\n result.stop = result.start + normalisedDuration;\n } else {\n result.stop = Date.now();\n result.start = result.stop - normalisedDuration;\n }\n } else {\n if (result.stop === undefined) {\n result.stop = Date.now();\n }\n if (result.start === undefined) {\n result.start = result.stop;\n }\n }\n return result;\n };\n}\n"],"mappings":";;;;;;;;;AAAA;AACA,SAASA,OAAO,QAAQ,MAAM;AAC9B,SAIEC,KAAK,QAGA,gBAAgB;AAYvB,SAASC,cAAc,QAAQ,qBAAqB;AACpD,SAASC,QAAQ,QAAQ,eAAe;AACxC,SAASC,mBAAmB,EAAEC,gBAAgB,EAAEC,gBAAgB,QAAQ,cAAc;AACtF,SAASC,YAAY,QAAQ,eAAe;AAS5C,SAASC,SAAS,EAAEC,WAAW,EAAEC,sBAAsB,EAAEC,uBAAuB,EAAEC,UAAU,QAAQ,YAAY;AAChH,SAASC,uBAAuB,QAAQ,wBAAwB;AAChE,SAASC,aAAa,QAAQ,oBAAoB;AAclD,MAAMC,gBAAgB,CAAsB;EAAAC,YAAA;IAAAC,eAAA,sBACG,IAAIC,GAAG,CAAC,CAAC;IAAAD,eAAA,sBACX,IAAIC,GAAG,CAAC,CAAC;IAAAD,eAAA,gBAE5C,MAAY;MAClB,IAAI,CAACE,WAAW,CAACC,KAAK,CAAC,CAAC;MACxB,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC,CAAC;IAC1B,CAAC;IAAAH,eAAA,qBAEaK,QAAgB,IAAW;MACvC,IAAMC,UAAU,GA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MAAM,CAACZ,KAAK,GAAGY,MAAM,CAACJ,IAAI,GAAGyG,kBAAkB;QACjD,CAAC,MAAM,IAAIrG,MAAM,CAACZ,KAAK,KAAKe,SAAS,EAAE;UACrCH,MAAM,CAACJ,IAAI,GAAGI,MAAM,CAACZ,KAAK,GAAGiH,kBAAkB;QACjD,CAAC,MAAM;UACLrG,MAAM,CAACJ,IAAI,GAAGP,IAAI,CAACC,GAAG,CAAC,CAAC;UACxBU,MAAM,CAACZ,KAAK,GAAGY,MAAM,CAACJ,IAAI,GAAGyG,kBAAkB;QACjD;MACF,CAAC,MAAM;QACL,IAAIrG,MAAM,CAACJ,IAAI,KAAKO,SAAS,EAAE;UAC7BH,MAAM,CAACJ,IAAI,GAAGP,IAAI,CAACC,GAAG,CAAC,CAAC;QAC1B;QACA,IAAIU,MAAM,CAACZ,KAAK,KAAKe,SAAS,EAAE;UAC9BH,MAAM,CAACZ,KAAK,GAAGY,MAAM,CAACJ,IAAI;QAC5B;MACF;MACA,OAAOI,MAAM;IACf,CAAC;IA7iBC,IAAI,CAACnC,MAAM,GAAGnC,aAAa,CAACmC,MAAM,CAAC;IACnC,IAAI,CAACwC,QAAQ,GAAG,IAAItF,QAAQ,CAAC;MAAE+C;IAAU,CAAC,CAAC;IAC3C,IAAI,CAACE,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACD,eAAe,GAAGA,eAAe;IACtC,IAAI,CAAC8G,UAAU,GAAG5G,MAAK;EACzB;AAyiBF","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ReporterRuntime.js","names":["extname","Stage","LifecycleState","Notifier","createFixtureResult","createStepResult","createTestResult","hasSkipLabel","deepClone","formatLinks","getTestResultHistoryId","getTestResultTestCaseId","randomUuid","buildAttachmentFileName","resolveWriter","DefaultStepStack","constructor","_defineProperty","Map","stepsByRoot","clear","rootsByStep","rootUuid","maybeValue","get","delete","forEach","stepUuid","length","set","push","removeStep","newValue","filter","value","_handleMetadataMessage","WeakMap","_handleStepMetadataMessage","_handleStartStepMessage","_handleStopStepMessage","_handleAttachmentContentMessage","_handleAttachmentPathMessage","_findParent","_writeFixturesOfScope","_writeContainer","_calculateTimings","ReporterRuntime","_ref","_this","writer","listeners","environmentInfo","categories","links","uuid","state","setScope","updateFunc","scope","getScope","console","error","concat","_classPrivateFieldGet","call","deleteScope","scopeUuid","type","fixtureResult","wrappedFixture","setFixtureResult","_objectSpread","start","Date","now","fixtures","fixture","getFixtureResult","opts","startStop","stop","duration","stage","FINISHED","result","scopeUuids","arguments","undefined","testResult","notifier","beforeTestResultStart","tests","setTestResult","afterTestResultStart","getTestResult","beforeTestResultUpdate","afterTestResultUpdate","_testResult$testCaseI","_testResult$historyId","wrapped","getWrappedTestResult","beforeTestResultStop","testCaseId","historyId","labels","parameters","description","_testResult$descripti","descriptionHtml","_testResult$descripti2","afterTestResultStop","deleteTestResult","beforeTestResultWrite","writeResult","afterTestResultWrite","stepStack","currentStep","parentStepUuid","parent","JSON","stringify","stepResult","steps","setStepResult","addStep","step","getStepResult","beforeStepStop","afterStepStop","attachmentName","attachmentContentOrPath","options","_options$fileExtensio","isPath","fileExtension","attachmentFileName","contentType","writeAttachmentFromPath","writeAttachment","attachment","name","source","wrapInStep","timestamp","attachments","writeEnvironmentInfo","serializedCategories","map","c","messageRegex","RegExp","traceRegex","writeCategoriesDefinitions","messages","message","data","_classPrivateFieldInitSpec","getWrappedFixtureResult","displayName","updateFixture","updateScope","linkConfig","updateTest","updateStep","startStep","status","statusDetails","stopStep","Buffer","from","content","encoding","path","root","getExecutionItem","_ref2","writtenFixtures","Set","has","deleteFixtureResult","add","befores","afters","writeGroup","children","normalisedDuration","Math","max","round"],"sources":["../../../../src/sdk/reporter/ReporterRuntime.ts"],"sourcesContent":["/* eslint max-lines: 0 */\nimport { extname } from \"path\";\nimport {\n type Attachment,\n type AttachmentOptions,\n type FixtureResult,\n Stage,\n type StepResult,\n type TestResult,\n} from \"../../model.js\";\nimport type {\n Category,\n EnvironmentInfo,\n RuntimeAttachmentContentMessage,\n RuntimeAttachmentPathMessage,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n} from \"../types.js\";\nimport { LifecycleState } from \"./LifecycleState.js\";\nimport { Notifier } from \"./Notifier.js\";\nimport { createFixtureResult, createStepResult, createTestResult } from \"./factory.js\";\nimport { hasSkipLabel } from \"./testplan.js\";\nimport type {\n FixtureResultWrapper,\n FixtureType,\n LinkConfig,\n ReporterRuntimeConfig,\n TestScope,\n Writer,\n} from \"./types.js\";\nimport { deepClone, formatLinks, getTestResultHistoryId, getTestResultTestCaseId, randomUuid } from \"./utils.js\";\nimport { buildAttachmentFileName } from \"./utils/attachments.js\";\nimport { resolveWriter } from \"./writer/loader.js\";\n\ninterface StepStack {\n clear(): void;\n\n removeRoot(rootUuid: string): void;\n\n currentStep(rootUuid: string): string | undefined;\n\n addStep(rootUuid: string, stepUuid: string): void;\n\n removeStep(stepUuid: string): void;\n}\n\nclass DefaultStepStack implements StepStack {\n private stepsByRoot: Map<string, string[]> = new Map();\n private rootsByStep: Map<string, string> = new Map();\n\n clear = (): void => {\n this.stepsByRoot.clear();\n this.rootsByStep.clear();\n };\n\n removeRoot = (rootUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n this.stepsByRoot.delete(rootUuid);\n if (maybeValue) {\n maybeValue.forEach((stepUuid) => this.rootsByStep.delete(stepUuid));\n }\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n return maybeValue[maybeValue.length - 1];\n };\n\n addStep = (rootUuid: string, stepUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n this.stepsByRoot.set(rootUuid, [stepUuid]);\n } else {\n maybeValue.push(stepUuid);\n }\n this.rootsByStep.set(stepUuid, rootUuid);\n };\n\n removeStep(stepUuid: string) {\n const rootUuid = this.rootsByStep.get(stepUuid);\n if (!rootUuid) {\n return;\n }\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n const newValue = maybeValue.filter((value) => value !== stepUuid);\n this.stepsByRoot.set(rootUuid, newValue);\n }\n}\n\nexport class ReporterRuntime {\n private readonly state = new LifecycleState();\n private notifier: Notifier;\n private stepStack: StepStack = new DefaultStepStack();\n writer: Writer;\n categories?: Category[];\n environmentInfo?: EnvironmentInfo;\n linkConfig?: LinkConfig;\n\n constructor({ writer, listeners = [], environmentInfo, categories, links }: 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\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 testResult.testCaseId ??= getTestResultTestCaseId(testResult);\n testResult.historyId ??= getTestResultHistoryId(testResult);\n\n const startStop = this.#calculateTimings(testResult.start, opts?.stop, opts?.duration);\n testResult.start = startStop.start;\n testResult.stop = startStop.stop;\n\n const scopeUuids = wrapped.scopeUuids;\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n if (scope?.labels) {\n testResult.labels = [...testResult.labels, ...scope.labels];\n }\n if (scope?.links) {\n testResult.links = [...testResult.links, ...scope.links];\n }\n if (scope?.parameters) {\n testResult.parameters = [...testResult.parameters, ...scope.parameters];\n }\n if (scope?.description) {\n testResult.description = testResult.description ?? scope.description;\n }\n if (scope?.descriptionHtml) {\n testResult.descriptionHtml = testResult.descriptionHtml ?? scope.descriptionHtml;\n }\n });\n\n this.notifier.afterTestResultStop(testResult);\n };\n\n writeTest = (uuid: string) => {\n const testResult = this.state.getTestResult(uuid);\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not write test result: no test with uuid ${uuid} is found`);\n return;\n }\n\n if (hasSkipLabel(testResult.labels)) {\n this.state.deleteTestResult(uuid);\n return;\n }\n\n this.notifier.beforeTestResultWrite(testResult);\n\n this.writer.writeResult(testResult);\n this.state.deleteTestResult(uuid);\n\n this.notifier.afterTestResultWrite(testResult);\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n return this.stepStack.currentStep(rootUuid);\n };\n\n startStep = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n result: Partial<StepResult>,\n ): string | undefined => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not start test step: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n const stepResult: StepResult = {\n ...createStepResult(),\n start: Date.now(),\n ...result,\n };\n parent.steps.push(stepResult);\n const stepUuid = randomUuid();\n this.state.setStepResult(stepUuid, stepResult);\n\n this.stepStack.addStep(rootUuid, stepUuid);\n\n return stepUuid;\n };\n\n updateStep = (uuid: string, updateFunc: (stepResult: StepResult) => void) => {\n const step = this.state.getStepResult(uuid)!;\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not update test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(step);\n };\n\n stopStep = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const step = this.state.getStepResult(uuid);\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n this.notifier.beforeStepStop(step);\n\n const startStop = this.#calculateTimings(step.start, opts?.stop, opts?.duration);\n step.start = startStop.start;\n step.stop = startStop.stop;\n\n step.stage = Stage.FINISHED;\n\n this.stepStack.removeStep(uuid);\n\n this.notifier.afterStepStop(step);\n };\n\n writeAttachment = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n attachmentName: string,\n attachmentContentOrPath: Buffer | string,\n options: AttachmentOptions & { wrapInStep?: boolean; timestamp?: number },\n ) => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not write test attachment: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n\n const isPath = typeof attachmentContentOrPath === \"string\";\n const fileExtension = options.fileExtension ?? (isPath ? extname(attachmentContentOrPath) : undefined);\n const attachmentFileName = buildAttachmentFileName({\n contentType: options.contentType,\n fileExtension,\n });\n\n if (isPath) {\n this.writer.writeAttachmentFromPath(attachmentFileName, attachmentContentOrPath);\n } else {\n this.writer.writeAttachment(attachmentFileName, attachmentContentOrPath);\n }\n\n const attachment: Attachment = {\n name: attachmentName,\n source: attachmentFileName,\n type: options.contentType,\n };\n\n if (options.wrapInStep) {\n const { timestamp = Date.now() } = options;\n parent.steps.push({\n name: attachmentName,\n attachments: [attachment],\n start: timestamp,\n stop: timestamp,\n } as StepResult);\n } else {\n parent.attachments.push(attachment);\n }\n };\n\n writeEnvironmentInfo = () => {\n if (!this.environmentInfo) {\n return;\n }\n\n this.writer.writeEnvironmentInfo(this.environmentInfo);\n };\n\n writeCategoriesDefinitions = () => {\n if (!this.categories) {\n return;\n }\n\n const serializedCategories = this.categories.map((c) => {\n if (c.messageRegex instanceof RegExp) {\n c.messageRegex = c.messageRegex.source;\n }\n\n if (c.traceRegex instanceof RegExp) {\n c.traceRegex = c.traceRegex.source;\n }\n\n return c;\n });\n\n this.writer.writeCategoriesDefinitions(serializedCategories);\n };\n\n applyRuntimeMessages = (rootUuid: string, messages: RuntimeMessage[]) => {\n messages.forEach((message) => {\n switch (message.type) {\n case \"metadata\":\n this.#handleMetadataMessage(rootUuid, message.data);\n return;\n case \"step_metadata\":\n this.#handleStepMetadataMessage(rootUuid, message.data);\n return;\n case \"step_start\":\n this.#handleStartStepMessage(rootUuid, message.data);\n return;\n case \"step_stop\":\n this.#handleStopStepMessage(rootUuid, message.data);\n return;\n case \"attachment_content\":\n this.#handleAttachmentContentMessage(rootUuid, message.data);\n return;\n case \"attachment_path\":\n this.#handleAttachmentPathMessage(rootUuid, message.data);\n return;\n default:\n // eslint-disable-next-line no-console\n console.error(`could not apply runtime messages: unknown message ${JSON.stringify(message)}`);\n return;\n }\n });\n };\n\n #handleMetadataMessage = (rootUuid: string, message: RuntimeMetadataMessage[\"data\"]) => {\n // only display name could be set to fixture.\n const fixtureResult = this.state.getWrappedFixtureResult(rootUuid);\n const { links, labels, parameters, displayName, testCaseId, historyId, description, descriptionHtml } = message;\n\n if (fixtureResult) {\n if (displayName) {\n this.updateFixture(rootUuid, (result) => {\n result.name = displayName;\n });\n }\n\n if (historyId) {\n // eslint-disable-next-line no-console\n console.error(\"historyId can't be changed within test fixtures\");\n }\n if (testCaseId) {\n // eslint-disable-next-line no-console\n console.error(\"testCaseId can't be changed within test fixtures\");\n }\n\n if (links || labels || parameters || description || descriptionHtml) {\n // in some frameworks, afterEach methods can be executed before test stop event, while\n // in others after. To remove the possible undetermined behaviour we only allow\n // using runtime metadata API in before hooks.\n if (fixtureResult.type === \"after\") {\n // eslint-disable-next-line no-console\n console.error(\"metadata messages isn't supported for after test fixtures\");\n return;\n }\n\n this.updateScope(fixtureResult.scopeUuid, (scope) => {\n if (links) {\n scope.links = [...scope.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n scope.labels = [...scope.labels, ...labels];\n }\n if (parameters) {\n scope.parameters = [...scope.parameters, ...parameters];\n }\n if (description) {\n scope.description = description;\n }\n if (descriptionHtml) {\n scope.descriptionHtml = descriptionHtml;\n }\n });\n }\n\n return;\n }\n\n this.updateTest(rootUuid, (result) => {\n if (links) {\n result.links = [...result.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n result.labels = [...result.labels, ...labels];\n }\n if (parameters) {\n result.parameters = [...result.parameters, ...parameters];\n }\n if (displayName) {\n result.name = displayName;\n }\n if (testCaseId) {\n result.testCaseId = testCaseId;\n }\n if (historyId) {\n result.historyId = historyId;\n }\n if (description) {\n result.description = description;\n }\n if (descriptionHtml) {\n result.descriptionHtml = descriptionHtml;\n }\n });\n };\n\n #handleStepMetadataMessage = (rootUuid: string, message: RuntimeStepMetadataMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step metadata message: no step is running\");\n return;\n }\n const { name, parameters } = message;\n this.updateStep(stepUuid, (stepResult) => {\n if (name) {\n stepResult.name = name;\n }\n if (parameters) {\n stepResult.parameters = [...stepResult.parameters, ...parameters];\n }\n });\n };\n\n #handleStartStepMessage = (rootUuid: string, message: RuntimeStartStepMessage[\"data\"]) => {\n this.startStep(rootUuid, undefined, { ...message });\n };\n\n #handleStopStepMessage = (rootUuid: string, message: RuntimeStopStepMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step stop message: no step is running\");\n return;\n }\n this.updateStep(stepUuid, (result) => {\n if (message.status && !result.status) {\n result.status = message.status;\n }\n if (message.statusDetails) {\n result.statusDetails = { ...result.statusDetails, ...message.statusDetails };\n }\n });\n this.stopStep(stepUuid, { stop: message.stop });\n };\n\n #handleAttachmentContentMessage = (rootUuid: string, message: RuntimeAttachmentContentMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, Buffer.from(message.content, message.encoding), {\n encoding: message.encoding,\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #handleAttachmentPathMessage = (rootUuid: string, message: RuntimeAttachmentPathMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, message.path, {\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #findParent = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n ): FixtureResult | TestResult | StepResult | undefined => {\n const root = this.state.getExecutionItem(rootUuid);\n if (!root) {\n return;\n }\n\n if (parentStepUuid === null) {\n return root;\n } else if (parentStepUuid === undefined) {\n const stepUuid = this.currentStep(rootUuid);\n return stepUuid ? this.state.getStepResult(stepUuid) : root;\n } else {\n return this.state.getStepResult(parentStepUuid);\n }\n };\n\n #writeFixturesOfScope = ({ fixtures, tests }: TestScope) => {\n const writtenFixtures = new Set<string>();\n if (tests.length) {\n for (const wrappedFixture of fixtures) {\n if (!writtenFixtures.has(wrappedFixture.uuid)) {\n this.#writeContainer(tests, wrappedFixture);\n this.state.deleteFixtureResult(wrappedFixture.uuid);\n writtenFixtures.add(wrappedFixture.uuid);\n }\n }\n }\n };\n\n #writeContainer = (tests: string[], wrappedFixture: FixtureResultWrapper) => {\n const fixture = wrappedFixture.value;\n const befores = wrappedFixture.type === \"before\" ? [wrappedFixture.value] : [];\n const afters = wrappedFixture.type === \"after\" ? [wrappedFixture.value] : [];\n this.writer.writeGroup({\n uuid: wrappedFixture.uuid,\n name: fixture.name,\n children: [...new Set(tests)],\n befores,\n afters,\n });\n };\n\n #calculateTimings = (start?: number, stop?: number, duration?: number): { start?: number; stop?: number } => {\n const result: { start?: number; stop?: number } = { start, stop };\n if (duration) {\n const normalisedDuration = Math.max(0, duration);\n if (result.stop !== undefined) {\n result.start = result.stop - normalisedDuration;\n } else if (result.start !== undefined) {\n result.stop = result.start + normalisedDuration;\n } else {\n result.stop = Date.now();\n result.start = result.stop - normalisedDuration;\n }\n } else {\n if (result.stop === undefined) {\n result.stop = Date.now();\n }\n if (result.start === undefined) {\n result.start = result.stop;\n }\n }\n return {\n start: result.start ? Math.round(result.start) : undefined,\n stop: result.stop ? Math.round(result.stop) : undefined,\n };\n };\n}\n"],"mappings":";;;;;;;;;AAAA;AACA,SAASA,OAAO,QAAQ,MAAM;AAC9B,SAIEC,KAAK,QAGA,gBAAgB;AAYvB,SAASC,cAAc,QAAQ,qBAAqB;AACpD,SAASC,QAAQ,QAAQ,eAAe;AACxC,SAASC,mBAAmB,EAAEC,gBAAgB,EAAEC,gBAAgB,QAAQ,cAAc;AACtF,SAASC,YAAY,QAAQ,eAAe;AAS5C,SAASC,SAAS,EAAEC,WAAW,EAAEC,sBAAsB,EAAEC,uBAAuB,EAAEC,UAAU,QAAQ,YAAY;AAChH,SAASC,uBAAuB,QAAQ,wBAAwB;AAChE,SAASC,aAAa,QAAQ,oBAAoB;AAclD,MAAMC,gBAAgB,CAAsB;EAAAC,YAAA;IAAAC,eAAA,sBACG,IAAIC,GAAG,CAAC,CAAC;IAAAD,eAAA,sBACX,IAAIC,GAAG,CAAC,CAAC;IAAAD,eAAA,gBAE5C,MAAY;MAClB,IAAI,CAACE,WAAW,CAACC,KAAK,CAAC,CAAC;MACxB,IAAI,CAACC,WAAW,CAACD,KAAK,CAAC,CAAC;IAC1B,CAAC;IAAAH,eAAA,qBAEaK,QAAgB,IAAW;MACvC,IAAMC,UAAU,GAAG,IAAI,CAACJ,WAAW,CAACK,GAAG,CAACF,QAAQ,CAAC;MACjD,IAAI,CAACH,WAAW,C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,IAAIrG,MAAM,CAACZ,KAAK,KAAKe,SAAS,EAAE;UACrCH,MAAM,CAACJ,IAAI,GAAGI,MAAM,CAACZ,KAAK,GAAGiH,kBAAkB;QACjD,CAAC,MAAM;UACLrG,MAAM,CAACJ,IAAI,GAAGP,IAAI,CAACC,GAAG,CAAC,CAAC;UACxBU,MAAM,CAACZ,KAAK,GAAGY,MAAM,CAACJ,IAAI,GAAGyG,kBAAkB;QACjD;MACF,CAAC,MAAM;QACL,IAAIrG,MAAM,CAACJ,IAAI,KAAKO,SAAS,EAAE;UAC7BH,MAAM,CAACJ,IAAI,GAAGP,IAAI,CAACC,GAAG,CAAC,CAAC;QAC1B;QACA,IAAIU,MAAM,CAACZ,KAAK,KAAKe,SAAS,EAAE;UAC9BH,MAAM,CAACZ,KAAK,GAAGY,MAAM,CAACJ,IAAI;QAC5B;MACF;MACA,OAAO;QACLR,KAAK,EAAEY,MAAM,CAACZ,KAAK,GAAGkH,IAAI,CAACE,KAAK,CAACxG,MAAM,CAACZ,KAAK,CAAC,GAAGe,SAAS;QAC1DP,IAAI,EAAEI,MAAM,CAACJ,IAAI,GAAG0G,IAAI,CAACE,KAAK,CAACxG,MAAM,CAACJ,IAAI,CAAC,GAAGO;MAChD,CAAC;IACH,CAAC;IAhjBC,IAAI,CAACtC,MAAM,GAAGnC,aAAa,CAACmC,MAAM,CAAC;IACnC,IAAI,CAACwC,QAAQ,GAAG,IAAItF,QAAQ,CAAC;MAAE+C;IAAU,CAAC,CAAC;IAC3C,IAAI,CAACE,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACD,eAAe,GAAGA,eAAe;IACtC,IAAI,CAAC8G,UAAU,GAAG5G,MAAK;EACzB;AA4iBF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../src/sdk/types.ts"],"sourcesContent":["import type { Label, Link, Parameter, Status, StatusDetails, TestResult, TestResultContainer } from \"../model.js\";\n\ntype RuntimeMessageBase<T extends string> = {\n type: T;\n};\n\nexport type RuntimeMetadataMessage = RuntimeMessageBase<\"metadata\"> & {\n data: {\n labels?: Label[];\n links?: Link[];\n parameters?: Parameter[];\n description?: string;\n descriptionHtml?: string;\n testCaseId?: string;\n historyId?: string;\n displayName?: string;\n };\n};\n\nexport type RuntimeStartStepMessage = RuntimeMessageBase<\"step_start\"> & {\n data: {\n name: string;\n start: number;\n };\n};\n\nexport type RuntimeStepMetadataMessage = RuntimeMessageBase<\"step_metadata\"> & {\n data: {\n name?: string;\n parameters?: Parameter[];\n };\n};\n\nexport type RuntimeStopStepMessage = RuntimeMessageBase<\"step_stop\"> & {\n data: {\n stop: number;\n status: Status;\n statusDetails?: StatusDetails;\n };\n};\n\nexport type RuntimeAttachmentContentMessage = RuntimeMessageBase<\"attachment_content\"> & {\n data: {\n name: string;\n content: string;\n encoding: BufferEncoding;\n contentType: string;\n fileExtension?: string;\n wrapInStep?: boolean;\n timestamp?: number;\n };\n};\n\nexport type RuntimeAttachmentPathMessage = RuntimeMessageBase<\"attachment_path\"> & {\n data: {\n name: string;\n path: string;\n contentType: string;\n fileExtension?: string;\n wrapInStep?: boolean;\n timestamp?: number;\n };\n};\n\nexport type RuntimeMessage =\n | RuntimeMetadataMessage\n | RuntimeStartStepMessage\n | RuntimeStepMetadataMessage\n | RuntimeStopStepMessage\n | RuntimeAttachmentContentMessage\n | RuntimeAttachmentPathMessage;\n\nexport interface TestPlanV1Test {\n id?: string | number;\n selector?: string;\n}\n\nexport interface TestPlanV1 {\n version: \"1.0\";\n tests: TestPlanV1Test[];\n}\n\nexport type EnvironmentInfo = Record<string, string | undefined>;\n\nexport interface Category {\n name?: string;\n description?: string;\n descriptionHtml?: string;\n messageRegex?: string | RegExp;\n traceRegex?: string | RegExp;\n matchedStatuses?: Status[];\n flaky?: boolean;\n}\n\nexport interface ExecutorInfo {\n name?: string;\n type?: string;\n url?: string;\n buildOrder?: number;\n buildName?: string;\n buildUrl?: string;\n reportUrl?: string;\n reportName?: string;\n}\n\nexport interface AllureResults {\n tests: TestResult[];\n groups: TestResultContainer[];\n attachments: Record<string, Buffer | string>;\n envInfo?: EnvironmentInfo;\n categories?: Category[];\n}\n\nexport type SerializeOptions = {\n maxDepth?: number;\n maxLength?: number;\n};\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/sdk/types.ts"],"sourcesContent":["import type { Label, Link, Parameter, Status, StatusDetails, TestResult, TestResultContainer } from \"../model.js\";\n\ntype RuntimeMessageBase<T extends string> = {\n type: T;\n};\n\nexport type RuntimeMetadataMessage = RuntimeMessageBase<\"metadata\"> & {\n data: {\n labels?: Label[];\n links?: Link[];\n parameters?: Parameter[];\n description?: string;\n descriptionHtml?: string;\n testCaseId?: string;\n historyId?: string;\n displayName?: string;\n };\n};\n\nexport type RuntimeStartStepMessage = RuntimeMessageBase<\"step_start\"> & {\n data: {\n name: string;\n start: number;\n };\n};\n\nexport type RuntimeStepMetadataMessage = RuntimeMessageBase<\"step_metadata\"> & {\n data: {\n name?: string;\n parameters?: Parameter[];\n };\n};\n\nexport type RuntimeStopStepMessage = RuntimeMessageBase<\"step_stop\"> & {\n data: {\n stop: number;\n status: Status;\n statusDetails?: StatusDetails;\n };\n};\n\nexport type RuntimeAttachmentContentMessage = RuntimeMessageBase<\"attachment_content\"> & {\n data: {\n name: string;\n content: string;\n encoding: BufferEncoding;\n contentType: string;\n fileExtension?: string;\n wrapInStep?: boolean;\n timestamp?: number;\n };\n};\n\nexport type RuntimeAttachmentPathMessage = RuntimeMessageBase<\"attachment_path\"> & {\n data: {\n name: string;\n path: string;\n contentType: string;\n fileExtension?: string;\n wrapInStep?: boolean;\n timestamp?: number;\n };\n};\n\nexport type RuntimeMessage =\n | RuntimeMetadataMessage\n | RuntimeStartStepMessage\n | RuntimeStepMetadataMessage\n | RuntimeStopStepMessage\n | RuntimeAttachmentContentMessage\n | RuntimeAttachmentPathMessage;\n\nexport interface TestPlanV1Test {\n id?: string | number;\n selector?: string;\n}\n\nexport interface TestPlanV1 {\n version: \"1.0\";\n tests: TestPlanV1Test[];\n}\n\nexport type EnvironmentInfo = Record<string, string | undefined>;\n\nexport interface Category {\n name?: string;\n description?: string;\n descriptionHtml?: string;\n messageRegex?: string | RegExp;\n traceRegex?: string | RegExp;\n matchedStatuses?: Status[];\n flaky?: boolean;\n}\n\nexport interface ExecutorInfo {\n name?: string;\n type?: string;\n url?: string;\n buildOrder?: number;\n buildName?: string;\n buildUrl?: string;\n reportUrl?: string;\n reportName?: string;\n}\n\nexport interface AllureResults {\n tests: TestResult[];\n groups: TestResultContainer[];\n attachments: Record<string, Buffer | string>;\n envInfo?: EnvironmentInfo;\n categories?: Category[];\n}\n\nexport type SerializerReplacerFunc = (this: unknown, key: string, value: unknown) => unknown;\n\nexport type SerializeOptions = {\n maxDepth?: number;\n maxLength?: number;\n replacer?: SerializerReplacerFunc;\n};\n"],"mappings":"","ignoreList":[]}
|
package/dist/esm/sdk/utils.js
CHANGED
|
@@ -12,11 +12,12 @@ export var getStatusFromError = error => {
|
|
|
12
12
|
*/
|
|
13
13
|
case /assert/gi.test(error.constructor.name):
|
|
14
14
|
case /expectation/gi.test(error.constructor.name):
|
|
15
|
-
case /assert/gi.test(error.name):
|
|
16
|
-
case /assert/gi.test(error.message):
|
|
15
|
+
case error.name && /assert/gi.test(error.name):
|
|
16
|
+
case error.message && /assert/gi.test(error.message):
|
|
17
17
|
case error.stack && /@vitest\/expect/gi.test(error.stack):
|
|
18
18
|
case error.stack && /playwright\/lib\/matchers\/expect\.js/gi.test(error.stack):
|
|
19
19
|
case "matcherResult" in error:
|
|
20
|
+
case "inspect" in error && typeof error.inspect === "function":
|
|
20
21
|
return Status.FAILED;
|
|
21
22
|
default:
|
|
22
23
|
return Status.BROKEN;
|
|
@@ -131,13 +132,14 @@ export var isPromise = obj => !!obj && (typeof obj === "object" || typeof obj ==
|
|
|
131
132
|
export var serialize = function serialize(value) {
|
|
132
133
|
var {
|
|
133
134
|
maxDepth = 0,
|
|
134
|
-
maxLength = 0
|
|
135
|
+
maxLength = 0,
|
|
136
|
+
replacer
|
|
135
137
|
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
136
|
-
return limitString(typeof value === "object" ? JSON.stringify(value, createSerializeReplacer(maxDepth)) : String(value), maxLength);
|
|
138
|
+
return limitString(typeof value === "object" ? JSON.stringify(value, createSerializeReplacer(maxDepth, replacer)) : String(value), maxLength);
|
|
137
139
|
};
|
|
138
|
-
var createSerializeReplacer = maxDepth => {
|
|
140
|
+
var createSerializeReplacer = (maxDepth, userDefinedReplacer) => {
|
|
139
141
|
var parents = [];
|
|
140
|
-
|
|
142
|
+
var limitingReplacer = function limitingReplacer(_, value) {
|
|
141
143
|
if (typeof value !== "object" || value === null) {
|
|
142
144
|
return value;
|
|
143
145
|
}
|
|
@@ -150,6 +152,10 @@ var createSerializeReplacer = maxDepth => {
|
|
|
150
152
|
parents.push(value);
|
|
151
153
|
return value instanceof Map ? excludeCircularRefsFromMap(parents, value) : value instanceof Set ? excludeCircularRefsFromSet(parents, value) : value;
|
|
152
154
|
};
|
|
155
|
+
return userDefinedReplacer ? composeReplacers(userDefinedReplacer, limitingReplacer) : limitingReplacer;
|
|
156
|
+
};
|
|
157
|
+
var composeReplacers = (first, second) => function (k, v) {
|
|
158
|
+
return second.call(this, k, first.call(this, k, v));
|
|
153
159
|
};
|
|
154
160
|
var excludeCircularRefsFromMap = (parents, map) => {
|
|
155
161
|
return Array.from(map).filter(_ref => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["LabelName","Status","getStatusFromError","error","test","constructor","name","message","stack","FAILED","BROKEN","ansiRegex","onlyFirst","arguments","length","undefined","pattern","join","RegExp","stripAnsi","str","regex","replace","getMessageAndTraceFromError","trace","allureIdRegexp","_wrapRegExp","id","allureIdRegexpGlobal","allureLabelRegexp","value","allureLabelRegexpGlobal","isMetadataTag","tag","extractMetadataFromString","title","labels","split","forEach","val","_val$match","idValue","match","groups","push","ALLURE_ID","labelMatch","cleanTitle","trim","isAnyStepFailed","item","isFailed","status","steps","find","step","isAllStepsEnded","every","stop","hasLabel","testResult","labelName","l","hasStepMessage","messages","some","type","getStepsMessagesPair","reduce","acc","unfinishedStepIdx","findLastIndex","getUnfinishedStepsMessages","grouppedStepsMessage","filter","isPromise","obj","then","serialize","maxDepth","maxLength","limitString","JSON","stringify","createSerializeReplacer","String","parents","_","Object","is","at","pop","includes","Map","excludeCircularRefsFromMap","Set","excludeCircularRefsFromSet","map","Array","from","_ref","k","_ref2","v","set","concat","substring"],"sources":["../../../src/sdk/utils.ts"],"sourcesContent":["import type { FixtureResult, Label, StatusDetails, StepResult, TestResult } from \"../model.js\";\nimport { LabelName, Status } from \"../model.js\";\nimport type { RuntimeMessage, SerializeOptions } from \"./types.js\";\n\nexport const getStatusFromError = (error: Error): Status => {\n switch (true) {\n /**\n * Native `node:assert` and `chai` (`vitest` uses it under the hood) throw `AssertionError`\n * `jest` throws `JestAssertionError` instance\n * `jasmine` throws `ExpectationFailed` instance\n * `vitest` throws `Error` for extended assertions, so we look into stack\n */\n case /assert/gi.test(error.constructor.name):\n case /expectation/gi.test(error.constructor.name):\n case /assert/gi.test(error.name):\n case /assert/gi.test(error.message):\n case error.stack && /@vitest\\/expect/gi.test(error.stack):\n case error.stack && /playwright\\/lib\\/matchers\\/expect\\.js/gi.test(error.stack):\n case \"matcherResult\" in error:\n return Status.FAILED;\n default:\n return Status.BROKEN;\n }\n};\n\n/**\n * Source: https://github.com/chalk/ansi-regex\n */\nconst ansiRegex = ({ onlyFirst = false } = {}) => {\n const pattern = [\n \"[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)\",\n \"(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-nq-uy=><~]))\",\n ].join(\"|\");\n\n return new RegExp(pattern, onlyFirst ? undefined : \"g\");\n};\n\n/**\n * https://github.com/chalk/strip-ansi\n */\nexport const stripAnsi = (str: string): string => {\n const regex = ansiRegex();\n return str.replace(regex, \"\");\n};\n\nexport const getMessageAndTraceFromError = (\n error: Error | { message?: string; stack?: string },\n): Pick<StatusDetails, \"message\" | \"trace\"> => {\n const { message, stack } = error;\n return {\n message: message ? stripAnsi(message) : undefined,\n trace: stack ? stripAnsi(stack) : undefined,\n };\n};\n\nexport const allureIdRegexp = /(?:^|\\s)@?allure\\.id[:=](?<id>[^\\s]+)/;\nexport const allureIdRegexpGlobal = new RegExp(allureIdRegexp, \"g\");\nexport const allureLabelRegexp = /(?:^|\\s)@?allure\\.label\\.(?<name>[^:=\\s]+)[:=](?<value>[^\\s]+)/;\nexport const allureLabelRegexpGlobal = new RegExp(allureLabelRegexp, \"g\");\n\nexport const isMetadataTag = (tag: string) => {\n return allureIdRegexp.test(tag) || allureLabelRegexp.test(tag);\n};\n\nexport const extractMetadataFromString = (\n title: string,\n): {\n labels: Label[];\n cleanTitle: string;\n} => {\n const labels = [] as Label[];\n\n title.split(\" \").forEach((val) => {\n const idValue = val.match(allureIdRegexp)?.groups?.id;\n\n if (idValue) {\n labels.push({ name: LabelName.ALLURE_ID, value: idValue });\n }\n\n const labelMatch = val.match(allureLabelRegexp);\n const { name, value } = labelMatch?.groups || {};\n\n if (name && value) {\n labels?.push({ name, value });\n }\n });\n\n const cleanTitle = title.replace(allureLabelRegexpGlobal, \"\").replace(allureIdRegexpGlobal, \"\").trim();\n\n return { labels, cleanTitle };\n};\n\nexport const isAnyStepFailed = (item: StepResult | TestResult | FixtureResult): boolean => {\n const isFailed = item.status === Status.FAILED;\n\n if (isFailed || item.steps.length === 0) {\n return isFailed;\n }\n\n return !!item.steps.find((step) => isAnyStepFailed(step));\n};\n\nexport const isAllStepsEnded = (item: StepResult | TestResult | FixtureResult): boolean => {\n return item.steps.every((val) => val.stop && isAllStepsEnded(val));\n};\n\nexport const hasLabel = (testResult: TestResult, labelName: LabelName | string): boolean => {\n return !!testResult.labels.find((l) => l.name === labelName);\n};\n\nexport const hasStepMessage = (messages: RuntimeMessage[]) => {\n return messages.some((message) => message.type === \"step_start\" || message.type === \"step_stop\");\n};\n\nexport const getStepsMessagesPair = (messages: RuntimeMessage[]) =>\n messages.reduce((acc, message) => {\n if (message.type !== \"step_start\" && message.type !== \"step_stop\") {\n return acc;\n }\n\n if (message.type === \"step_start\") {\n acc.push([message]);\n\n return acc;\n }\n\n const unfinishedStepIdx = acc.findLastIndex((step) => step.length === 1);\n\n if (unfinishedStepIdx === -1) {\n return acc;\n }\n\n acc[unfinishedStepIdx].push(message);\n\n return acc;\n }, [] as RuntimeMessage[][]);\n\nexport const getUnfinishedStepsMessages = (messages: RuntimeMessage[]) => {\n const grouppedStepsMessage = getStepsMessagesPair(messages);\n\n return grouppedStepsMessage.filter((step) => step.length === 1);\n};\n\nexport const isPromise = <T = any>(obj: any): obj is PromiseLike<T> =>\n !!obj && (typeof obj === \"object\" || typeof obj === \"function\") && typeof obj.then === \"function\";\n\nexport const serialize = (value: any, { maxDepth = 0, maxLength = 0 }: SerializeOptions = {}): string =>\n limitString(\n typeof value === \"object\" ? JSON.stringify(value, createSerializeReplacer(maxDepth)) : String(value),\n maxLength,\n );\n\nconst createSerializeReplacer = (maxDepth: number) => {\n const parents: any[] = [];\n return function (this: any, _: string, value: unknown) {\n if (typeof value !== \"object\" || value === null) {\n return value;\n }\n\n while (parents.length > 0 && !Object.is(parents.at(-1), this)) {\n parents.pop();\n }\n\n if ((maxDepth && parents.length >= maxDepth) || parents.includes(value)) {\n return undefined;\n }\n\n parents.push(value);\n\n return value instanceof Map\n ? excludeCircularRefsFromMap(parents, value)\n : value instanceof Set\n ? excludeCircularRefsFromSet(parents, value)\n : value;\n };\n};\n\nconst excludeCircularRefsFromMap = (parents: any[], map: Map<any, any>) => {\n return Array.from(map)\n .filter(([k]) => !parents.includes(k))\n .map(([k, v]) => [k, parents.includes(v) ? undefined : v]);\n};\n\nconst excludeCircularRefsFromSet = (parents: any[], set: Set<any>) => {\n return Array.from(set).map((v) => (parents.includes(v) ? undefined : v));\n};\n\nconst limitString = (value: string, maxLength: number) =>\n maxLength && value.length > maxLength ? `${value.substring(0, maxLength)}...` : value;\n"],"mappings":";;;AACA,SAASA,SAAS,EAAEC,MAAM,QAAQ,aAAa;AAG/C,OAAO,IAAMC,kBAAkB,GAAIC,KAAY,IAAa;EAC1D,QAAQ,IAAI;IACV;AACJ;AACA;AACA;AACA;AACA;IACI,KAAK,UAAU,CAACC,IAAI,CAACD,KAAK,CAACE,WAAW,CAACC,IAAI,CAAC;IAC5C,KAAK,eAAe,CAACF,IAAI,CAACD,KAAK,CAACE,WAAW,CAACC,IAAI,CAAC;IACjD,KAAK,UAAU,CAACF,IAAI,CAACD,KAAK,CAACG,IAAI,CAAC;IAChC,KAAK,UAAU,CAACF,IAAI,CAACD,KAAK,CAACI,OAAO,CAAC;IACnC,KAAKJ,KAAK,CAACK,KAAK,IAAI,mBAAmB,CAACJ,IAAI,CAACD,KAAK,CAACK,KAAK,CAAC;IACzD,KAAKL,KAAK,CAACK,KAAK,IAAI,yCAAyC,CAACJ,IAAI,CAACD,KAAK,CAACK,KAAK,CAAC;IAC/E,KAAK,eAAe,IAAIL,KAAK;MAC3B,OAAOF,MAAM,CAACQ,MAAM;IACtB;MACE,OAAOR,MAAM,CAACS,MAAM;EACxB;AACF,CAAC;;AAED;AACA;AACA;AACA,IAAMC,SAAS,GAAG,SAAZA,SAASA,CAAA,EAAmC;EAAA,IAA/B;IAAEC,SAAS,GAAG;EAAM,CAAC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAC3C,IAAMG,OAAO,GAAG,CACd,8HAA8H,EAC9H,0DAA0D,CAC3D,CAACC,IAAI,CAAC,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ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"utils.js","names":["LabelName","Status","getStatusFromError","error","test","constructor","name","message","stack","inspect","FAILED","BROKEN","ansiRegex","onlyFirst","arguments","length","undefined","pattern","join","RegExp","stripAnsi","str","regex","replace","getMessageAndTraceFromError","trace","allureIdRegexp","_wrapRegExp","id","allureIdRegexpGlobal","allureLabelRegexp","value","allureLabelRegexpGlobal","isMetadataTag","tag","extractMetadataFromString","title","labels","split","forEach","val","_val$match","idValue","match","groups","push","ALLURE_ID","labelMatch","cleanTitle","trim","isAnyStepFailed","item","isFailed","status","steps","find","step","isAllStepsEnded","every","stop","hasLabel","testResult","labelName","l","hasStepMessage","messages","some","type","getStepsMessagesPair","reduce","acc","unfinishedStepIdx","findLastIndex","getUnfinishedStepsMessages","grouppedStepsMessage","filter","isPromise","obj","then","serialize","maxDepth","maxLength","replacer","limitString","JSON","stringify","createSerializeReplacer","String","userDefinedReplacer","parents","limitingReplacer","_","Object","is","at","pop","includes","Map","excludeCircularRefsFromMap","Set","excludeCircularRefsFromSet","composeReplacers","first","second","k","v","call","map","Array","from","_ref","_ref2","set","concat","substring"],"sources":["../../../src/sdk/utils.ts"],"sourcesContent":["import type { FixtureResult, Label, StatusDetails, StepResult, TestResult } from \"../model.js\";\nimport { LabelName, Status } from \"../model.js\";\nimport type { RuntimeMessage, SerializeOptions, SerializerReplacerFunc } from \"./types.js\";\n\nexport const getStatusFromError = (error: Partial<Error>): Status => {\n switch (true) {\n /**\n * Native `node:assert` and `chai` (`vitest` uses it under the hood) throw `AssertionError`\n * `jest` throws `JestAssertionError` instance\n * `jasmine` throws `ExpectationFailed` instance\n * `vitest` throws `Error` for extended assertions, so we look into stack\n */\n case /assert/gi.test(error.constructor.name):\n case /expectation/gi.test(error.constructor.name):\n case error.name && /assert/gi.test(error.name):\n case error.message && /assert/gi.test(error.message):\n case error.stack && /@vitest\\/expect/gi.test(error.stack):\n case error.stack && /playwright\\/lib\\/matchers\\/expect\\.js/gi.test(error.stack):\n case \"matcherResult\" in error:\n case \"inspect\" in error && typeof error.inspect === \"function\":\n return Status.FAILED;\n default:\n return Status.BROKEN;\n }\n};\n\n/**\n * Source: https://github.com/chalk/ansi-regex\n */\nconst ansiRegex = ({ onlyFirst = false } = {}) => {\n const pattern = [\n \"[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)\",\n \"(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-nq-uy=><~]))\",\n ].join(\"|\");\n\n return new RegExp(pattern, onlyFirst ? undefined : \"g\");\n};\n\n/**\n * https://github.com/chalk/strip-ansi\n */\nexport const stripAnsi = (str: string): string => {\n const regex = ansiRegex();\n return str.replace(regex, \"\");\n};\n\nexport const getMessageAndTraceFromError = (\n error: Error | { message?: string; stack?: string },\n): Pick<StatusDetails, \"message\" | \"trace\"> => {\n const { message, stack } = error;\n return {\n message: message ? stripAnsi(message) : undefined,\n trace: stack ? stripAnsi(stack) : undefined,\n };\n};\n\nexport const allureIdRegexp = /(?:^|\\s)@?allure\\.id[:=](?<id>[^\\s]+)/;\nexport const allureIdRegexpGlobal = new RegExp(allureIdRegexp, \"g\");\nexport const allureLabelRegexp = /(?:^|\\s)@?allure\\.label\\.(?<name>[^:=\\s]+)[:=](?<value>[^\\s]+)/;\nexport const allureLabelRegexpGlobal = new RegExp(allureLabelRegexp, \"g\");\n\nexport const isMetadataTag = (tag: string) => {\n return allureIdRegexp.test(tag) || allureLabelRegexp.test(tag);\n};\n\nexport const extractMetadataFromString = (\n title: string,\n): {\n labels: Label[];\n cleanTitle: string;\n} => {\n const labels = [] as Label[];\n\n title.split(\" \").forEach((val) => {\n const idValue = val.match(allureIdRegexp)?.groups?.id;\n\n if (idValue) {\n labels.push({ name: LabelName.ALLURE_ID, value: idValue });\n }\n\n const labelMatch = val.match(allureLabelRegexp);\n const { name, value } = labelMatch?.groups || {};\n\n if (name && value) {\n labels?.push({ name, value });\n }\n });\n\n const cleanTitle = title.replace(allureLabelRegexpGlobal, \"\").replace(allureIdRegexpGlobal, \"\").trim();\n\n return { labels, cleanTitle };\n};\n\nexport const isAnyStepFailed = (item: StepResult | TestResult | FixtureResult): boolean => {\n const isFailed = item.status === Status.FAILED;\n\n if (isFailed || item.steps.length === 0) {\n return isFailed;\n }\n\n return !!item.steps.find((step) => isAnyStepFailed(step));\n};\n\nexport const isAllStepsEnded = (item: StepResult | TestResult | FixtureResult): boolean => {\n return item.steps.every((val) => val.stop && isAllStepsEnded(val));\n};\n\nexport const hasLabel = (testResult: TestResult, labelName: LabelName | string): boolean => {\n return !!testResult.labels.find((l) => l.name === labelName);\n};\n\nexport const hasStepMessage = (messages: RuntimeMessage[]) => {\n return messages.some((message) => message.type === \"step_start\" || message.type === \"step_stop\");\n};\n\nexport const getStepsMessagesPair = (messages: RuntimeMessage[]) =>\n messages.reduce((acc, message) => {\n if (message.type !== \"step_start\" && message.type !== \"step_stop\") {\n return acc;\n }\n\n if (message.type === \"step_start\") {\n acc.push([message]);\n\n return acc;\n }\n\n const unfinishedStepIdx = acc.findLastIndex((step) => step.length === 1);\n\n if (unfinishedStepIdx === -1) {\n return acc;\n }\n\n acc[unfinishedStepIdx].push(message);\n\n return acc;\n }, [] as RuntimeMessage[][]);\n\nexport const getUnfinishedStepsMessages = (messages: RuntimeMessage[]) => {\n const grouppedStepsMessage = getStepsMessagesPair(messages);\n\n return grouppedStepsMessage.filter((step) => step.length === 1);\n};\n\nexport const isPromise = <T = any>(obj: any): obj is PromiseLike<T> =>\n !!obj && (typeof obj === \"object\" || typeof obj === \"function\") && typeof obj.then === \"function\";\n\nexport const serialize = (value: any, { maxDepth = 0, maxLength = 0, replacer }: SerializeOptions = {}): string =>\n limitString(\n typeof value === \"object\" ? JSON.stringify(value, createSerializeReplacer(maxDepth, replacer)) : String(value),\n maxLength,\n );\n\nconst createSerializeReplacer = (maxDepth: number, userDefinedReplacer: SerializeOptions[\"replacer\"]) => {\n const parents: unknown[] = [];\n const limitingReplacer = function (this: unknown, _: string, value: unknown) {\n if (typeof value !== \"object\" || value === null) {\n return value;\n }\n\n while (parents.length > 0 && !Object.is(parents.at(-1), this)) {\n parents.pop();\n }\n\n if ((maxDepth && parents.length >= maxDepth) || parents.includes(value)) {\n return undefined;\n }\n\n parents.push(value);\n\n return value instanceof Map\n ? excludeCircularRefsFromMap(parents, value)\n : value instanceof Set\n ? excludeCircularRefsFromSet(parents, value)\n : value;\n };\n return userDefinedReplacer ? composeReplacers(userDefinedReplacer, limitingReplacer) : limitingReplacer;\n};\n\nconst composeReplacers = (first: SerializerReplacerFunc, second: SerializerReplacerFunc): SerializerReplacerFunc =>\n function (k, v) {\n return second.call(this, k, first.call(this, k, v));\n };\n\nconst excludeCircularRefsFromMap = (parents: any[], map: Map<any, any>) => {\n return Array.from(map)\n .filter(([k]) => !parents.includes(k))\n .map(([k, v]) => [k, parents.includes(v) ? undefined : v]);\n};\n\nconst excludeCircularRefsFromSet = (parents: any[], set: Set<any>) => {\n return Array.from(set).map((v) => (parents.includes(v) ? undefined : v));\n};\n\nconst limitString = (value: string, maxLength: number) =>\n maxLength && value.length > maxLength ? `${value.substring(0, maxLength)}...` : value;\n"],"mappings":";;;AACA,SAASA,SAAS,EAAEC,MAAM,QAAQ,aAAa;AAG/C,OAAO,IAAMC,kBAAkB,GAAIC,KAAqB,IAAa;EACnE,QAAQ,IAAI;IACV;AACJ;AACA;AACA;AACA;AACA;IACI,KAAK,UAAU,CAACC,IAAI,CAACD,KAAK,CAACE,WAAW,CAACC,IAAI,CAAC;IAC5C,KAAK,eAAe,CAACF,IAAI,CAACD,KAAK,CAACE,WAAW,CAACC,IAAI,CAAC;IACjD,KAAKH,KAAK,CAACG,IAAI,IAAI,UAAU,CAACF,IAAI,CAACD,KAAK,CAACG,IAAI,CAAC;IAC9C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
92
|
categories?: Category[];
|
|
93
93
|
}
|
|
94
|
+
export type SerializerReplacerFunc = (this: unknown, key: string, value: unknown) => unknown;
|
|
94
95
|
export type SerializeOptions = {
|
|
95
96
|
maxDepth?: number;
|
|
96
97
|
maxLength?: number;
|
|
98
|
+
replacer?: SerializerReplacerFunc;
|
|
97
99
|
};
|
|
98
100
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FixtureResult, Label, StatusDetails, StepResult, TestResult } from "../model.js";
|
|
2
2
|
import { LabelName, Status } from "../model.js";
|
|
3
3
|
import type { RuntimeMessage, SerializeOptions } from "./types.js";
|
|
4
|
-
export declare const getStatusFromError: (error: Error) => Status;
|
|
4
|
+
export declare const getStatusFromError: (error: Partial<Error>) => Status;
|
|
5
5
|
/**
|
|
6
6
|
* https://github.com/chalk/strip-ansi
|
|
7
7
|
*/
|
|
@@ -26,4 +26,4 @@ export declare const hasStepMessage: (messages: RuntimeMessage[]) => boolean;
|
|
|
26
26
|
export declare const getStepsMessagesPair: (messages: RuntimeMessage[]) => RuntimeMessage[][];
|
|
27
27
|
export declare const getUnfinishedStepsMessages: (messages: RuntimeMessage[]) => RuntimeMessage[][];
|
|
28
28
|
export declare const isPromise: <T = any>(obj: any) => obj is PromiseLike<T>;
|
|
29
|
-
export declare const serialize: (value: any, { maxDepth, maxLength }?: SerializeOptions) => string;
|
|
29
|
+
export declare const serialize: (value: any, { maxDepth, maxLength, replacer }?: SerializeOptions) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "allure-js-commons",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.8",
|
|
4
4
|
"description": "Allure JS Commons",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
@@ -34,27 +34,27 @@
|
|
|
34
34
|
},
|
|
35
35
|
"exports": {
|
|
36
36
|
".": {
|
|
37
|
+
"types": "./dist/types/index.d.ts",
|
|
37
38
|
"import": "./dist/esm/index.js",
|
|
38
39
|
"require": "./dist/cjs/index.js",
|
|
39
|
-
"types": "./dist/types/index.d.ts",
|
|
40
40
|
"default": "./dist/cjs/index.js"
|
|
41
41
|
},
|
|
42
42
|
"./sdk": {
|
|
43
|
+
"types": "./dist/types/sdk/index.d.ts",
|
|
43
44
|
"import": "./dist/esm/sdk/index.js",
|
|
44
45
|
"require": "./dist/cjs/sdk/index.js",
|
|
45
|
-
"types": "./dist/types/sdk/index.d.ts",
|
|
46
46
|
"default": "./dist/cjs/sdk/index.js"
|
|
47
47
|
},
|
|
48
48
|
"./sdk/reporter": {
|
|
49
|
+
"types": "./dist/types/sdk/reporter/index.d.ts",
|
|
49
50
|
"import": "./dist/esm/sdk/reporter/index.js",
|
|
50
51
|
"require": "./dist/cjs/sdk/reporter/index.js",
|
|
51
|
-
"types": "./dist/types/sdk/reporter/index.d.ts",
|
|
52
52
|
"default": "./dist/cjs/sdk/reporter/index.js"
|
|
53
53
|
},
|
|
54
54
|
"./sdk/runtime": {
|
|
55
|
+
"types": "./dist/types/sdk/runtime/index.d.ts",
|
|
55
56
|
"import": "./dist/esm/sdk/runtime/index.js",
|
|
56
57
|
"require": "./dist/cjs/sdk/runtime/index.js",
|
|
57
|
-
"types": "./dist/types/sdk/runtime/index.d.ts",
|
|
58
58
|
"default": "./dist/cjs/sdk/runtime/index.js"
|
|
59
59
|
}
|
|
60
60
|
},
|
|
@@ -102,10 +102,10 @@
|
|
|
102
102
|
"npm-run-all2": "^7.0.0",
|
|
103
103
|
"rimraf": "^6.0.0",
|
|
104
104
|
"typescript": "^5.2.2",
|
|
105
|
-
"vitest": "^1.
|
|
105
|
+
"vitest": "^2.1.5"
|
|
106
106
|
},
|
|
107
107
|
"peerDependencies": {
|
|
108
|
-
"allure-playwright": "3.0.
|
|
108
|
+
"allure-playwright": "3.0.8"
|
|
109
109
|
},
|
|
110
110
|
"peerDependenciesMeta": {
|
|
111
111
|
"allure-playwright": {
|