allure-js-commons 3.0.8 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/model.js.map +1 -1
- package/dist/cjs/sdk/index.js +6 -0
- package/dist/cjs/sdk/index.js.map +1 -1
- package/dist/cjs/sdk/reporter/ReporterRuntime.js +26 -6
- package/dist/cjs/sdk/reporter/ReporterRuntime.js.map +1 -1
- package/dist/cjs/sdk/reporter/types.js.map +1 -1
- package/dist/cjs/sdk/utils.js +103 -27
- package/dist/cjs/sdk/utils.js.map +1 -1
- package/dist/esm/model.js.map +1 -1
- package/dist/esm/sdk/index.js +1 -1
- package/dist/esm/sdk/index.js.map +1 -1
- package/dist/esm/sdk/reporter/ReporterRuntime.js +26 -6
- package/dist/esm/sdk/reporter/ReporterRuntime.js.map +1 -1
- package/dist/esm/sdk/reporter/types.js.map +1 -1
- package/dist/esm/sdk/utils.js +99 -26
- package/dist/esm/sdk/utils.js.map +1 -1
- package/dist/types/model.d.ts +2 -0
- package/dist/types/sdk/index.d.ts +1 -1
- package/dist/types/sdk/reporter/ReporterRuntime.d.ts +3 -2
- package/dist/types/sdk/reporter/types.d.ts +3 -1
- package/dist/types/sdk/utils.d.ts +19 -4
- package/package.json +3 -3
package/dist/cjs/model.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","names":["Status","exports","StatusByPriority","FAILED","BROKEN","PASSED","SKIPPED","Stage","LabelName","Severity","ContentType","LinkType"],"sources":["../../src/model.ts"],"sourcesContent":["export interface Attachment {\n name: string;\n type?: string;\n source: string;\n}\n\nexport interface AttachmentOptions {\n contentType: ContentType | string;\n encoding?: BufferEncoding;\n fileExtension?: string;\n}\n\nexport interface Label {\n name: LabelName | string;\n value: string;\n}\n\nexport interface Link {\n name?: string;\n url: string;\n type?: LinkType | string;\n}\n\nexport type ParameterMode = \"hidden\" | \"masked\" | \"default\";\n\nexport interface Parameter {\n name: string;\n value: string;\n excluded?: boolean;\n mode?: ParameterMode;\n}\n\nexport type ParameterOptions = Pick<Parameter, \"mode\" | \"excluded\">;\n\nexport interface StatusDetails {\n message?: string;\n trace?: string;\n}\n\n// don't use the interface as is, use Results types instead\ninterface Executable {\n name?: string;\n status?: Status;\n statusDetails: StatusDetails;\n stage: Stage;\n description?: string;\n descriptionHtml?: string;\n steps: StepResult[];\n attachments: Attachment[];\n parameters: Parameter[];\n start?: number;\n stop?: number;\n}\n\nexport interface FixtureResult extends Executable {}\n\nexport interface StepResult extends Executable {}\n\nexport interface TestResult extends Executable {\n uuid: string;\n historyId?: string;\n fullName?: string;\n testCaseId?: string;\n labels: Label[];\n links: Link[];\n}\n\nexport interface TestResultContainer {\n uuid: string;\n name?: string;\n children: string[];\n befores: FixtureResult[];\n afters: FixtureResult[];\n}\n\nexport type TestOrStepResult = StepResult | TestResult;\n\n/* eslint-disable no-shadow */\nexport enum Status {\n FAILED = \"failed\",\n BROKEN = \"broken\",\n PASSED = \"passed\",\n SKIPPED = \"skipped\",\n}\n\nexport const StatusByPriority = [Status.FAILED, Status.BROKEN, Status.PASSED, Status.SKIPPED];\n\n/* eslint-disable no-shadow */\nexport enum Stage {\n SCHEDULED = \"scheduled\",\n RUNNING = \"running\",\n FINISHED = \"finished\",\n PENDING = \"pending\",\n INTERRUPTED = \"interrupted\",\n}\n\n/* eslint-disable no-shadow */\nexport enum LabelName {\n ALLURE_ID = \"ALLURE_ID\",\n /**\n * @deprecated please use ALLURE_ID instead\n */\n AS_ID = ALLURE_ID,\n SUITE = \"suite\",\n PARENT_SUITE = \"parentSuite\",\n SUB_SUITE = \"subSuite\",\n EPIC = \"epic\",\n FEATURE = \"feature\",\n STORY = \"story\",\n SEVERITY = \"severity\",\n TAG = \"tag\",\n OWNER = \"owner\",\n LEAD = \"lead\",\n HOST = \"host\",\n THREAD = \"thread\",\n TEST_METHOD = \"testMethod\",\n TEST_CLASS = \"testClass\",\n PACKAGE = \"package\",\n FRAMEWORK = \"framework\",\n LANGUAGE = \"language\",\n LAYER = \"layer\",\n}\n\n/* eslint-disable no-shadow */\nexport enum Severity {\n BLOCKER = \"blocker\",\n CRITICAL = \"critical\",\n NORMAL = \"normal\",\n MINOR = \"minor\",\n TRIVIAL = \"trivial\",\n}\n\n/* eslint-disable no-shadow */\nexport enum ContentType {\n TEXT = \"text/plain\",\n XML = \"application/xml\",\n HTML = \"text/html\",\n CSV = \"text/csv\",\n TSV = \"text/tab-separated-values\",\n CSS = \"text/css\",\n URI = \"text/uri-list\",\n SVG = \"image/svg+xml\",\n PNG = \"image/png\",\n JSON = \"application/json\",\n ZIP = \"application/zip\",\n WEBM = \"video/webm\",\n JPEG = \"image/jpeg\",\n MP4 = \"video/mp4\",\n IMAGEDIFF = \"application/vnd.allure.image.diff\",\n}\n\n/* eslint-disable no-shadow */\nexport enum LinkType {\n DEFAULT = \"link\",\n ISSUE = \"issue\",\n TMS = \"tms\",\n}\n\nexport interface ImageDiffAttachment {\n expected: string | undefined; // data:image;base64,\n actual: string | undefined; // data:image;base64,\n diff: string | undefined; // data:image;base64,\n name: string;\n}\n"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"model.js","names":["Status","exports","StatusByPriority","FAILED","BROKEN","PASSED","SKIPPED","Stage","LabelName","Severity","ContentType","LinkType"],"sources":["../../src/model.ts"],"sourcesContent":["export interface Attachment {\n name: string;\n type?: string;\n source: string;\n}\n\nexport interface AttachmentOptions {\n contentType: ContentType | string;\n encoding?: BufferEncoding;\n fileExtension?: string;\n}\n\nexport interface Label {\n name: LabelName | string;\n value: string;\n}\n\nexport interface Link {\n name?: string;\n url: string;\n type?: LinkType | string;\n}\n\nexport type ParameterMode = \"hidden\" | \"masked\" | \"default\";\n\nexport interface Parameter {\n name: string;\n value: string;\n excluded?: boolean;\n mode?: ParameterMode;\n}\n\nexport type ParameterOptions = Pick<Parameter, \"mode\" | \"excluded\">;\n\nexport interface StatusDetails {\n message?: string;\n trace?: string;\n actual?: string;\n expected?: string;\n}\n\n// don't use the interface as is, use Results types instead\ninterface Executable {\n name?: string;\n status?: Status;\n statusDetails: StatusDetails;\n stage: Stage;\n description?: string;\n descriptionHtml?: string;\n steps: StepResult[];\n attachments: Attachment[];\n parameters: Parameter[];\n start?: number;\n stop?: number;\n}\n\nexport interface FixtureResult extends Executable {}\n\nexport interface StepResult extends Executable {}\n\nexport interface TestResult extends Executable {\n uuid: string;\n historyId?: string;\n fullName?: string;\n testCaseId?: string;\n labels: Label[];\n links: Link[];\n}\n\nexport interface TestResultContainer {\n uuid: string;\n name?: string;\n children: string[];\n befores: FixtureResult[];\n afters: FixtureResult[];\n}\n\nexport type TestOrStepResult = StepResult | TestResult;\n\n/* eslint-disable no-shadow */\nexport enum Status {\n FAILED = \"failed\",\n BROKEN = \"broken\",\n PASSED = \"passed\",\n SKIPPED = \"skipped\",\n}\n\nexport const StatusByPriority = [Status.FAILED, Status.BROKEN, Status.PASSED, Status.SKIPPED];\n\n/* eslint-disable no-shadow */\nexport enum Stage {\n SCHEDULED = \"scheduled\",\n RUNNING = \"running\",\n FINISHED = \"finished\",\n PENDING = \"pending\",\n INTERRUPTED = \"interrupted\",\n}\n\n/* eslint-disable no-shadow */\nexport enum LabelName {\n ALLURE_ID = \"ALLURE_ID\",\n /**\n * @deprecated please use ALLURE_ID instead\n */\n AS_ID = ALLURE_ID,\n SUITE = \"suite\",\n PARENT_SUITE = \"parentSuite\",\n SUB_SUITE = \"subSuite\",\n EPIC = \"epic\",\n FEATURE = \"feature\",\n STORY = \"story\",\n SEVERITY = \"severity\",\n TAG = \"tag\",\n OWNER = \"owner\",\n LEAD = \"lead\",\n HOST = \"host\",\n THREAD = \"thread\",\n TEST_METHOD = \"testMethod\",\n TEST_CLASS = \"testClass\",\n PACKAGE = \"package\",\n FRAMEWORK = \"framework\",\n LANGUAGE = \"language\",\n LAYER = \"layer\",\n}\n\n/* eslint-disable no-shadow */\nexport enum Severity {\n BLOCKER = \"blocker\",\n CRITICAL = \"critical\",\n NORMAL = \"normal\",\n MINOR = \"minor\",\n TRIVIAL = \"trivial\",\n}\n\n/* eslint-disable no-shadow */\nexport enum ContentType {\n TEXT = \"text/plain\",\n XML = \"application/xml\",\n HTML = \"text/html\",\n CSV = \"text/csv\",\n TSV = \"text/tab-separated-values\",\n CSS = \"text/css\",\n URI = \"text/uri-list\",\n SVG = \"image/svg+xml\",\n PNG = \"image/png\",\n JSON = \"application/json\",\n ZIP = \"application/zip\",\n WEBM = \"video/webm\",\n JPEG = \"image/jpeg\",\n MP4 = \"video/mp4\",\n IMAGEDIFF = \"application/vnd.allure.image.diff\",\n}\n\n/* eslint-disable no-shadow */\nexport enum LinkType {\n DEFAULT = \"link\",\n ISSUE = \"issue\",\n TMS = \"tms\",\n}\n\nexport interface ImageDiffAttachment {\n expected: string | undefined; // data:image;base64,\n actual: string | undefined; // data:image;base64,\n diff: string | undefined; // data:image;base64,\n name: string;\n}\n"],"mappings":";;;;;;AAyCA;AAsCA;AAAA,IACYA,MAAM,GAAAC,OAAA,CAAAD,MAAA,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA;AAOX,IAAME,gBAAgB,GAAAD,OAAA,CAAAC,gBAAA,GAAG,CAACF,MAAM,CAACG,MAAM,EAAEH,MAAM,CAACI,MAAM,EAAEJ,MAAM,CAACK,MAAM,EAAEL,MAAM,CAACM,OAAO,CAAC;;AAE7F;AAAA,IACYC,KAAK,GAAAN,OAAA,CAAAM,KAAA,0BAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAAA,OAALA,KAAK;AAAA;AAQjB;AAAA,IACYC,SAAS,GAAAP,OAAA,CAAAO,SAAA,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA;AA0BrB;AAAA,IACYC,QAAQ,GAAAR,OAAA,CAAAQ,QAAA,0BAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AAQpB;AAAA,IACYC,WAAW,GAAAT,OAAA,CAAAS,WAAA,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAkBvB;AAAA,IACYC,QAAQ,GAAAV,OAAA,CAAAU,QAAA,0BAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA","ignoreList":[]}
|
package/dist/cjs/sdk/index.js
CHANGED
|
@@ -15,6 +15,12 @@ Object.defineProperty(exports, "getMessageAndTraceFromError", {
|
|
|
15
15
|
return _utils.getMessageAndTraceFromError;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
+
Object.defineProperty(exports, "getMetadataLabel", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _utils.getMetadataLabel;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
18
24
|
Object.defineProperty(exports, "getStatusFromError", {
|
|
19
25
|
enumerable: true,
|
|
20
26
|
get: function get() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_utils","require"],"sources":["../../../src/sdk/index.ts"],"sourcesContent":["export type {\n AllureResults,\n Category,\n EnvironmentInfo,\n ExecutorInfo,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeAttachmentContentMessage,\n RuntimeAttachmentPathMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n TestPlanV1Test,\n TestPlanV1,\n} from \"./types.js\";\nexport {\n getStatusFromError,\n getMessageAndTraceFromError,\n isMetadataTag,\n extractMetadataFromString,\n isAllStepsEnded,\n isAnyStepFailed,\n getUnfinishedStepsMessages,\n hasStepMessage,\n isPromise,\n hasLabel,\n stripAnsi,\n serialize,\n} from \"./utils.js\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_utils","require"],"sources":["../../../src/sdk/index.ts"],"sourcesContent":["export type {\n AllureResults,\n Category,\n EnvironmentInfo,\n ExecutorInfo,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeAttachmentContentMessage,\n RuntimeAttachmentPathMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n TestPlanV1Test,\n TestPlanV1,\n} from \"./types.js\";\nexport {\n getStatusFromError,\n getMessageAndTraceFromError,\n isMetadataTag,\n getMetadataLabel,\n extractMetadataFromString,\n isAllStepsEnded,\n isAnyStepFailed,\n getUnfinishedStepsMessages,\n hasStepMessage,\n isPromise,\n hasLabel,\n stripAnsi,\n serialize,\n} from \"./utils.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,IAAAA,MAAA,GAAAC,OAAA","ignoreList":[]}
|
|
@@ -85,7 +85,8 @@ class ReporterRuntime {
|
|
|
85
85
|
listeners = [],
|
|
86
86
|
environmentInfo,
|
|
87
87
|
categories,
|
|
88
|
-
links: _links
|
|
88
|
+
links: _links,
|
|
89
|
+
globalLabels = {}
|
|
89
90
|
} = _ref;
|
|
90
91
|
_defineProperty(this, "state", new _LifecycleState.LifecycleState());
|
|
91
92
|
_defineProperty(this, "notifier", void 0);
|
|
@@ -94,6 +95,7 @@ class ReporterRuntime {
|
|
|
94
95
|
_defineProperty(this, "categories", void 0);
|
|
95
96
|
_defineProperty(this, "environmentInfo", void 0);
|
|
96
97
|
_defineProperty(this, "linkConfig", void 0);
|
|
98
|
+
_defineProperty(this, "globalLabels", []);
|
|
97
99
|
_defineProperty(this, "startScope", () => {
|
|
98
100
|
var uuid = (0, _utils.randomUuid)();
|
|
99
101
|
this.state.setScope(uuid);
|
|
@@ -194,11 +196,6 @@ class ReporterRuntime {
|
|
|
194
196
|
}
|
|
195
197
|
var testResult = wrapped.value;
|
|
196
198
|
this.notifier.beforeTestResultStop(testResult);
|
|
197
|
-
(_testResult$testCaseI = testResult.testCaseId) !== null && _testResult$testCaseI !== void 0 ? _testResult$testCaseI : testResult.testCaseId = (0, _utils.getTestResultTestCaseId)(testResult);
|
|
198
|
-
(_testResult$historyId = testResult.historyId) !== null && _testResult$historyId !== void 0 ? _testResult$historyId : testResult.historyId = (0, _utils.getTestResultHistoryId)(testResult);
|
|
199
|
-
var startStop = _classPrivateFieldGet(_calculateTimings, this).call(this, testResult.start, opts === null || opts === void 0 ? void 0 : opts.stop, opts === null || opts === void 0 ? void 0 : opts.duration);
|
|
200
|
-
testResult.start = startStop.start;
|
|
201
|
-
testResult.stop = startStop.stop;
|
|
202
199
|
var scopeUuids = wrapped.scopeUuids;
|
|
203
200
|
scopeUuids.forEach(scopeUuid => {
|
|
204
201
|
var scope = this.state.getScope(scopeUuid);
|
|
@@ -220,6 +217,12 @@ class ReporterRuntime {
|
|
|
220
217
|
testResult.descriptionHtml = (_testResult$descripti2 = testResult.descriptionHtml) !== null && _testResult$descripti2 !== void 0 ? _testResult$descripti2 : scope.descriptionHtml;
|
|
221
218
|
}
|
|
222
219
|
});
|
|
220
|
+
testResult.labels = [...this.globalLabels, ...testResult.labels];
|
|
221
|
+
(_testResult$testCaseI = testResult.testCaseId) !== null && _testResult$testCaseI !== void 0 ? _testResult$testCaseI : testResult.testCaseId = (0, _utils.getTestResultTestCaseId)(testResult);
|
|
222
|
+
(_testResult$historyId = testResult.historyId) !== null && _testResult$historyId !== void 0 ? _testResult$historyId : testResult.historyId = (0, _utils.getTestResultHistoryId)(testResult);
|
|
223
|
+
var startStop = _classPrivateFieldGet(_calculateTimings, this).call(this, testResult.start, opts === null || opts === void 0 ? void 0 : opts.stop, opts === null || opts === void 0 ? void 0 : opts.duration);
|
|
224
|
+
testResult.start = startStop.start;
|
|
225
|
+
testResult.stop = startStop.stop;
|
|
223
226
|
this.notifier.afterTestResultStop(testResult);
|
|
224
227
|
});
|
|
225
228
|
_defineProperty(this, "writeTest", uuid => {
|
|
@@ -587,6 +590,23 @@ class ReporterRuntime {
|
|
|
587
590
|
this.categories = categories;
|
|
588
591
|
this.environmentInfo = environmentInfo;
|
|
589
592
|
this.linkConfig = _links;
|
|
593
|
+
if (Array.isArray(globalLabels)) {
|
|
594
|
+
this.globalLabels = globalLabels;
|
|
595
|
+
} else if (Object.keys(globalLabels).length) {
|
|
596
|
+
this.globalLabels = Object.entries(globalLabels).flatMap(_ref3 => {
|
|
597
|
+
var [name, value] = _ref3;
|
|
598
|
+
if (Array.isArray(value)) {
|
|
599
|
+
return value.map(v => ({
|
|
600
|
+
name,
|
|
601
|
+
value: v
|
|
602
|
+
}));
|
|
603
|
+
}
|
|
604
|
+
return {
|
|
605
|
+
name,
|
|
606
|
+
value
|
|
607
|
+
};
|
|
608
|
+
});
|
|
609
|
+
}
|
|
590
610
|
}
|
|
591
611
|
}
|
|
592
612
|
exports.ReporterRuntime = ReporterRuntime;
|
|
@@ -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","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,q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eAAe,GAAGA,eAAe;IACtC,IAAI,CAACqH,UAAU,GAAGnH,MAAK;EACzB;AA4iBF;AAACiJ,OAAA,CAAAxJ,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","globalLabels","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","labels","parameters","description","_testResult$descripti","descriptionHtml","_testResult$descripti2","testCaseId","getTestResultTestCaseId","historyId","getTestResultHistoryId","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","Array","isArray","entries","flatMap","_ref3","v","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 type Label,\n Stage,\n type StepResult,\n type TestResult,\n} from \"../../model.js\";\nimport type {\n Category,\n EnvironmentInfo,\n RuntimeAttachmentContentMessage,\n RuntimeAttachmentPathMessage,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n} from \"../types.js\";\nimport { LifecycleState } from \"./LifecycleState.js\";\nimport { Notifier } from \"./Notifier.js\";\nimport { createFixtureResult, createStepResult, createTestResult } from \"./factory.js\";\nimport { hasSkipLabel } from \"./testplan.js\";\nimport type {\n FixtureResultWrapper,\n FixtureType,\n LinkConfig,\n ReporterRuntimeConfig,\n TestScope,\n Writer,\n} from \"./types.js\";\nimport { deepClone, formatLinks, getTestResultHistoryId, getTestResultTestCaseId, randomUuid } from \"./utils.js\";\nimport { buildAttachmentFileName } from \"./utils/attachments.js\";\nimport { resolveWriter } from \"./writer/loader.js\";\n\ninterface StepStack {\n clear(): void;\n\n removeRoot(rootUuid: string): void;\n\n currentStep(rootUuid: string): string | undefined;\n\n addStep(rootUuid: string, stepUuid: string): void;\n\n removeStep(stepUuid: string): void;\n}\n\nclass DefaultStepStack implements StepStack {\n private stepsByRoot: Map<string, string[]> = new Map();\n private rootsByStep: Map<string, string> = new Map();\n\n clear = (): void => {\n this.stepsByRoot.clear();\n this.rootsByStep.clear();\n };\n\n removeRoot = (rootUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n this.stepsByRoot.delete(rootUuid);\n if (maybeValue) {\n maybeValue.forEach((stepUuid) => this.rootsByStep.delete(stepUuid));\n }\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n return maybeValue[maybeValue.length - 1];\n };\n\n addStep = (rootUuid: string, stepUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n this.stepsByRoot.set(rootUuid, [stepUuid]);\n } else {\n maybeValue.push(stepUuid);\n }\n this.rootsByStep.set(stepUuid, rootUuid);\n };\n\n removeStep(stepUuid: string) {\n const rootUuid = this.rootsByStep.get(stepUuid);\n if (!rootUuid) {\n return;\n }\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n const newValue = maybeValue.filter((value) => value !== stepUuid);\n this.stepsByRoot.set(rootUuid, newValue);\n }\n}\n\nexport class ReporterRuntime {\n private readonly state = new LifecycleState();\n private notifier: Notifier;\n private stepStack: StepStack = new DefaultStepStack();\n writer: Writer;\n categories?: Category[];\n environmentInfo?: EnvironmentInfo;\n linkConfig?: LinkConfig;\n globalLabels: Label[] = [];\n\n constructor({\n writer,\n listeners = [],\n environmentInfo,\n categories,\n links,\n globalLabels = {},\n }: ReporterRuntimeConfig) {\n this.writer = resolveWriter(writer);\n this.notifier = new Notifier({ listeners });\n this.categories = categories;\n this.environmentInfo = environmentInfo;\n this.linkConfig = links;\n\n if (Array.isArray(globalLabels)) {\n this.globalLabels = globalLabels;\n } else if (Object.keys(globalLabels).length) {\n this.globalLabels = Object.entries(globalLabels).flatMap(([name, value]) => {\n if (Array.isArray(value)) {\n return value.map((v) => ({ name, value: v }));\n }\n\n return {\n name,\n value,\n };\n });\n }\n }\n\n startScope = (): string => {\n const uuid = randomUuid();\n this.state.setScope(uuid);\n return uuid;\n };\n\n updateScope = (uuid: string, updateFunc: (scope: TestScope) => void): void => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not update scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(scope);\n };\n\n writeScope = (uuid: string) => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not write scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n this.#writeFixturesOfScope(scope);\n this.state.deleteScope(scope.uuid);\n };\n\n startFixture = (scopeUuid: string, type: FixtureType, fixtureResult: Partial<FixtureResult>): string | undefined => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not start fixture: no scope with uuid ${scopeUuid} is found`);\n return;\n }\n\n const uuid = randomUuid();\n const wrappedFixture = this.state.setFixtureResult(scopeUuid, uuid, type, {\n ...createFixtureResult(),\n start: Date.now(),\n ...fixtureResult,\n });\n\n scope.fixtures.push(wrappedFixture);\n return uuid;\n };\n\n updateFixture = (uuid: string, updateFunc: (result: FixtureResult) => void): void => {\n const fixture = this.state.getFixtureResult(uuid);\n\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not update fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(fixture);\n };\n\n stopFixture = (uuid: string, opts?: { stop?: number; duration?: number }): void => {\n const fixture = this.state.getFixtureResult(uuid);\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not stop fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n const startStop = this.#calculateTimings(fixture.start, opts?.stop, opts?.duration);\n fixture.start = startStop.start;\n fixture.stop = startStop.stop;\n\n fixture.stage = Stage.FINISHED;\n };\n\n startTest = (result: Partial<TestResult>, scopeUuids: string[] = []): string => {\n const uuid = randomUuid();\n const testResult: TestResult = {\n ...createTestResult(uuid),\n start: Date.now(),\n ...deepClone(result),\n };\n\n this.notifier.beforeTestResultStart(testResult);\n\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not link test to the scope: no scope with uuid ${uuid} is found`);\n return;\n }\n scope.tests.push(uuid);\n });\n\n this.state.setTestResult(uuid, testResult, scopeUuids);\n this.notifier.afterTestResultStart(testResult);\n return uuid;\n };\n\n updateTest = (uuid: string, updateFunc: (result: TestResult) => void): void => {\n const testResult = this.state.getTestResult(uuid);\n\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not update test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n this.notifier.beforeTestResultUpdate(testResult);\n updateFunc(testResult);\n this.notifier.afterTestResultUpdate(testResult);\n };\n\n stopTest = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const wrapped = this.state.getWrappedTestResult(uuid);\n if (!wrapped) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n const testResult = wrapped.value;\n\n this.notifier.beforeTestResultStop(testResult);\n\n const scopeUuids = wrapped.scopeUuids;\n\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n\n if (scope?.labels) {\n testResult.labels = [...testResult.labels, ...scope.labels];\n }\n\n if (scope?.links) {\n testResult.links = [...testResult.links, ...scope.links];\n }\n\n if (scope?.parameters) {\n testResult.parameters = [...testResult.parameters, ...scope.parameters];\n }\n\n if (scope?.description) {\n testResult.description = testResult.description ?? scope.description;\n }\n\n if (scope?.descriptionHtml) {\n testResult.descriptionHtml = testResult.descriptionHtml ?? scope.descriptionHtml;\n }\n });\n\n testResult.labels = [...this.globalLabels, ...testResult.labels];\n\n testResult.testCaseId ??= getTestResultTestCaseId(testResult);\n testResult.historyId ??= getTestResultHistoryId(testResult);\n\n const startStop = this.#calculateTimings(testResult.start, opts?.stop, opts?.duration);\n\n testResult.start = startStop.start;\n testResult.stop = startStop.stop;\n\n this.notifier.afterTestResultStop(testResult);\n };\n\n writeTest = (uuid: string) => {\n const testResult = this.state.getTestResult(uuid);\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not write test result: no test with uuid ${uuid} is found`);\n return;\n }\n\n if (hasSkipLabel(testResult.labels)) {\n this.state.deleteTestResult(uuid);\n return;\n }\n\n this.notifier.beforeTestResultWrite(testResult);\n\n this.writer.writeResult(testResult);\n this.state.deleteTestResult(uuid);\n\n this.notifier.afterTestResultWrite(testResult);\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n return this.stepStack.currentStep(rootUuid);\n };\n\n startStep = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n result: Partial<StepResult>,\n ): string | undefined => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not start test step: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n const stepResult: StepResult = {\n ...createStepResult(),\n start: Date.now(),\n ...result,\n };\n parent.steps.push(stepResult);\n const stepUuid = randomUuid();\n this.state.setStepResult(stepUuid, stepResult);\n\n this.stepStack.addStep(rootUuid, stepUuid);\n\n return stepUuid;\n };\n\n updateStep = (uuid: string, updateFunc: (stepResult: StepResult) => void) => {\n const step = this.state.getStepResult(uuid)!;\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not update test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(step);\n };\n\n stopStep = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const step = this.state.getStepResult(uuid);\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n this.notifier.beforeStepStop(step);\n\n const startStop = this.#calculateTimings(step.start, opts?.stop, opts?.duration);\n step.start = startStop.start;\n step.stop = startStop.stop;\n\n step.stage = Stage.FINISHED;\n\n this.stepStack.removeStep(uuid);\n\n this.notifier.afterStepStop(step);\n };\n\n writeAttachment = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n attachmentName: string,\n attachmentContentOrPath: Buffer | string,\n options: AttachmentOptions & { wrapInStep?: boolean; timestamp?: number },\n ) => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not write test attachment: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n\n const isPath = typeof attachmentContentOrPath === \"string\";\n const fileExtension = options.fileExtension ?? (isPath ? extname(attachmentContentOrPath) : undefined);\n const attachmentFileName = buildAttachmentFileName({\n contentType: options.contentType,\n fileExtension,\n });\n\n if (isPath) {\n this.writer.writeAttachmentFromPath(attachmentFileName, attachmentContentOrPath);\n } else {\n this.writer.writeAttachment(attachmentFileName, attachmentContentOrPath);\n }\n\n const attachment: Attachment = {\n name: attachmentName,\n source: attachmentFileName,\n type: options.contentType,\n };\n\n if (options.wrapInStep) {\n const { timestamp = Date.now() } = options;\n parent.steps.push({\n name: attachmentName,\n attachments: [attachment],\n start: timestamp,\n stop: timestamp,\n } as StepResult);\n } else {\n parent.attachments.push(attachment);\n }\n };\n\n writeEnvironmentInfo = () => {\n if (!this.environmentInfo) {\n return;\n }\n\n this.writer.writeEnvironmentInfo(this.environmentInfo);\n };\n\n writeCategoriesDefinitions = () => {\n if (!this.categories) {\n return;\n }\n\n const serializedCategories = this.categories.map((c) => {\n if (c.messageRegex instanceof RegExp) {\n c.messageRegex = c.messageRegex.source;\n }\n\n if (c.traceRegex instanceof RegExp) {\n c.traceRegex = c.traceRegex.source;\n }\n\n return c;\n });\n\n this.writer.writeCategoriesDefinitions(serializedCategories);\n };\n\n applyRuntimeMessages = (rootUuid: string, messages: RuntimeMessage[]) => {\n messages.forEach((message) => {\n switch (message.type) {\n case \"metadata\":\n this.#handleMetadataMessage(rootUuid, message.data);\n return;\n case \"step_metadata\":\n this.#handleStepMetadataMessage(rootUuid, message.data);\n return;\n case \"step_start\":\n this.#handleStartStepMessage(rootUuid, message.data);\n return;\n case \"step_stop\":\n this.#handleStopStepMessage(rootUuid, message.data);\n return;\n case \"attachment_content\":\n this.#handleAttachmentContentMessage(rootUuid, message.data);\n return;\n case \"attachment_path\":\n this.#handleAttachmentPathMessage(rootUuid, message.data);\n return;\n default:\n // eslint-disable-next-line no-console\n console.error(`could not apply runtime messages: unknown message ${JSON.stringify(message)}`);\n return;\n }\n });\n };\n\n #handleMetadataMessage = (rootUuid: string, message: RuntimeMetadataMessage[\"data\"]) => {\n // only display name could be set to fixture.\n const fixtureResult = this.state.getWrappedFixtureResult(rootUuid);\n const { links, labels, parameters, displayName, testCaseId, historyId, description, descriptionHtml } = message;\n\n if (fixtureResult) {\n if (displayName) {\n this.updateFixture(rootUuid, (result) => {\n result.name = displayName;\n });\n }\n\n if (historyId) {\n // eslint-disable-next-line no-console\n console.error(\"historyId can't be changed within test fixtures\");\n }\n if (testCaseId) {\n // eslint-disable-next-line no-console\n console.error(\"testCaseId can't be changed within test fixtures\");\n }\n\n if (links || labels || parameters || description || descriptionHtml) {\n // in some frameworks, afterEach methods can be executed before test stop event, while\n // in others after. To remove the possible undetermined behaviour we only allow\n // using runtime metadata API in before hooks.\n if (fixtureResult.type === \"after\") {\n // eslint-disable-next-line no-console\n console.error(\"metadata messages isn't supported for after test fixtures\");\n return;\n }\n\n this.updateScope(fixtureResult.scopeUuid, (scope) => {\n if (links) {\n scope.links = [...scope.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n scope.labels = [...scope.labels, ...labels];\n }\n if (parameters) {\n scope.parameters = [...scope.parameters, ...parameters];\n }\n if (description) {\n scope.description = description;\n }\n if (descriptionHtml) {\n scope.descriptionHtml = descriptionHtml;\n }\n });\n }\n\n return;\n }\n\n this.updateTest(rootUuid, (result) => {\n if (links) {\n result.links = [...result.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n result.labels = [...result.labels, ...labels];\n }\n if (parameters) {\n result.parameters = [...result.parameters, ...parameters];\n }\n if (displayName) {\n result.name = displayName;\n }\n if (testCaseId) {\n result.testCaseId = testCaseId;\n }\n if (historyId) {\n result.historyId = historyId;\n }\n if (description) {\n result.description = description;\n }\n if (descriptionHtml) {\n result.descriptionHtml = descriptionHtml;\n }\n });\n };\n\n #handleStepMetadataMessage = (rootUuid: string, message: RuntimeStepMetadataMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step metadata message: no step is running\");\n return;\n }\n const { name, parameters } = message;\n this.updateStep(stepUuid, (stepResult) => {\n if (name) {\n stepResult.name = name;\n }\n if (parameters) {\n stepResult.parameters = [...stepResult.parameters, ...parameters];\n }\n });\n };\n\n #handleStartStepMessage = (rootUuid: string, message: RuntimeStartStepMessage[\"data\"]) => {\n this.startStep(rootUuid, undefined, { ...message });\n };\n\n #handleStopStepMessage = (rootUuid: string, message: RuntimeStopStepMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step stop message: no step is running\");\n return;\n }\n this.updateStep(stepUuid, (result) => {\n if (message.status && !result.status) {\n result.status = message.status;\n }\n if (message.statusDetails) {\n result.statusDetails = { ...result.statusDetails, ...message.statusDetails };\n }\n });\n this.stopStep(stepUuid, { stop: message.stop });\n };\n\n #handleAttachmentContentMessage = (rootUuid: string, message: RuntimeAttachmentContentMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, Buffer.from(message.content, message.encoding), {\n encoding: message.encoding,\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #handleAttachmentPathMessage = (rootUuid: string, message: RuntimeAttachmentPathMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, message.path, {\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #findParent = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n ): FixtureResult | TestResult | StepResult | undefined => {\n const root = this.state.getExecutionItem(rootUuid);\n if (!root) {\n return;\n }\n\n if (parentStepUuid === null) {\n return root;\n } else if (parentStepUuid === undefined) {\n const stepUuid = this.currentStep(rootUuid);\n return stepUuid ? this.state.getStepResult(stepUuid) : root;\n } else {\n return this.state.getStepResult(parentStepUuid);\n }\n };\n\n #writeFixturesOfScope = ({ fixtures, tests }: TestScope) => {\n const writtenFixtures = new Set<string>();\n if (tests.length) {\n for (const wrappedFixture of fixtures) {\n if (!writtenFixtures.has(wrappedFixture.uuid)) {\n this.#writeContainer(tests, wrappedFixture);\n this.state.deleteFixtureResult(wrappedFixture.uuid);\n writtenFixtures.add(wrappedFixture.uuid);\n }\n }\n }\n };\n\n #writeContainer = (tests: string[], wrappedFixture: FixtureResultWrapper) => {\n const fixture = wrappedFixture.value;\n const befores = wrappedFixture.type === \"before\" ? [wrappedFixture.value] : [];\n const afters = wrappedFixture.type === \"after\" ? [wrappedFixture.value] : [];\n this.writer.writeGroup({\n uuid: wrappedFixture.uuid,\n name: fixture.name,\n children: [...new Set(tests)],\n befores,\n afters,\n });\n };\n\n #calculateTimings = (\n start?: number,\n stop?: number,\n duration?: number,\n ): {\n start?: number;\n stop?: number;\n } => {\n const result: { start?: number; stop?: number } = { start, stop };\n if (duration) {\n const normalisedDuration = Math.max(0, duration);\n if (result.stop !== undefined) {\n result.start = result.stop - normalisedDuration;\n } else if (result.start !== undefined) {\n result.stop = result.start + normalisedDuration;\n } else {\n result.stop = Date.now();\n result.start = result.stop - normalisedDuration;\n }\n } else {\n if (result.stop === undefined) {\n result.stop = Date.now();\n }\n if (result.start === undefined) {\n result.start = result.stop;\n }\n }\n return {\n start: result.start ? Math.round(result.start) : undefined,\n stop: result.stop ? Math.round(result.stop) : undefined,\n };\n };\n}\n"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAoBA,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,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAI,MAAA,CAAAD,CAAA,OAAAa,OAAA,WAAAd,CAAA,IAAAe,eAAA,CAAAhB,CAAA,EAAAC,CAAA,EAAAC,CAAA,CAAAD,CAAA,SAAAE,MAAA,CAAAc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AAK,CAAC,GAAA8L,KAAA;QACrE,IAAIJ,KAAK,CAACC,OAAO,CAAC3L,KAAK,CAAC,EAAE;UACxB,OAAOA,KAAK,CAAC+I,GAAG,CAAEgD,CAAC,KAAM;YAAEvD,IAAI;YAAExI,KAAK,EAAE+L;UAAE,CAAC,CAAC,CAAC;QAC/C;QAEA,OAAO;UACLvD,IAAI;UACJxI;QACF,CAAC;MACH,CAAC,CAAC;IACJ;EACF;AA6jBF;AAACgM,OAAA,CAAA/J,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["ALLURE_METADATA_CONTENT_TYPE","exports","ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE"],"sources":["../../../../src/sdk/reporter/types.ts"],"sourcesContent":["import type {\n FixtureResult,\n Label,\n Link,\n LinkType,\n Parameter,\n StepResult,\n TestResult,\n TestResultContainer,\n} from \"../../model.js\";\nimport type { Category, EnvironmentInfo } from \"../types.js\";\n\nexport const ALLURE_METADATA_CONTENT_TYPE = \"application/vnd.allure.metadata+json\";\nexport const ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE = \"application/vnd.allure.message+json\";\n\nexport interface LifecycleListener {\n beforeTestResultStart?: (result: TestResult) => void;\n\n afterTestResultStart?: (result: TestResult) => void;\n\n beforeTestResultStop?: (result: TestResult) => void;\n\n afterTestResultStop?: (result: TestResult) => void;\n\n beforeTestResultUpdate?: (result: TestResult) => void;\n\n afterTestResultUpdate?: (result: TestResult) => void;\n\n beforeTestResultWrite?: (result: TestResult) => void;\n\n afterTestResultWrite?: (result: TestResult) => void;\n\n beforeStepStop?: (result: StepResult) => void;\n\n afterStepStop?: (result: StepResult) => void;\n}\n\nexport type LinkTemplate = string | ((url: string) => string);\n\nexport type LinkTypeOptions = {\n urlTemplate: LinkTemplate;\n nameTemplate?: LinkTemplate;\n};\n\nexport type LinkConfig<TOpts extends LinkTypeOptions = LinkTypeOptions> = Partial<Record<LinkType, TOpts>> &\n Record<string, TOpts>;\n\nexport type WriterDescriptor = [cls: string, ...args: readonly unknown[]] | string;\n\nexport interface ReporterConfig {\n readonly resultsDir?: string;\n readonly links?: LinkConfig;\n readonly listeners?: LifecycleListener[];\n readonly environmentInfo?: EnvironmentInfo;\n readonly categories?: Category[];\n}\n\nexport interface ReporterRuntimeConfig extends Omit<ReporterConfig, \"resultsDir\"> {\n readonly writer: Writer | WriterDescriptor;\n}\n\nexport interface Writer {\n writeResult(result: TestResult): void;\n\n writeGroup(result: TestResultContainer): void;\n\n writeAttachment(distFileName: string, content: Buffer): void;\n\n writeAttachmentFromPath(distFileName: string, from: string): void;\n\n writeEnvironmentInfo(info: EnvironmentInfo): void;\n\n writeCategoriesDefinitions(categories: Category[]): void;\n}\n\nexport type TestScope = {\n uuid: string;\n tests: string[];\n fixtures: FixtureResultWrapper[];\n labels: Label[];\n links: Link[];\n parameters: Parameter[];\n description?: string;\n descriptionHtml?: string;\n};\n\nexport type FixtureType = \"before\" | \"after\";\n\nexport type FixtureResultWrapper = {\n uuid: string;\n value: FixtureResult;\n type: FixtureType;\n scopeUuid: string;\n};\n\nexport type TestResultWrapper = {\n value: TestResult;\n scopeUuids: string[];\n};\n"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"types.js","names":["ALLURE_METADATA_CONTENT_TYPE","exports","ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE"],"sources":["../../../../src/sdk/reporter/types.ts"],"sourcesContent":["import type {\n FixtureResult,\n Label,\n LabelName,\n Link,\n LinkType,\n Parameter,\n StepResult,\n TestResult,\n TestResultContainer,\n} from \"../../model.js\";\nimport type { Category, EnvironmentInfo } from \"../types.js\";\n\nexport const ALLURE_METADATA_CONTENT_TYPE = \"application/vnd.allure.metadata+json\";\nexport const ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE = \"application/vnd.allure.message+json\";\n\nexport interface LifecycleListener {\n beforeTestResultStart?: (result: TestResult) => void;\n\n afterTestResultStart?: (result: TestResult) => void;\n\n beforeTestResultStop?: (result: TestResult) => void;\n\n afterTestResultStop?: (result: TestResult) => void;\n\n beforeTestResultUpdate?: (result: TestResult) => void;\n\n afterTestResultUpdate?: (result: TestResult) => void;\n\n beforeTestResultWrite?: (result: TestResult) => void;\n\n afterTestResultWrite?: (result: TestResult) => void;\n\n beforeStepStop?: (result: StepResult) => void;\n\n afterStepStop?: (result: StepResult) => void;\n}\n\nexport type LinkTemplate = string | ((url: string) => string);\n\nexport type LinkTypeOptions = {\n urlTemplate: LinkTemplate;\n nameTemplate?: LinkTemplate;\n};\n\nexport type LinkConfig<TOpts extends LinkTypeOptions = LinkTypeOptions> = Partial<Record<LinkType, TOpts>> &\n Record<string, TOpts>;\n\nexport type WriterDescriptor = [cls: string, ...args: readonly unknown[]] | string;\n\nexport type GlobalLabelsConfig = Partial<Record<LabelName, string | string[]>> & Record<string, string | string[]>;\n\nexport interface ReporterConfig {\n readonly resultsDir?: string;\n readonly links?: LinkConfig;\n readonly globalLabels?: Label[] | GlobalLabelsConfig;\n readonly listeners?: LifecycleListener[];\n readonly environmentInfo?: EnvironmentInfo;\n readonly categories?: Category[];\n}\n\nexport interface ReporterRuntimeConfig extends Omit<ReporterConfig, \"resultsDir\"> {\n readonly writer: Writer | WriterDescriptor;\n}\n\nexport interface Writer {\n writeResult(result: TestResult): void;\n\n writeGroup(result: TestResultContainer): void;\n\n writeAttachment(distFileName: string, content: Buffer): void;\n\n writeAttachmentFromPath(distFileName: string, from: string): void;\n\n writeEnvironmentInfo(info: EnvironmentInfo): void;\n\n writeCategoriesDefinitions(categories: Category[]): void;\n}\n\nexport type TestScope = {\n uuid: string;\n tests: string[];\n fixtures: FixtureResultWrapper[];\n labels: Label[];\n links: Link[];\n parameters: Parameter[];\n description?: string;\n descriptionHtml?: string;\n};\n\nexport type FixtureType = \"before\" | \"after\";\n\nexport type FixtureResultWrapper = {\n uuid: string;\n value: FixtureResult;\n type: FixtureType;\n scopeUuid: string;\n};\n\nexport type TestResultWrapper = {\n value: TestResult;\n scopeUuids: string[];\n};\n"],"mappings":";;;;;;AAaO,IAAMA,4BAA4B,GAAAC,OAAA,CAAAD,4BAAA,GAAG,sCAAsC;AAC3E,IAAME,mCAAmC,GAAAD,OAAA,CAAAC,mCAAA,GAAG,qCAAqC","ignoreList":[]}
|
package/dist/cjs/sdk/utils.js
CHANGED
|
@@ -3,11 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.stripAnsi = exports.serialize = exports.isPromise = exports.isMetadataTag = exports.isAnyStepFailed = exports.isAllStepsEnded = exports.hasStepMessage = exports.hasLabel = exports.getUnfinishedStepsMessages = exports.getStepsMessagesPair = exports.getStatusFromError = exports.getMessageAndTraceFromError = exports.extractMetadataFromString = exports.
|
|
6
|
+
exports.stripAnsi = exports.serialize = exports.isPromise = exports.isMetadataTag = exports.isAnyStepFailed = exports.isAllStepsEnded = exports.hasStepMessage = exports.hasLabel = exports.getValueFromAllureTitleMetadataMatch = exports.getUnfinishedStepsMessages = exports.getTypeFromAllureTitleMetadataMatch = exports.getStepsMessagesPair = exports.getStatusFromError = exports.getMetadataLabel = exports.getMessageAndTraceFromError = exports.extractMetadataFromString = exports.allureTitleMetadataRegexpGlobal = exports.allureTitleMetadataRegexp = exports.allureMetadataRegexp = exports.allureLabelRegexp = exports.allureIdRegexp = void 0;
|
|
7
7
|
var _model = require("../model.js");
|
|
8
8
|
function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, void 0, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = RegExp(e, t); return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { var t = o[r]; return "$" + (Array.isArray(t) ? t.join("$") : t); })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != typeof e[e.length - 1] && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); }
|
|
9
9
|
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
10
10
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
11
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
15
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
11
16
|
var getStatusFromError = error => {
|
|
12
17
|
switch (true) {
|
|
13
18
|
/**
|
|
@@ -50,56 +55,127 @@ var stripAnsi = str => {
|
|
|
50
55
|
return str.replace(regex, "");
|
|
51
56
|
};
|
|
52
57
|
exports.stripAnsi = stripAnsi;
|
|
58
|
+
var actualAndExpected = value => {
|
|
59
|
+
if (!value || typeof value !== "object") {
|
|
60
|
+
return {};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// support for jest asserts
|
|
64
|
+
if ("matcherResult" in value && value.matcherResult !== undefined && typeof value.matcherResult === "object") {
|
|
65
|
+
return {
|
|
66
|
+
actual: serialize(value.matcherResult.actual),
|
|
67
|
+
expected: serialize(value.matcherResult.expected)
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
var actual = "actual" in value && value.actual !== undefined ? {
|
|
71
|
+
actual: serialize(value.actual)
|
|
72
|
+
} : {};
|
|
73
|
+
var expected = "expected" in value && value.expected !== undefined ? {
|
|
74
|
+
expected: serialize(value.expected)
|
|
75
|
+
} : {};
|
|
76
|
+
return _objectSpread(_objectSpread({}, actual), expected);
|
|
77
|
+
};
|
|
53
78
|
var getMessageAndTraceFromError = error => {
|
|
54
79
|
var {
|
|
55
80
|
message,
|
|
56
81
|
stack
|
|
57
82
|
} = error;
|
|
58
|
-
return {
|
|
83
|
+
return _objectSpread({
|
|
59
84
|
message: message ? stripAnsi(message) : undefined,
|
|
60
85
|
trace: stack ? stripAnsi(stack) : undefined
|
|
61
|
-
};
|
|
86
|
+
}, actualAndExpected(error));
|
|
62
87
|
};
|
|
63
88
|
exports.getMessageAndTraceFromError = getMessageAndTraceFromError;
|
|
64
|
-
var
|
|
89
|
+
var allureMetadataRegexp = exports.allureMetadataRegexp = /*#__PURE__*/_wrapRegExp(/(?:^|\s)@?allure\.(\S+)$/, {
|
|
90
|
+
type: 1
|
|
91
|
+
});
|
|
92
|
+
var allureTitleMetadataRegexp = exports.allureTitleMetadataRegexp = /*#__PURE__*/_wrapRegExp(/(?:^|\s)@?allure\.([^:=\s]+)[:=]("[^"]+"|'[^']+'|`[^`]+`|\S+)/, {
|
|
93
|
+
type: 1
|
|
94
|
+
});
|
|
95
|
+
var allureTitleMetadataRegexpGlobal = exports.allureTitleMetadataRegexpGlobal = new RegExp(allureTitleMetadataRegexp, "g");
|
|
96
|
+
var allureIdRegexp = exports.allureIdRegexp = /*#__PURE__*/_wrapRegExp(/(?:^|\s)@?allure\.id[:=](\S+)/, {
|
|
65
97
|
id: 1
|
|
66
98
|
});
|
|
67
|
-
var allureIdRegexpGlobal = exports.allureIdRegexpGlobal = new RegExp(allureIdRegexp, "g");
|
|
68
99
|
var allureLabelRegexp = exports.allureLabelRegexp = /*#__PURE__*/_wrapRegExp(/(?:^|\s)@?allure\.label\.([^:=\s]+)[:=]([^\s]+)/, {
|
|
69
100
|
name: 1,
|
|
70
101
|
value: 2
|
|
71
102
|
});
|
|
72
|
-
var
|
|
103
|
+
var getTypeFromAllureTitleMetadataMatch = match => {
|
|
104
|
+
return match === null || match === void 0 ? void 0 : match[1];
|
|
105
|
+
};
|
|
106
|
+
exports.getTypeFromAllureTitleMetadataMatch = getTypeFromAllureTitleMetadataMatch;
|
|
107
|
+
var getValueFromAllureTitleMetadataMatch = match => {
|
|
108
|
+
var _match$;
|
|
109
|
+
var quotesRegexp = /['"`]/;
|
|
110
|
+
var quoteOpenRegexp = new RegExp("^".concat(quotesRegexp.source));
|
|
111
|
+
var quoteCloseRegexp = new RegExp("".concat(quotesRegexp.source, "$"));
|
|
112
|
+
var matchedValue = (_match$ = match === null || match === void 0 ? void 0 : match[2]) !== null && _match$ !== void 0 ? _match$ : "";
|
|
113
|
+
if (quoteOpenRegexp.test(matchedValue) && quoteCloseRegexp.test(matchedValue)) {
|
|
114
|
+
return matchedValue.slice(1, -1);
|
|
115
|
+
}
|
|
116
|
+
return matchedValue;
|
|
117
|
+
};
|
|
118
|
+
exports.getValueFromAllureTitleMetadataMatch = getValueFromAllureTitleMetadataMatch;
|
|
73
119
|
var isMetadataTag = tag => {
|
|
74
|
-
return
|
|
120
|
+
return allureMetadataRegexp.test(tag);
|
|
75
121
|
};
|
|
76
122
|
exports.isMetadataTag = isMetadataTag;
|
|
123
|
+
var getMetadataLabel = (tag, value) => {
|
|
124
|
+
var _match$groups;
|
|
125
|
+
var match = tag.match(allureMetadataRegexp);
|
|
126
|
+
var type = match === null || match === void 0 || (_match$groups = match.groups) === null || _match$groups === void 0 ? void 0 : _match$groups.type;
|
|
127
|
+
if (!type) {
|
|
128
|
+
return undefined;
|
|
129
|
+
}
|
|
130
|
+
var [subtype, name] = type.split(".");
|
|
131
|
+
return {
|
|
132
|
+
name: subtype === "id" ? _model.LabelName.ALLURE_ID : name,
|
|
133
|
+
value: value !== null && value !== void 0 ? value : ""
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
exports.getMetadataLabel = getMetadataLabel;
|
|
77
137
|
var extractMetadataFromString = title => {
|
|
78
138
|
var labels = [];
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if (
|
|
83
|
-
|
|
84
|
-
name: _model.LabelName.ALLURE_ID,
|
|
85
|
-
value: idValue
|
|
86
|
-
});
|
|
139
|
+
var links = [];
|
|
140
|
+
var metadata = title.matchAll(allureTitleMetadataRegexpGlobal);
|
|
141
|
+
var cleanTitle = title.replaceAll(allureTitleMetadataRegexpGlobal, "").split(" ").filter(Boolean).reduce((acc, word) => {
|
|
142
|
+
if (/^[\n\r]/.test(word)) {
|
|
143
|
+
return acc + word;
|
|
87
144
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
value
|
|
97
|
-
});
|
|
145
|
+
return "".concat(acc, " ").concat(word);
|
|
146
|
+
}, "").trim();
|
|
147
|
+
for (var m of metadata) {
|
|
148
|
+
var match = m;
|
|
149
|
+
var type = getTypeFromAllureTitleMetadataMatch(match);
|
|
150
|
+
var value = getValueFromAllureTitleMetadataMatch(match);
|
|
151
|
+
if (!type || !value) {
|
|
152
|
+
continue;
|
|
98
153
|
}
|
|
99
|
-
|
|
100
|
-
|
|
154
|
+
var [subtype, name] = type.split(".");
|
|
155
|
+
switch (subtype) {
|
|
156
|
+
case "id":
|
|
157
|
+
labels.push({
|
|
158
|
+
name: _model.LabelName.ALLURE_ID,
|
|
159
|
+
value
|
|
160
|
+
});
|
|
161
|
+
break;
|
|
162
|
+
case "label":
|
|
163
|
+
labels.push({
|
|
164
|
+
name,
|
|
165
|
+
value
|
|
166
|
+
});
|
|
167
|
+
break;
|
|
168
|
+
case "link":
|
|
169
|
+
links.push({
|
|
170
|
+
type: name,
|
|
171
|
+
url: value
|
|
172
|
+
});
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
101
176
|
return {
|
|
102
177
|
labels,
|
|
178
|
+
links,
|
|
103
179
|
cleanTitle
|
|
104
180
|
};
|
|
105
181
|
};
|