allure-codeceptjs 3.10.2 → 3.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.AllureCodeceptJsReporter = void 0;
7
+ var _nodePath = require("node:path");
7
8
  var _allureJsCommons = require("allure-js-commons");
8
9
  var _sdk = require("allure-js-commons/sdk");
9
10
  var _allureMocha = _interopRequireDefault(require("allure-mocha"));
@@ -33,6 +34,7 @@ var getCodeceptStatusFromError = (error, hookName) => {
33
34
  }
34
35
  return isKnownCodeceptVerificationError(error) ? _allureJsCommons.Status.FAILED : _allureJsCommons.Status.BROKEN;
35
36
  };
37
+ var isBeforeHook = hookName => hookName === "Before" || hookName === "BeforeSuite";
36
38
  var isErrorInstance = value => {
37
39
  var _constructor;
38
40
  return value instanceof Error || typeof value === "object" && value !== null && ((_constructor = value.constructor) === null || _constructor === void 0 ? void 0 : _constructor.name) === "Error";
@@ -84,8 +86,12 @@ class AllureCodeceptJsReporter extends _allureMocha.default {
84
86
  tr.labels.push(...extraTagLabels);
85
87
  });
86
88
  }
87
- testFailed(_, error, hookName) {
89
+ testFailed(test, error, hookName) {
88
90
  this.currentTestHookName = hookName;
91
+ var shouldFinishTest = isBeforeHook(hookName);
92
+ if (!this.currentTest && shouldFinishTest) {
93
+ this.onTest(test);
94
+ }
89
95
  var status = getCodeceptStatusFromError(error, hookName);
90
96
  var statusDetails = (0, _sdk.getMessageAndTraceFromError)(error);
91
97
  if (this.currentTest) {
@@ -119,8 +125,20 @@ class AllureCodeceptJsReporter extends _allureMocha.default {
119
125
  this.runtime.stopStep(id);
120
126
  }
121
127
  this.metaStepStack = [];
128
+ if (shouldFinishTest) {
129
+ if (this.currentHook) {
130
+ this.runtime.updateFixture(this.currentHook, result => {
131
+ result.status = status;
132
+ result.statusDetails = _objectSpread(_objectSpread({}, result.statusDetails), statusDetails);
133
+ });
134
+ this.runtime.stopFixture(this.currentHook);
135
+ this.currentHook = undefined;
136
+ }
137
+ this.onTestEnd(test);
138
+ this.currentTestHookName = undefined;
139
+ }
122
140
  }
123
- testFinished() {
141
+ testFinished(test) {
124
142
  this.currentTestHookName = undefined;
125
143
  if (this.currentBddStep) {
126
144
  this.runtime.updateStep(this.currentBddStep, result => {
@@ -141,6 +159,20 @@ class AllureCodeceptJsReporter extends _allureMocha.default {
141
159
  }
142
160
  this.metaStepStack = [];
143
161
  this.currentLeafStep = undefined;
162
+ var currentTest = this.currentTest;
163
+ if (currentTest) {
164
+ _codeceptjs.recorder.add("allure screenshot attachment", () => {
165
+ var _test$artifacts;
166
+ if (!(test !== null && test !== void 0 && (_test$artifacts = test.artifacts) !== null && _test$artifacts !== void 0 && _test$artifacts.screenshot)) {
167
+ return;
168
+ }
169
+ var screenshotPath = test.artifacts.screenshot;
170
+ this.runtime.writeAttachment(currentTest, null, (0, _nodePath.basename)(screenshotPath), screenshotPath, {
171
+ contentType: _allureJsCommons.ContentType.PNG,
172
+ wrapInStep: true
173
+ });
174
+ }, true);
175
+ }
144
176
  }
145
177
  stepStarted(step) {
146
178
  var _this$currentHook, _this$metaStepStack$i2, _this$metaStepStack2;
@@ -1 +1 @@
1
- {"version":3,"file":"reporter.js","names":["_allureJsCommons","require","_sdk","_allureMocha","_interopRequireDefault","_codeceptjs","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","MAX_META_STEP_NESTING","TRY_TO_SESSION","knownCodeceptVerificationErrorPatterns","isKnownCodeceptVerificationError","error","message","stripAnsi","some","pattern","test","getCodeceptStatusFromError","hookName","status","getStatusFromError","Status","FAILED","BROKEN","isErrorInstance","_constructor","Error","constructor","name","isTryToSession","_recorder$getCurrentS","recorder","getCurrentSessionId","getRecorderPromise","_recorder$promise","promise","AllureCodeceptJsReporter","AllureMochaReporter","runner","opts","isInWorker","undefined","registerEvents","on","mochaTestFailed","bind","event","dispatcher","before","testStarted","failed","testFailed","finished","testFinished","step","started","stepStarted","passed","stepPassed","stepFailed","comment","stepComment","bddStep","bddStepStarted","after","currentTest","currentTestHookName","tags","extraTagLabels","tag","isMetadataTag","map","startsWith","substring","trim","LabelName","TAG","runtime","updateTest","tr","labels","_","statusDetails","getMessageAndTraceFromError","result","currentBddStep","stopCurrentStep","stage","Stage","FINISHED","id","metaStepStack","updateStep","stopStep","PASSED","currentLeafStep","_this$currentHook","_this$metaStepStack$i2","_this$metaStepStack2","root","currentHook","stepPath","current","metaStep","isBDD","_current$toString","unshift","toString","index","Math","min","s","slice","_this$metaStepStack$i","_this$metaStepStack","parentId","startStep","parent","_this$currentHook2","keyword","text","inspect","catch","err","Promise","reject","updateFunc","_this$currentHook3","currentStep","stopStepById","exports"],"sources":["../../src/reporter.ts"],"sourcesContent":["import { LabelName, Stage, Status, type StepResult } from \"allure-js-commons\";\nimport { getMessageAndTraceFromError, getStatusFromError, isMetadataTag, stripAnsi } from \"allure-js-commons/sdk\";\nimport AllureMochaReporter from \"allure-mocha\";\nimport { event, recorder } from \"codeceptjs\";\nimport type * as Mocha from \"mocha\";\n\nimport type { CodeceptBddStep, CodeceptError, CodeceptStep } from \"./model.js\";\n\ninterface MetaStep {\n name: string;\n id: string;\n}\n\nconst MAX_META_STEP_NESTING = 10;\n// CodeceptJS tryTo() uses a dedicated \"tryTo\" recorder session.\n// Docs: https://codecept.io/effects.html\nconst TRY_TO_SESSION = \"tryTo\";\n\nconst knownCodeceptVerificationErrorPatterns = [\n /^Element \".+\" is (?:not visible on page|still visible on page|not seen in DOM|still seen in DOM)\\.?$/i,\n /^(?:Element|Clickable element|Context element|Frame|Option \".+\" in|Custom locator .+) .*\\b(?:not found|was not found)\\b/i,\n /^element \\(.+\\) .+ after \\d+(?:\\.\\d+)? sec(?:\\n|\\.|$)/i,\n /^Text \".+\" was not found on page after \\d+(?:\\.\\d+)? sec\\.?$/i,\n /^Expected \\d+ tabs are not met after \\d+(?:\\.\\d+)? sec\\.?$/i,\n /^Cookie .+ is not found after \\d+(?:\\.\\d+)?s$/i,\n] as const;\n\nconst isKnownCodeceptVerificationError = (error: Partial<Error>): boolean => {\n const message = error.message ? stripAnsi(error.message) : \"\";\n\n if (!message) {\n return false;\n }\n\n return knownCodeceptVerificationErrorPatterns.some((pattern) => pattern.test(message));\n};\n\nconst getCodeceptStatusFromError = (error: Partial<Error>, hookName?: string): Status => {\n const status = getStatusFromError(error);\n\n if (status === Status.FAILED || hookName) {\n return status;\n }\n\n return isKnownCodeceptVerificationError(error) ? Status.FAILED : Status.BROKEN;\n};\n\nconst isErrorInstance = (value: unknown): value is Error =>\n value instanceof Error ||\n (typeof value === \"object\" &&\n value !== null &&\n (value as { constructor?: { name?: unknown } }).constructor?.name === \"Error\");\n\nconst isTryToSession = () => recorder.getCurrentSessionId?.() === TRY_TO_SESSION;\nconst getRecorderPromise = (): Promise<unknown> | undefined =>\n (recorder.promise as (() => Promise<unknown> | undefined) | undefined)?.();\n\nexport class AllureCodeceptJsReporter extends AllureMochaReporter {\n protected currentBddStep?: string;\n protected metaStepStack: MetaStep[] = [];\n protected currentLeafStep?: string;\n protected currentTestHookName?: string;\n\n constructor(runner: Mocha.Runner, opts: Mocha.MochaOptions, isInWorker: boolean) {\n super(runner, opts, isInWorker);\n this.registerEvents();\n runner.on(\"fail\", this.mochaTestFailed.bind(this));\n }\n\n registerEvents() {\n // Test\n event.dispatcher.on(event.test.before, this.testStarted.bind(this));\n event.dispatcher.on(event.test.failed, this.testFailed.bind(this));\n event.dispatcher.on(event.test.finished, this.testFinished.bind(this));\n // Step\n event.dispatcher.on(event.step.started, this.stepStarted.bind(this));\n event.dispatcher.on(event.step.passed, this.stepPassed.bind(this));\n event.dispatcher.on(event.step.failed, this.stepFailed.bind(this));\n event.dispatcher.on(event.step.comment, this.stepComment.bind(this));\n\n event.dispatcher.on(event.bddStep.before, this.bddStepStarted.bind(this));\n event.dispatcher.on(event.bddStep.after, this.stepPassed.bind(this));\n }\n\n testStarted(test: { tags?: string[] }) {\n if (!this.currentTest) {\n return;\n }\n\n this.currentTestHookName = undefined;\n\n const tags = test.tags || [];\n const extraTagLabels = tags\n .filter((tag) => tag && !isMetadataTag(tag))\n .map((tag) => (tag.startsWith(\"@\") ? tag.substring(1) : tag))\n .map((tag) => tag.trim())\n .filter((tag) => tag.length > 0)\n .map((tag) => ({ name: LabelName.TAG, value: tag }));\n\n this.runtime.updateTest(this.currentTest, (tr) => {\n tr.labels.push(...extraTagLabels);\n });\n }\n\n testFailed(_: {}, error: Error, hookName?: string) {\n this.currentTestHookName = hookName;\n const status = getCodeceptStatusFromError(error, hookName);\n const statusDetails = getMessageAndTraceFromError(error);\n\n if (this.currentTest) {\n this.runtime.updateTest(this.currentTest, (result) => {\n result.status = status;\n result.statusDetails = {\n ...result.statusDetails,\n ...statusDetails,\n };\n });\n }\n\n if (this.currentBddStep) {\n this.stopCurrentStep((result) => {\n result.stage = Stage.FINISHED;\n result.status = Status.BROKEN;\n if (error) {\n result.status = status;\n result.statusDetails = { ...statusDetails };\n }\n });\n }\n this.currentBddStep = undefined;\n\n for (const { id } of this.metaStepStack) {\n this.runtime.updateStep(id, (result) => {\n result.stage = Stage.FINISHED;\n result.status = Status.BROKEN;\n if (error) {\n result.status = status;\n result.statusDetails = { ...statusDetails };\n }\n });\n this.runtime.stopStep(id);\n }\n this.metaStepStack = [];\n }\n\n testFinished() {\n this.currentTestHookName = undefined;\n if (this.currentBddStep) {\n this.runtime.updateStep(this.currentBddStep, (result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(this.currentBddStep);\n }\n this.currentBddStep = undefined;\n\n for (const { id } of this.metaStepStack) {\n this.runtime.updateStep(id, (result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(id);\n }\n\n this.metaStepStack = [];\n this.currentLeafStep = undefined;\n }\n\n stepStarted(step: CodeceptStep) {\n const root = this.currentHook ?? this.currentTest;\n if (!root) {\n return;\n }\n\n const stepPath: string[] = [];\n let current = step.metaStep;\n while (current && !current.isBDD() && stepPath.length < MAX_META_STEP_NESTING) {\n stepPath.unshift(stripAnsi(current.toString() ?? \"\").trim());\n current = current.metaStep;\n }\n\n let index = 0;\n while (\n index < Math.min(this.metaStepStack.length, stepPath.length) &&\n this.metaStepStack[index].name === stepPath[index]\n ) {\n index++;\n }\n\n for (let i = this.metaStepStack.length - 1; i >= index; i--) {\n const { id } = this.metaStepStack[i];\n this.runtime.updateStep(id, (s) => {\n s.status = Status.PASSED;\n s.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(id);\n }\n this.metaStepStack = this.metaStepStack.slice(0, index);\n\n for (let i = index; i < stepPath.length; i++) {\n const name = stepPath[i];\n const parentId = this.metaStepStack[i - 1]?.id ?? root;\n const id = this.runtime.startStep(parentId, undefined, {\n name,\n });\n if (id) {\n this.metaStepStack.push({ name, id });\n }\n }\n\n const parent = this.metaStepStack[this.metaStepStack.length - 1]?.id ?? root;\n this.currentLeafStep = this.runtime.startStep(parent, undefined, {\n name: step.toString().trim(),\n });\n }\n\n bddStepStarted(step: CodeceptBddStep) {\n const root = this.currentHook ?? this.currentTest;\n if (!root) {\n return;\n }\n if (this.currentBddStep) {\n this.runtime.updateStep(this.currentBddStep, (result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(this.currentBddStep);\n }\n this.currentBddStep = this.runtime.startStep(root, undefined, {\n name: step.keyword + step.text,\n });\n }\n\n // Step errors are usually reported directly, but some paths still require\n // reading the recorder rejection to populate the final step status/details.\n stepFailed(_: CodeceptJS.Step, error?: CodeceptError) {\n if (!this.currentLeafStep) {\n return;\n }\n\n const currentLeafStep = this.currentLeafStep;\n\n this.runtime.updateStep(currentLeafStep, (result) => {\n result.stage = Stage.FINISHED;\n if (error) {\n if (!error.message && typeof error.inspect === \"function\") {\n error.message = error.inspect();\n }\n result.status = isTryToSession() ? Status.BROKEN : getCodeceptStatusFromError(error as unknown as Error);\n result.statusDetails = getMessageAndTraceFromError(error as unknown as Error);\n } else {\n const promise = getRecorderPromise();\n if (promise) {\n promise.catch((err) => {\n if (!err.message && typeof err.inspect === \"function\") {\n err.message = err.inspect();\n }\n if (isErrorInstance(err)) {\n this.runtime.updateStep(currentLeafStep, (step) => {\n step.status = isTryToSession() ? Status.BROKEN : getCodeceptStatusFromError(err as Error);\n step.statusDetails = getMessageAndTraceFromError(err as Error);\n });\n }\n return Promise.reject(err);\n });\n }\n\n result.status = Status.BROKEN;\n }\n });\n this.runtime.stopStep(currentLeafStep);\n this.currentLeafStep = undefined;\n }\n\n stepComment() {\n this.stopCurrentStep((result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n }\n\n stepPassed() {\n if (this.currentBddStep && !this.currentLeafStep) {\n this.runtime.updateStep(this.currentBddStep, (result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(this.currentBddStep);\n this.currentBddStep = undefined;\n return;\n }\n\n if (!this.currentLeafStep) {\n return;\n }\n\n this.runtime.updateStep(this.currentLeafStep, (result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(this.currentLeafStep);\n this.currentLeafStep = undefined;\n }\n\n stopCurrentStep(updateFunc: (result: StepResult) => void) {\n const root = this.currentHook ?? this.currentTest;\n const currentStep = root ? this.runtime.currentStep(root) : undefined;\n\n this.stopStepById(currentStep, updateFunc);\n }\n\n stopStepById(currentStep: string | undefined, updateFunc: (result: StepResult) => void) {\n if (!currentStep) {\n return;\n }\n const promise = getRecorderPromise();\n if (promise) {\n promise.catch((err) => {\n if (!err.message && typeof err.inspect === \"function\") {\n // AssertionFailedError doesn't set message attribute\n err.message = err.inspect();\n }\n if (isErrorInstance(err)) {\n this.runtime.updateStep(currentStep, (step) => {\n step.status = isTryToSession() ? Status.BROKEN : getCodeceptStatusFromError(err as Error);\n step.statusDetails = { ...step.statusDetails, ...getMessageAndTraceFromError(err as Error) };\n });\n }\n return Promise.reject(err);\n });\n }\n\n this.runtime.updateStep(currentStep, updateFunc);\n this.runtime.stopStep(currentStep);\n }\n\n mochaTestFailed(_: Mocha.Test, error: Error) {\n if (!this.currentTest) {\n return;\n }\n\n this.runtime.updateTest(this.currentTest, (result) => {\n result.status = getCodeceptStatusFromError(error, this.currentTestHookName);\n result.statusDetails = {\n ...result.statusDetails,\n ...getMessageAndTraceFromError(error),\n };\n });\n }\n\n protected getFrameworkName = () => \"codeceptjs\";\n\n protected getWorkerId = () => undefined;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAA6C,SAAAG,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,QAAAH,CAAA,EAAAI,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAP,CAAA,OAAAM,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAR,CAAA,GAAAI,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAX,CAAA,EAAAI,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAf,CAAA,aAAAI,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EA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EtE,KAAY,EAAE;IAC3C,IAAI,CAAC,IAAI,CAACsD,WAAW,EAAE;MACrB;IACF;IAEA,IAAI,CAACY,OAAO,CAACC,UAAU,CAAC,IAAI,CAACb,WAAW,EAAGmB,MAAM,IAAK;MACpDA,MAAM,CAACjE,MAAM,GAAGF,0BAA0B,CAACN,KAAK,EAAE,IAAI,CAACuD,mBAAmB,CAAC;MAC3EkB,MAAM,CAACF,aAAa,GAAA/F,aAAA,CAAAA,aAAA,KACfiG,MAAM,CAACF,aAAa,GACpB,IAAAC,gCAA2B,EAACxE,KAAK,CAAC,CACtC;IACH,CAAC,CAAC;EACJ;AAKF;AAACuH,OAAA,CAAA9F,wBAAA,GAAAA,wBAAA","ignoreList":[]}
1
+ {"version":3,"file":"reporter.js","names":["_nodePath","require","_allureJsCommons","_sdk","_allureMocha","_interopRequireDefault","_codeceptjs","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","MAX_META_STEP_NESTING","TRY_TO_SESSION","knownCodeceptVerificationErrorPatterns","isKnownCodeceptVerificationError","error","message","stripAnsi","some","pattern","test","getCodeceptStatusFromError","hookName","status","getStatusFromError","Status","FAILED","BROKEN","isBeforeHook","isErrorInstance","_constructor","Error","constructor","name","isTryToSession","_recorder$getCurrentS","recorder","getCurrentSessionId","getRecorderPromise","_recorder$promise","promise","AllureCodeceptJsReporter","AllureMochaReporter","runner","opts","isInWorker","undefined","registerEvents","on","mochaTestFailed","bind","event","dispatcher","before","testStarted","failed","testFailed","finished","testFinished","step","started","stepStarted","passed","stepPassed","stepFailed","comment","stepComment","bddStep","bddStepStarted","after","currentTest","currentTestHookName","tags","extraTagLabels","tag","isMetadataTag","map","startsWith","substring","trim","LabelName","TAG","runtime","updateTest","tr","labels","shouldFinishTest","onTest","statusDetails","getMessageAndTraceFromError","result","currentBddStep","stopCurrentStep","stage","Stage","FINISHED","id","metaStepStack","updateStep","stopStep","currentHook","updateFixture","stopFixture","onTestEnd","PASSED","currentLeafStep","add","_test$artifacts","artifacts","screenshot","screenshotPath","writeAttachment","basename","contentType","ContentType","PNG","wrapInStep","_this$currentHook","_this$metaStepStack$i2","_this$metaStepStack2","root","stepPath","current","metaStep","isBDD","_current$toString","unshift","toString","index","Math","min","s","slice","_this$metaStepStack$i","_this$metaStepStack","parentId","startStep","parent","_this$currentHook2","keyword","text","_","inspect","catch","err","Promise","reject","updateFunc","_this$currentHook3","currentStep","stopStepById","exports"],"sources":["../../src/reporter.ts"],"sourcesContent":["import { basename } from \"node:path\";\n\nimport { ContentType, LabelName, Stage, Status, type StepResult } from \"allure-js-commons\";\nimport { getMessageAndTraceFromError, getStatusFromError, isMetadataTag, stripAnsi } from \"allure-js-commons/sdk\";\nimport AllureMochaReporter from \"allure-mocha\";\nimport { event, recorder } from \"codeceptjs\";\nimport type * as Mocha from \"mocha\";\n\nimport type { CodeceptBddStep, CodeceptError, CodeceptStep } from \"./model.js\";\n\ninterface MetaStep {\n name: string;\n id: string;\n}\n\ninterface CodeceptTestWithArtifacts {\n artifacts?: {\n screenshot?: string;\n };\n}\n\nconst MAX_META_STEP_NESTING = 10;\n// CodeceptJS tryTo() uses a dedicated \"tryTo\" recorder session.\n// Docs: https://codecept.io/effects.html\nconst TRY_TO_SESSION = \"tryTo\";\n\nconst knownCodeceptVerificationErrorPatterns = [\n /^Element \".+\" is (?:not visible on page|still visible on page|not seen in DOM|still seen in DOM)\\.?$/i,\n /^(?:Element|Clickable element|Context element|Frame|Option \".+\" in|Custom locator .+) .*\\b(?:not found|was not found)\\b/i,\n /^element \\(.+\\) .+ after \\d+(?:\\.\\d+)? sec(?:\\n|\\.|$)/i,\n /^Text \".+\" was not found on page after \\d+(?:\\.\\d+)? sec\\.?$/i,\n /^Expected \\d+ tabs are not met after \\d+(?:\\.\\d+)? sec\\.?$/i,\n /^Cookie .+ is not found after \\d+(?:\\.\\d+)?s$/i,\n] as const;\n\nconst isKnownCodeceptVerificationError = (error: Partial<Error>): boolean => {\n const message = error.message ? stripAnsi(error.message) : \"\";\n\n if (!message) {\n return false;\n }\n\n return knownCodeceptVerificationErrorPatterns.some((pattern) => pattern.test(message));\n};\n\nconst getCodeceptStatusFromError = (error: Partial<Error>, hookName?: string): Status => {\n const status = getStatusFromError(error);\n\n if (status === Status.FAILED || hookName) {\n return status;\n }\n\n return isKnownCodeceptVerificationError(error) ? Status.FAILED : Status.BROKEN;\n};\n\nconst isBeforeHook = (hookName?: string) => hookName === \"Before\" || hookName === \"BeforeSuite\";\n\nconst isErrorInstance = (value: unknown): value is Error =>\n value instanceof Error ||\n (typeof value === \"object\" &&\n value !== null &&\n (value as { constructor?: { name?: unknown } }).constructor?.name === \"Error\");\n\nconst isTryToSession = () => recorder.getCurrentSessionId?.() === TRY_TO_SESSION;\nconst getRecorderPromise = (): Promise<unknown> | undefined =>\n (recorder.promise as (() => Promise<unknown> | undefined) | undefined)?.();\n\nexport class AllureCodeceptJsReporter extends AllureMochaReporter {\n protected currentBddStep?: string;\n protected metaStepStack: MetaStep[] = [];\n protected currentLeafStep?: string;\n protected currentTestHookName?: string;\n\n constructor(runner: Mocha.Runner, opts: Mocha.MochaOptions, isInWorker: boolean) {\n super(runner, opts, isInWorker);\n this.registerEvents();\n runner.on(\"fail\", this.mochaTestFailed.bind(this));\n }\n\n registerEvents() {\n // Test\n event.dispatcher.on(event.test.before, this.testStarted.bind(this));\n event.dispatcher.on(event.test.failed, this.testFailed.bind(this));\n event.dispatcher.on(event.test.finished, this.testFinished.bind(this));\n // Step\n event.dispatcher.on(event.step.started, this.stepStarted.bind(this));\n event.dispatcher.on(event.step.passed, this.stepPassed.bind(this));\n event.dispatcher.on(event.step.failed, this.stepFailed.bind(this));\n event.dispatcher.on(event.step.comment, this.stepComment.bind(this));\n\n event.dispatcher.on(event.bddStep.before, this.bddStepStarted.bind(this));\n event.dispatcher.on(event.bddStep.after, this.stepPassed.bind(this));\n }\n\n testStarted(test: { tags?: string[] }) {\n if (!this.currentTest) {\n return;\n }\n\n this.currentTestHookName = undefined;\n\n const tags = test.tags || [];\n const extraTagLabels = tags\n .filter((tag) => tag && !isMetadataTag(tag))\n .map((tag) => (tag.startsWith(\"@\") ? tag.substring(1) : tag))\n .map((tag) => tag.trim())\n .filter((tag) => tag.length > 0)\n .map((tag) => ({ name: LabelName.TAG, value: tag }));\n\n this.runtime.updateTest(this.currentTest, (tr) => {\n tr.labels.push(...extraTagLabels);\n });\n }\n\n testFailed(test: Mocha.Test, error: Error, hookName?: string) {\n this.currentTestHookName = hookName;\n const shouldFinishTest = isBeforeHook(hookName);\n\n if (!this.currentTest && shouldFinishTest) {\n this.onTest(test);\n }\n\n const status = getCodeceptStatusFromError(error, hookName);\n const statusDetails = getMessageAndTraceFromError(error);\n\n if (this.currentTest) {\n this.runtime.updateTest(this.currentTest, (result) => {\n result.status = status;\n result.statusDetails = {\n ...result.statusDetails,\n ...statusDetails,\n };\n });\n }\n\n if (this.currentBddStep) {\n this.stopCurrentStep((result) => {\n result.stage = Stage.FINISHED;\n result.status = Status.BROKEN;\n if (error) {\n result.status = status;\n result.statusDetails = { ...statusDetails };\n }\n });\n }\n this.currentBddStep = undefined;\n\n for (const { id } of this.metaStepStack) {\n this.runtime.updateStep(id, (result) => {\n result.stage = Stage.FINISHED;\n result.status = Status.BROKEN;\n if (error) {\n result.status = status;\n result.statusDetails = { ...statusDetails };\n }\n });\n this.runtime.stopStep(id);\n }\n this.metaStepStack = [];\n\n if (shouldFinishTest) {\n if (this.currentHook) {\n this.runtime.updateFixture(this.currentHook, (result) => {\n result.status = status;\n result.statusDetails = {\n ...result.statusDetails,\n ...statusDetails,\n };\n });\n this.runtime.stopFixture(this.currentHook);\n this.currentHook = undefined;\n }\n\n this.onTestEnd(test);\n this.currentTestHookName = undefined;\n }\n }\n\n testFinished(test?: CodeceptTestWithArtifacts) {\n this.currentTestHookName = undefined;\n if (this.currentBddStep) {\n this.runtime.updateStep(this.currentBddStep, (result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(this.currentBddStep);\n }\n this.currentBddStep = undefined;\n\n for (const { id } of this.metaStepStack) {\n this.runtime.updateStep(id, (result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(id);\n }\n\n this.metaStepStack = [];\n this.currentLeafStep = undefined;\n\n const currentTest = this.currentTest;\n if (currentTest) {\n recorder.add(\n \"allure screenshot attachment\",\n () => {\n if (!test?.artifacts?.screenshot) {\n return;\n }\n const screenshotPath = test.artifacts.screenshot;\n\n this.runtime.writeAttachment(currentTest, null, basename(screenshotPath), screenshotPath, {\n contentType: ContentType.PNG,\n wrapInStep: true,\n });\n },\n true,\n );\n }\n }\n\n stepStarted(step: CodeceptStep) {\n const root = this.currentHook ?? this.currentTest;\n if (!root) {\n return;\n }\n\n const stepPath: string[] = [];\n let current = step.metaStep;\n while (current && !current.isBDD() && stepPath.length < MAX_META_STEP_NESTING) {\n stepPath.unshift(stripAnsi(current.toString() ?? \"\").trim());\n current = current.metaStep;\n }\n\n let index = 0;\n while (\n index < Math.min(this.metaStepStack.length, stepPath.length) &&\n this.metaStepStack[index].name === stepPath[index]\n ) {\n index++;\n }\n\n for (let i = this.metaStepStack.length - 1; i >= index; i--) {\n const { id } = this.metaStepStack[i];\n this.runtime.updateStep(id, (s) => {\n s.status = Status.PASSED;\n s.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(id);\n }\n this.metaStepStack = this.metaStepStack.slice(0, index);\n\n for (let i = index; i < stepPath.length; i++) {\n const name = stepPath[i];\n const parentId = this.metaStepStack[i - 1]?.id ?? root;\n const id = this.runtime.startStep(parentId, undefined, {\n name,\n });\n if (id) {\n this.metaStepStack.push({ name, id });\n }\n }\n\n const parent = this.metaStepStack[this.metaStepStack.length - 1]?.id ?? root;\n this.currentLeafStep = this.runtime.startStep(parent, undefined, {\n name: step.toString().trim(),\n });\n }\n\n bddStepStarted(step: CodeceptBddStep) {\n const root = this.currentHook ?? this.currentTest;\n if (!root) {\n return;\n }\n if (this.currentBddStep) {\n this.runtime.updateStep(this.currentBddStep, (result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(this.currentBddStep);\n }\n this.currentBddStep = this.runtime.startStep(root, undefined, {\n name: step.keyword + step.text,\n });\n }\n\n // Step errors are usually reported directly, but some paths still require\n // reading the recorder rejection to populate the final step status/details.\n stepFailed(_: CodeceptJS.Step, error?: CodeceptError) {\n if (!this.currentLeafStep) {\n return;\n }\n\n const currentLeafStep = this.currentLeafStep;\n\n this.runtime.updateStep(currentLeafStep, (result) => {\n result.stage = Stage.FINISHED;\n if (error) {\n if (!error.message && typeof error.inspect === \"function\") {\n error.message = error.inspect();\n }\n result.status = isTryToSession() ? Status.BROKEN : getCodeceptStatusFromError(error as unknown as Error);\n result.statusDetails = getMessageAndTraceFromError(error as unknown as Error);\n } else {\n const promise = getRecorderPromise();\n if (promise) {\n promise.catch((err) => {\n if (!err.message && typeof err.inspect === \"function\") {\n err.message = err.inspect();\n }\n if (isErrorInstance(err)) {\n this.runtime.updateStep(currentLeafStep, (step) => {\n step.status = isTryToSession() ? Status.BROKEN : getCodeceptStatusFromError(err as Error);\n step.statusDetails = getMessageAndTraceFromError(err as Error);\n });\n }\n return Promise.reject(err);\n });\n }\n\n result.status = Status.BROKEN;\n }\n });\n this.runtime.stopStep(currentLeafStep);\n this.currentLeafStep = undefined;\n }\n\n stepComment() {\n this.stopCurrentStep((result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n }\n\n stepPassed() {\n if (this.currentBddStep && !this.currentLeafStep) {\n this.runtime.updateStep(this.currentBddStep, (result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(this.currentBddStep);\n this.currentBddStep = undefined;\n return;\n }\n\n if (!this.currentLeafStep) {\n return;\n }\n\n this.runtime.updateStep(this.currentLeafStep, (result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(this.currentLeafStep);\n this.currentLeafStep = undefined;\n }\n\n stopCurrentStep(updateFunc: (result: StepResult) => void) {\n const root = this.currentHook ?? this.currentTest;\n const currentStep = root ? this.runtime.currentStep(root) : undefined;\n\n this.stopStepById(currentStep, updateFunc);\n }\n\n stopStepById(currentStep: string | undefined, updateFunc: (result: StepResult) => void) {\n if (!currentStep) {\n return;\n }\n const promise = getRecorderPromise();\n if (promise) {\n promise.catch((err) => {\n if (!err.message && typeof err.inspect === \"function\") {\n // AssertionFailedError doesn't set message attribute\n err.message = err.inspect();\n }\n if (isErrorInstance(err)) {\n this.runtime.updateStep(currentStep, (step) => {\n step.status = isTryToSession() ? Status.BROKEN : getCodeceptStatusFromError(err as Error);\n step.statusDetails = { ...step.statusDetails, ...getMessageAndTraceFromError(err as Error) };\n });\n }\n return Promise.reject(err);\n });\n }\n\n this.runtime.updateStep(currentStep, updateFunc);\n this.runtime.stopStep(currentStep);\n }\n\n mochaTestFailed(_: Mocha.Test, error: Error) {\n if (!this.currentTest) {\n return;\n }\n\n this.runtime.updateTest(this.currentTest, (result) => {\n result.status = getCodeceptStatusFromError(error, this.currentTestHookName);\n result.statusDetails = {\n ...result.statusDetails,\n ...getMessageAndTraceFromError(error),\n };\n });\n }\n\n protected getFrameworkName = () => \"codeceptjs\";\n\n protected getWorkerId = () => undefined;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,IAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAA6C,SAAAI,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA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GAAG,CAACF,OAAO,CAAC,CAAC;QAC7B;QACA,IAAIjH,eAAe,CAACmH,GAAG,CAAC,EAAE;UACxB,IAAI,CAAC9D,OAAO,CAACgB,UAAU,CAACmD,WAAW,EAAG1F,IAAI,IAAK;YAC7CA,IAAI,CAACpC,MAAM,GAAGW,cAAc,CAAC,CAAC,GAAGT,uBAAM,CAACE,MAAM,GAAGN,0BAA0B,CAAC2H,GAAY,CAAC;YACzFrF,IAAI,CAAC6B,aAAa,GAAAjG,aAAA,CAAAA,aAAA,KAAQoE,IAAI,CAAC6B,aAAa,GAAK,IAAAC,gCAA2B,EAACuD,GAAY,CAAC,CAAE;UAC9F,CAAC,CAAC;QACJ;QACA,OAAOC,OAAO,CAACC,MAAM,CAACF,GAAG,CAAC;MAC5B,CAAC,CAAC;IACJ;IAEA,IAAI,CAAC9D,OAAO,CAACgB,UAAU,CAACmD,WAAW,EAAEF,UAAU,CAAC;IAChD,IAAI,CAACjE,OAAO,CAACiB,QAAQ,CAACkD,WAAW,CAAC;EACpC;EAEApG,eAAeA,CAAC4F,CAAa,EAAE9H,KAAY,EAAE;IAC3C,IAAI,CAAC,IAAI,CAACuD,WAAW,EAAE;MACrB;IACF;IAEA,IAAI,CAACY,OAAO,CAACC,UAAU,CAAC,IAAI,CAACb,WAAW,EAAGoB,MAAM,IAAK;MACpDA,MAAM,CAACnE,MAAM,GAAGF,0BAA0B,CAACN,KAAK,EAAE,IAAI,CAACwD,mBAAmB,CAAC;MAC3EmB,MAAM,CAACF,aAAa,GAAAjG,aAAA,CAAAA,aAAA,KACfmG,MAAM,CAACF,aAAa,GACpB,IAAAC,gCAA2B,EAAC1E,KAAK,CAAC,CACtC;IACH,CAAC,CAAC;EACJ;AAKF;AAACwI,OAAA,CAAA9G,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -3,7 +3,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
3
3
  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; }
4
4
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
5
5
  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); }
6
- import { LabelName, Stage, Status } from "allure-js-commons";
6
+ import { basename } from "node:path";
7
+ import { ContentType, LabelName, Stage, Status } from "allure-js-commons";
7
8
  import { getMessageAndTraceFromError, getStatusFromError, isMetadataTag, stripAnsi } from "allure-js-commons/sdk";
8
9
  import AllureMochaReporter from "allure-mocha";
9
10
  import { event, recorder } from "codeceptjs";
@@ -26,6 +27,7 @@ var getCodeceptStatusFromError = (error, hookName) => {
26
27
  }
27
28
  return isKnownCodeceptVerificationError(error) ? Status.FAILED : Status.BROKEN;
28
29
  };
30
+ var isBeforeHook = hookName => hookName === "Before" || hookName === "BeforeSuite";
29
31
  var isErrorInstance = value => {
30
32
  var _constructor;
31
33
  return value instanceof Error || typeof value === "object" && value !== null && ((_constructor = value.constructor) === null || _constructor === void 0 ? void 0 : _constructor.name) === "Error";
@@ -77,8 +79,12 @@ export class AllureCodeceptJsReporter extends AllureMochaReporter {
77
79
  tr.labels.push(...extraTagLabels);
78
80
  });
79
81
  }
80
- testFailed(_, error, hookName) {
82
+ testFailed(test, error, hookName) {
81
83
  this.currentTestHookName = hookName;
84
+ var shouldFinishTest = isBeforeHook(hookName);
85
+ if (!this.currentTest && shouldFinishTest) {
86
+ this.onTest(test);
87
+ }
82
88
  var status = getCodeceptStatusFromError(error, hookName);
83
89
  var statusDetails = getMessageAndTraceFromError(error);
84
90
  if (this.currentTest) {
@@ -112,8 +118,20 @@ export class AllureCodeceptJsReporter extends AllureMochaReporter {
112
118
  this.runtime.stopStep(id);
113
119
  }
114
120
  this.metaStepStack = [];
121
+ if (shouldFinishTest) {
122
+ if (this.currentHook) {
123
+ this.runtime.updateFixture(this.currentHook, result => {
124
+ result.status = status;
125
+ result.statusDetails = _objectSpread(_objectSpread({}, result.statusDetails), statusDetails);
126
+ });
127
+ this.runtime.stopFixture(this.currentHook);
128
+ this.currentHook = undefined;
129
+ }
130
+ this.onTestEnd(test);
131
+ this.currentTestHookName = undefined;
132
+ }
115
133
  }
116
- testFinished() {
134
+ testFinished(test) {
117
135
  this.currentTestHookName = undefined;
118
136
  if (this.currentBddStep) {
119
137
  this.runtime.updateStep(this.currentBddStep, result => {
@@ -134,6 +152,20 @@ export class AllureCodeceptJsReporter extends AllureMochaReporter {
134
152
  }
135
153
  this.metaStepStack = [];
136
154
  this.currentLeafStep = undefined;
155
+ var currentTest = this.currentTest;
156
+ if (currentTest) {
157
+ recorder.add("allure screenshot attachment", () => {
158
+ var _test$artifacts;
159
+ if (!(test !== null && test !== void 0 && (_test$artifacts = test.artifacts) !== null && _test$artifacts !== void 0 && _test$artifacts.screenshot)) {
160
+ return;
161
+ }
162
+ var screenshotPath = test.artifacts.screenshot;
163
+ this.runtime.writeAttachment(currentTest, null, basename(screenshotPath), screenshotPath, {
164
+ contentType: ContentType.PNG,
165
+ wrapInStep: true
166
+ });
167
+ }, true);
168
+ }
137
169
  }
138
170
  stepStarted(step) {
139
171
  var _this$currentHook, _this$metaStepStack$i2, _this$metaStepStack2;
@@ -1 +1 @@
1
- {"version":3,"file":"reporter.js","names":["LabelName","Stage","Status","getMessageAndTraceFromError","getStatusFromError","isMetadataTag","stripAnsi","AllureMochaReporter","event","recorder","MAX_META_STEP_NESTING","TRY_TO_SESSION","knownCodeceptVerificationErrorPatterns","isKnownCodeceptVerificationError","error","message","some","pattern","test","getCodeceptStatusFromError","hookName","status","FAILED","BROKEN","isErrorInstance","value","_constructor","Error","constructor","name","isTryToSession","_recorder$getCurrentS","getCurrentSessionId","call","getRecorderPromise","_recorder$promise","promise","AllureCodeceptJsReporter","runner","opts","isInWorker","_defineProperty","undefined","registerEvents","on","mochaTestFailed","bind","dispatcher","before","testStarted","failed","testFailed","finished","testFinished","step","started","stepStarted","passed","stepPassed","stepFailed","comment","stepComment","bddStep","bddStepStarted","after","currentTest","currentTestHookName","tags","extraTagLabels","filter","tag","map","startsWith","substring","trim","length","TAG","runtime","updateTest","tr","labels","push","_","statusDetails","result","_objectSpread","currentBddStep","stopCurrentStep","stage","FINISHED","id","metaStepStack","updateStep","stopStep","PASSED","currentLeafStep","_this$currentHook","_this$metaStepStack$i2","_this$metaStepStack2","root","currentHook","stepPath","current","metaStep","isBDD","_current$toString","unshift","toString","index","Math","min","i","s","slice","_this$metaStepStack$i","_this$metaStepStack","parentId","startStep","parent","_this$currentHook2","keyword","text","inspect","catch","err","Promise","reject","updateFunc","_this$currentHook3","currentStep","stopStepById"],"sources":["../../src/reporter.ts"],"sourcesContent":["import { LabelName, Stage, Status, type StepResult } from \"allure-js-commons\";\nimport { getMessageAndTraceFromError, getStatusFromError, isMetadataTag, stripAnsi } from \"allure-js-commons/sdk\";\nimport AllureMochaReporter from \"allure-mocha\";\nimport { event, recorder } from \"codeceptjs\";\nimport type * as Mocha from \"mocha\";\n\nimport type { CodeceptBddStep, CodeceptError, CodeceptStep } from \"./model.js\";\n\ninterface MetaStep {\n name: string;\n id: string;\n}\n\nconst MAX_META_STEP_NESTING = 10;\n// CodeceptJS tryTo() uses a dedicated \"tryTo\" recorder session.\n// Docs: https://codecept.io/effects.html\nconst TRY_TO_SESSION = \"tryTo\";\n\nconst knownCodeceptVerificationErrorPatterns = [\n /^Element \".+\" is (?:not visible on page|still visible on page|not seen in DOM|still seen in DOM)\\.?$/i,\n /^(?:Element|Clickable element|Context element|Frame|Option \".+\" in|Custom locator .+) .*\\b(?:not found|was not found)\\b/i,\n /^element \\(.+\\) .+ after \\d+(?:\\.\\d+)? sec(?:\\n|\\.|$)/i,\n /^Text \".+\" was not found on page after \\d+(?:\\.\\d+)? sec\\.?$/i,\n /^Expected \\d+ tabs are not met after \\d+(?:\\.\\d+)? sec\\.?$/i,\n /^Cookie .+ is not found after \\d+(?:\\.\\d+)?s$/i,\n] as const;\n\nconst isKnownCodeceptVerificationError = (error: Partial<Error>): boolean => {\n const message = error.message ? stripAnsi(error.message) : \"\";\n\n if (!message) {\n return false;\n }\n\n return knownCodeceptVerificationErrorPatterns.some((pattern) => pattern.test(message));\n};\n\nconst getCodeceptStatusFromError = (error: Partial<Error>, hookName?: string): Status => {\n const status = getStatusFromError(error);\n\n if (status === Status.FAILED || hookName) {\n return status;\n }\n\n return isKnownCodeceptVerificationError(error) ? Status.FAILED : Status.BROKEN;\n};\n\nconst isErrorInstance = (value: unknown): value is Error =>\n value instanceof Error ||\n (typeof value === \"object\" &&\n value !== null &&\n (value as { constructor?: { name?: unknown } }).constructor?.name === \"Error\");\n\nconst isTryToSession = () => recorder.getCurrentSessionId?.() === TRY_TO_SESSION;\nconst getRecorderPromise = (): Promise<unknown> | undefined =>\n (recorder.promise as (() => Promise<unknown> | undefined) | undefined)?.();\n\nexport class AllureCodeceptJsReporter extends AllureMochaReporter {\n protected currentBddStep?: string;\n protected metaStepStack: MetaStep[] = [];\n protected currentLeafStep?: string;\n protected currentTestHookName?: string;\n\n constructor(runner: Mocha.Runner, opts: Mocha.MochaOptions, isInWorker: boolean) {\n super(runner, opts, isInWorker);\n this.registerEvents();\n runner.on(\"fail\", this.mochaTestFailed.bind(this));\n }\n\n registerEvents() {\n // Test\n event.dispatcher.on(event.test.before, this.testStarted.bind(this));\n event.dispatcher.on(event.test.failed, this.testFailed.bind(this));\n event.dispatcher.on(event.test.finished, this.testFinished.bind(this));\n // Step\n event.dispatcher.on(event.step.started, this.stepStarted.bind(this));\n event.dispatcher.on(event.step.passed, this.stepPassed.bind(this));\n event.dispatcher.on(event.step.failed, this.stepFailed.bind(this));\n event.dispatcher.on(event.step.comment, this.stepComment.bind(this));\n\n event.dispatcher.on(event.bddStep.before, this.bddStepStarted.bind(this));\n event.dispatcher.on(event.bddStep.after, this.stepPassed.bind(this));\n }\n\n testStarted(test: { tags?: string[] }) {\n if (!this.currentTest) {\n return;\n }\n\n this.currentTestHookName = undefined;\n\n const tags = test.tags || [];\n const extraTagLabels = tags\n .filter((tag) => tag && !isMetadataTag(tag))\n .map((tag) => (tag.startsWith(\"@\") ? tag.substring(1) : tag))\n .map((tag) => tag.trim())\n .filter((tag) => tag.length > 0)\n .map((tag) => ({ name: LabelName.TAG, value: tag }));\n\n this.runtime.updateTest(this.currentTest, (tr) => {\n tr.labels.push(...extraTagLabels);\n });\n }\n\n testFailed(_: {}, error: Error, hookName?: string) {\n this.currentTestHookName = hookName;\n const status = getCodeceptStatusFromError(error, hookName);\n const statusDetails = getMessageAndTraceFromError(error);\n\n if (this.currentTest) {\n this.runtime.updateTest(this.currentTest, (result) => {\n result.status = status;\n result.statusDetails = {\n ...result.statusDetails,\n ...statusDetails,\n };\n });\n }\n\n if (this.currentBddStep) {\n this.stopCurrentStep((result) => {\n result.stage = Stage.FINISHED;\n result.status = Status.BROKEN;\n if (error) {\n result.status = status;\n result.statusDetails = { ...statusDetails };\n }\n });\n }\n this.currentBddStep = undefined;\n\n for (const { id } of this.metaStepStack) {\n this.runtime.updateStep(id, (result) => {\n result.stage = Stage.FINISHED;\n result.status = Status.BROKEN;\n if (error) {\n result.status = status;\n result.statusDetails = { ...statusDetails };\n }\n });\n this.runtime.stopStep(id);\n }\n this.metaStepStack = [];\n }\n\n testFinished() {\n this.currentTestHookName = undefined;\n if (this.currentBddStep) {\n this.runtime.updateStep(this.currentBddStep, (result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(this.currentBddStep);\n }\n this.currentBddStep = undefined;\n\n for (const { id } of this.metaStepStack) {\n this.runtime.updateStep(id, (result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(id);\n }\n\n this.metaStepStack = [];\n this.currentLeafStep = undefined;\n }\n\n stepStarted(step: CodeceptStep) {\n const root = this.currentHook ?? this.currentTest;\n if (!root) {\n return;\n }\n\n const stepPath: string[] = [];\n let current = step.metaStep;\n while (current && !current.isBDD() && stepPath.length < MAX_META_STEP_NESTING) {\n stepPath.unshift(stripAnsi(current.toString() ?? \"\").trim());\n current = current.metaStep;\n }\n\n let index = 0;\n while (\n index < Math.min(this.metaStepStack.length, stepPath.length) &&\n this.metaStepStack[index].name === stepPath[index]\n ) {\n index++;\n }\n\n for (let i = this.metaStepStack.length - 1; i >= index; i--) {\n const { id } = this.metaStepStack[i];\n this.runtime.updateStep(id, (s) => {\n s.status = Status.PASSED;\n s.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(id);\n }\n this.metaStepStack = this.metaStepStack.slice(0, index);\n\n for (let i = index; i < stepPath.length; i++) {\n const name = stepPath[i];\n const parentId = this.metaStepStack[i - 1]?.id ?? root;\n const id = this.runtime.startStep(parentId, undefined, {\n name,\n });\n if (id) {\n this.metaStepStack.push({ name, id });\n }\n }\n\n const parent = this.metaStepStack[this.metaStepStack.length - 1]?.id ?? root;\n this.currentLeafStep = this.runtime.startStep(parent, undefined, {\n name: step.toString().trim(),\n });\n }\n\n bddStepStarted(step: CodeceptBddStep) {\n const root = this.currentHook ?? this.currentTest;\n if (!root) {\n return;\n }\n if (this.currentBddStep) {\n this.runtime.updateStep(this.currentBddStep, (result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(this.currentBddStep);\n }\n this.currentBddStep = this.runtime.startStep(root, undefined, {\n name: step.keyword + step.text,\n });\n }\n\n // Step errors are usually reported directly, but some paths still require\n // reading the recorder rejection to populate the final step status/details.\n stepFailed(_: CodeceptJS.Step, error?: CodeceptError) {\n if (!this.currentLeafStep) {\n return;\n }\n\n const currentLeafStep = this.currentLeafStep;\n\n this.runtime.updateStep(currentLeafStep, (result) => {\n result.stage = Stage.FINISHED;\n if (error) {\n if (!error.message && typeof error.inspect === \"function\") {\n error.message = error.inspect();\n }\n result.status = isTryToSession() ? Status.BROKEN : getCodeceptStatusFromError(error as unknown as Error);\n result.statusDetails = getMessageAndTraceFromError(error as unknown as Error);\n } else {\n const promise = getRecorderPromise();\n if (promise) {\n promise.catch((err) => {\n if (!err.message && typeof err.inspect === \"function\") {\n err.message = err.inspect();\n }\n if (isErrorInstance(err)) {\n this.runtime.updateStep(currentLeafStep, (step) => {\n step.status = isTryToSession() ? Status.BROKEN : getCodeceptStatusFromError(err as Error);\n step.statusDetails = getMessageAndTraceFromError(err as Error);\n });\n }\n return Promise.reject(err);\n });\n }\n\n result.status = Status.BROKEN;\n }\n });\n this.runtime.stopStep(currentLeafStep);\n this.currentLeafStep = undefined;\n }\n\n stepComment() {\n this.stopCurrentStep((result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n }\n\n stepPassed() {\n if (this.currentBddStep && !this.currentLeafStep) {\n this.runtime.updateStep(this.currentBddStep, (result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(this.currentBddStep);\n this.currentBddStep = undefined;\n return;\n }\n\n if (!this.currentLeafStep) {\n return;\n }\n\n this.runtime.updateStep(this.currentLeafStep, (result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(this.currentLeafStep);\n this.currentLeafStep = undefined;\n }\n\n stopCurrentStep(updateFunc: (result: StepResult) => void) {\n const root = this.currentHook ?? this.currentTest;\n const currentStep = root ? this.runtime.currentStep(root) : undefined;\n\n this.stopStepById(currentStep, updateFunc);\n }\n\n stopStepById(currentStep: string | undefined, updateFunc: (result: StepResult) => void) {\n if (!currentStep) {\n return;\n }\n const promise = getRecorderPromise();\n if (promise) {\n promise.catch((err) => {\n if (!err.message && typeof err.inspect === \"function\") {\n // AssertionFailedError doesn't set message attribute\n err.message = err.inspect();\n }\n if (isErrorInstance(err)) {\n this.runtime.updateStep(currentStep, (step) => {\n step.status = isTryToSession() ? Status.BROKEN : getCodeceptStatusFromError(err as Error);\n step.statusDetails = { ...step.statusDetails, ...getMessageAndTraceFromError(err as Error) };\n });\n }\n return Promise.reject(err);\n });\n }\n\n this.runtime.updateStep(currentStep, updateFunc);\n this.runtime.stopStep(currentStep);\n }\n\n mochaTestFailed(_: Mocha.Test, error: Error) {\n if (!this.currentTest) {\n return;\n }\n\n this.runtime.updateTest(this.currentTest, (result) => {\n result.status = getCodeceptStatusFromError(error, this.currentTestHookName);\n result.statusDetails = {\n ...result.statusDetails,\n ...getMessageAndTraceFromError(error),\n };\n });\n }\n\n protected getFrameworkName = () => \"codeceptjs\";\n\n protected getWorkerId = () => undefined;\n}\n"],"mappings":";;;;;AAAA,SAASA,SAAS,EAAEC,KAAK,EAAEC,MAAM,QAAyB,mBAAmB;AAC7E,SAASC,2BAA2B,EAAEC,kBAAkB,EAAEC,aAAa,EAAEC,SAAS,QAAQ,uBAAuB;AACjH,OAAOC,mBAAmB,MAAM,cAAc;AAC9C,SAASC,KAAK,EAAEC,QAAQ,QAAQ,YAAY;AAU5C,IAAMC,qBAAqB,GAAG,EAAE;AAChC;AACA;AACA,IAAMC,cAAc,GAAG,OAAO;AAE9B,IAAMC,sCAAsC,GAAG,CAC7C,uGAAuG,EACvG,0HAA0H,EAC1H,wDAAwD,EACxD,+DAA+D,EAC/D,6DAA6D,EAC7D,gDAAgD,CACxC;AAEV,IAAMC,gCAAgC,GAAIC,KAAqB,IAAc;EAC3E,IAAMC,OAAO,GAAGD,KAAK,CAACC,OAAO,GAAGT,SAAS,CAACQ,KAAK,CAACC,OAAO,CAAC,GAAG,EAAE;EAE7D,IAAI,CAACA,OAAO,EAAE;IACZ,OAAO,KAAK;EACd;EAEA,OAAOH,sCAAsC,CAACI,IAAI,CAAEC,OAAO,IAAKA,OAAO,CAACC,IAAI,CAACH,OAAO,CAAC,CAAC;AACxF,CAAC;AAED,IAAMI,0BAA0B,GAAGA,CAACL,KAAqB,EAAEM,QAAiB,KAAa;EACvF,IAAMC,MAAM,GAAG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I,CAAC/C,OAAO,CAACe,UAAU,CAACqC,WAAW,EAAG3E,IAAI,IAAK;YAC7CA,IAAI,CAACjC,MAAM,GAAGS,cAAc,CAAC,CAAC,GAAG5B,MAAM,CAACqB,MAAM,GAAGJ,0BAA0B,CAACyG,GAAY,CAAC;YACzFtE,IAAI,CAAC6B,aAAa,GAAAE,aAAA,CAAAA,aAAA,KAAQ/B,IAAI,CAAC6B,aAAa,GAAKhF,2BAA2B,CAACyH,GAAY,CAAC,CAAE;UAC9F,CAAC,CAAC;QACJ;QACA,OAAOC,OAAO,CAACC,MAAM,CAACF,GAAG,CAAC;MAC5B,CAAC,CAAC;IACJ;IAEA,IAAI,CAAC/C,OAAO,CAACe,UAAU,CAACqC,WAAW,EAAEF,UAAU,CAAC;IAChD,IAAI,CAAClD,OAAO,CAACgB,QAAQ,CAACoC,WAAW,CAAC;EACpC;EAEApF,eAAeA,CAACqC,CAAa,EAAEpE,KAAY,EAAE;IAC3C,IAAI,CAAC,IAAI,CAACmD,WAAW,EAAE;MACrB;IACF;IAEA,IAAI,CAACY,OAAO,CAACC,UAAU,CAAC,IAAI,CAACb,WAAW,EAAGmB,MAAM,IAAK;MACpDA,MAAM,CAAC/D,MAAM,GAAGF,0BAA0B,CAACL,KAAK,EAAE,IAAI,CAACoD,mBAAmB,CAAC;MAC3EkB,MAAM,CAACD,aAAa,GAAAE,aAAA,CAAAA,aAAA,KACfD,MAAM,CAACD,aAAa,GACpBhF,2BAA2B,CAACW,KAAK,CAAC,CACtC;IACH,CAAC,CAAC;EACJ;AAKF","ignoreList":[]}
1
+ {"version":3,"file":"reporter.js","names":["basename","ContentType","LabelName","Stage","Status","getMessageAndTraceFromError","getStatusFromError","isMetadataTag","stripAnsi","AllureMochaReporter","event","recorder","MAX_META_STEP_NESTING","TRY_TO_SESSION","knownCodeceptVerificationErrorPatterns","isKnownCodeceptVerificationError","error","message","some","pattern","test","getCodeceptStatusFromError","hookName","status","FAILED","BROKEN","isBeforeHook","isErrorInstance","value","_constructor","Error","constructor","name","isTryToSession","_recorder$getCurrentS","getCurrentSessionId","call","getRecorderPromise","_recorder$promise","promise","AllureCodeceptJsReporter","runner","opts","isInWorker","_defineProperty","undefined","registerEvents","on","mochaTestFailed","bind","dispatcher","before","testStarted","failed","testFailed","finished","testFinished","step","started","stepStarted","passed","stepPassed","stepFailed","comment","stepComment","bddStep","bddStepStarted","after","currentTest","currentTestHookName","tags","extraTagLabels","filter","tag","map","startsWith","substring","trim","length","TAG","runtime","updateTest","tr","labels","push","shouldFinishTest","onTest","statusDetails","result","_objectSpread","currentBddStep","stopCurrentStep","stage","FINISHED","id","metaStepStack","updateStep","stopStep","currentHook","updateFixture","stopFixture","onTestEnd","PASSED","currentLeafStep","add","_test$artifacts","artifacts","screenshot","screenshotPath","writeAttachment","contentType","PNG","wrapInStep","_this$currentHook","_this$metaStepStack$i2","_this$metaStepStack2","root","stepPath","current","metaStep","isBDD","_current$toString","unshift","toString","index","Math","min","i","s","slice","_this$metaStepStack$i","_this$metaStepStack","parentId","startStep","parent","_this$currentHook2","keyword","text","_","inspect","catch","err","Promise","reject","updateFunc","_this$currentHook3","currentStep","stopStepById"],"sources":["../../src/reporter.ts"],"sourcesContent":["import { basename } from \"node:path\";\n\nimport { ContentType, LabelName, Stage, Status, type StepResult } from \"allure-js-commons\";\nimport { getMessageAndTraceFromError, getStatusFromError, isMetadataTag, stripAnsi } from \"allure-js-commons/sdk\";\nimport AllureMochaReporter from \"allure-mocha\";\nimport { event, recorder } from \"codeceptjs\";\nimport type * as Mocha from \"mocha\";\n\nimport type { CodeceptBddStep, CodeceptError, CodeceptStep } from \"./model.js\";\n\ninterface MetaStep {\n name: string;\n id: string;\n}\n\ninterface CodeceptTestWithArtifacts {\n artifacts?: {\n screenshot?: string;\n };\n}\n\nconst MAX_META_STEP_NESTING = 10;\n// CodeceptJS tryTo() uses a dedicated \"tryTo\" recorder session.\n// Docs: https://codecept.io/effects.html\nconst TRY_TO_SESSION = \"tryTo\";\n\nconst knownCodeceptVerificationErrorPatterns = [\n /^Element \".+\" is (?:not visible on page|still visible on page|not seen in DOM|still seen in DOM)\\.?$/i,\n /^(?:Element|Clickable element|Context element|Frame|Option \".+\" in|Custom locator .+) .*\\b(?:not found|was not found)\\b/i,\n /^element \\(.+\\) .+ after \\d+(?:\\.\\d+)? sec(?:\\n|\\.|$)/i,\n /^Text \".+\" was not found on page after \\d+(?:\\.\\d+)? sec\\.?$/i,\n /^Expected \\d+ tabs are not met after \\d+(?:\\.\\d+)? sec\\.?$/i,\n /^Cookie .+ is not found after \\d+(?:\\.\\d+)?s$/i,\n] as const;\n\nconst isKnownCodeceptVerificationError = (error: Partial<Error>): boolean => {\n const message = error.message ? stripAnsi(error.message) : \"\";\n\n if (!message) {\n return false;\n }\n\n return knownCodeceptVerificationErrorPatterns.some((pattern) => pattern.test(message));\n};\n\nconst getCodeceptStatusFromError = (error: Partial<Error>, hookName?: string): Status => {\n const status = getStatusFromError(error);\n\n if (status === Status.FAILED || hookName) {\n return status;\n }\n\n return isKnownCodeceptVerificationError(error) ? Status.FAILED : Status.BROKEN;\n};\n\nconst isBeforeHook = (hookName?: string) => hookName === \"Before\" || hookName === \"BeforeSuite\";\n\nconst isErrorInstance = (value: unknown): value is Error =>\n value instanceof Error ||\n (typeof value === \"object\" &&\n value !== null &&\n (value as { constructor?: { name?: unknown } }).constructor?.name === \"Error\");\n\nconst isTryToSession = () => recorder.getCurrentSessionId?.() === TRY_TO_SESSION;\nconst getRecorderPromise = (): Promise<unknown> | undefined =>\n (recorder.promise as (() => Promise<unknown> | undefined) | undefined)?.();\n\nexport class AllureCodeceptJsReporter extends AllureMochaReporter {\n protected currentBddStep?: string;\n protected metaStepStack: MetaStep[] = [];\n protected currentLeafStep?: string;\n protected currentTestHookName?: string;\n\n constructor(runner: Mocha.Runner, opts: Mocha.MochaOptions, isInWorker: boolean) {\n super(runner, opts, isInWorker);\n this.registerEvents();\n runner.on(\"fail\", this.mochaTestFailed.bind(this));\n }\n\n registerEvents() {\n // Test\n event.dispatcher.on(event.test.before, this.testStarted.bind(this));\n event.dispatcher.on(event.test.failed, this.testFailed.bind(this));\n event.dispatcher.on(event.test.finished, this.testFinished.bind(this));\n // Step\n event.dispatcher.on(event.step.started, this.stepStarted.bind(this));\n event.dispatcher.on(event.step.passed, this.stepPassed.bind(this));\n event.dispatcher.on(event.step.failed, this.stepFailed.bind(this));\n event.dispatcher.on(event.step.comment, this.stepComment.bind(this));\n\n event.dispatcher.on(event.bddStep.before, this.bddStepStarted.bind(this));\n event.dispatcher.on(event.bddStep.after, this.stepPassed.bind(this));\n }\n\n testStarted(test: { tags?: string[] }) {\n if (!this.currentTest) {\n return;\n }\n\n this.currentTestHookName = undefined;\n\n const tags = test.tags || [];\n const extraTagLabels = tags\n .filter((tag) => tag && !isMetadataTag(tag))\n .map((tag) => (tag.startsWith(\"@\") ? tag.substring(1) : tag))\n .map((tag) => tag.trim())\n .filter((tag) => tag.length > 0)\n .map((tag) => ({ name: LabelName.TAG, value: tag }));\n\n this.runtime.updateTest(this.currentTest, (tr) => {\n tr.labels.push(...extraTagLabels);\n });\n }\n\n testFailed(test: Mocha.Test, error: Error, hookName?: string) {\n this.currentTestHookName = hookName;\n const shouldFinishTest = isBeforeHook(hookName);\n\n if (!this.currentTest && shouldFinishTest) {\n this.onTest(test);\n }\n\n const status = getCodeceptStatusFromError(error, hookName);\n const statusDetails = getMessageAndTraceFromError(error);\n\n if (this.currentTest) {\n this.runtime.updateTest(this.currentTest, (result) => {\n result.status = status;\n result.statusDetails = {\n ...result.statusDetails,\n ...statusDetails,\n };\n });\n }\n\n if (this.currentBddStep) {\n this.stopCurrentStep((result) => {\n result.stage = Stage.FINISHED;\n result.status = Status.BROKEN;\n if (error) {\n result.status = status;\n result.statusDetails = { ...statusDetails };\n }\n });\n }\n this.currentBddStep = undefined;\n\n for (const { id } of this.metaStepStack) {\n this.runtime.updateStep(id, (result) => {\n result.stage = Stage.FINISHED;\n result.status = Status.BROKEN;\n if (error) {\n result.status = status;\n result.statusDetails = { ...statusDetails };\n }\n });\n this.runtime.stopStep(id);\n }\n this.metaStepStack = [];\n\n if (shouldFinishTest) {\n if (this.currentHook) {\n this.runtime.updateFixture(this.currentHook, (result) => {\n result.status = status;\n result.statusDetails = {\n ...result.statusDetails,\n ...statusDetails,\n };\n });\n this.runtime.stopFixture(this.currentHook);\n this.currentHook = undefined;\n }\n\n this.onTestEnd(test);\n this.currentTestHookName = undefined;\n }\n }\n\n testFinished(test?: CodeceptTestWithArtifacts) {\n this.currentTestHookName = undefined;\n if (this.currentBddStep) {\n this.runtime.updateStep(this.currentBddStep, (result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(this.currentBddStep);\n }\n this.currentBddStep = undefined;\n\n for (const { id } of this.metaStepStack) {\n this.runtime.updateStep(id, (result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(id);\n }\n\n this.metaStepStack = [];\n this.currentLeafStep = undefined;\n\n const currentTest = this.currentTest;\n if (currentTest) {\n recorder.add(\n \"allure screenshot attachment\",\n () => {\n if (!test?.artifacts?.screenshot) {\n return;\n }\n const screenshotPath = test.artifacts.screenshot;\n\n this.runtime.writeAttachment(currentTest, null, basename(screenshotPath), screenshotPath, {\n contentType: ContentType.PNG,\n wrapInStep: true,\n });\n },\n true,\n );\n }\n }\n\n stepStarted(step: CodeceptStep) {\n const root = this.currentHook ?? this.currentTest;\n if (!root) {\n return;\n }\n\n const stepPath: string[] = [];\n let current = step.metaStep;\n while (current && !current.isBDD() && stepPath.length < MAX_META_STEP_NESTING) {\n stepPath.unshift(stripAnsi(current.toString() ?? \"\").trim());\n current = current.metaStep;\n }\n\n let index = 0;\n while (\n index < Math.min(this.metaStepStack.length, stepPath.length) &&\n this.metaStepStack[index].name === stepPath[index]\n ) {\n index++;\n }\n\n for (let i = this.metaStepStack.length - 1; i >= index; i--) {\n const { id } = this.metaStepStack[i];\n this.runtime.updateStep(id, (s) => {\n s.status = Status.PASSED;\n s.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(id);\n }\n this.metaStepStack = this.metaStepStack.slice(0, index);\n\n for (let i = index; i < stepPath.length; i++) {\n const name = stepPath[i];\n const parentId = this.metaStepStack[i - 1]?.id ?? root;\n const id = this.runtime.startStep(parentId, undefined, {\n name,\n });\n if (id) {\n this.metaStepStack.push({ name, id });\n }\n }\n\n const parent = this.metaStepStack[this.metaStepStack.length - 1]?.id ?? root;\n this.currentLeafStep = this.runtime.startStep(parent, undefined, {\n name: step.toString().trim(),\n });\n }\n\n bddStepStarted(step: CodeceptBddStep) {\n const root = this.currentHook ?? this.currentTest;\n if (!root) {\n return;\n }\n if (this.currentBddStep) {\n this.runtime.updateStep(this.currentBddStep, (result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(this.currentBddStep);\n }\n this.currentBddStep = this.runtime.startStep(root, undefined, {\n name: step.keyword + step.text,\n });\n }\n\n // Step errors are usually reported directly, but some paths still require\n // reading the recorder rejection to populate the final step status/details.\n stepFailed(_: CodeceptJS.Step, error?: CodeceptError) {\n if (!this.currentLeafStep) {\n return;\n }\n\n const currentLeafStep = this.currentLeafStep;\n\n this.runtime.updateStep(currentLeafStep, (result) => {\n result.stage = Stage.FINISHED;\n if (error) {\n if (!error.message && typeof error.inspect === \"function\") {\n error.message = error.inspect();\n }\n result.status = isTryToSession() ? Status.BROKEN : getCodeceptStatusFromError(error as unknown as Error);\n result.statusDetails = getMessageAndTraceFromError(error as unknown as Error);\n } else {\n const promise = getRecorderPromise();\n if (promise) {\n promise.catch((err) => {\n if (!err.message && typeof err.inspect === \"function\") {\n err.message = err.inspect();\n }\n if (isErrorInstance(err)) {\n this.runtime.updateStep(currentLeafStep, (step) => {\n step.status = isTryToSession() ? Status.BROKEN : getCodeceptStatusFromError(err as Error);\n step.statusDetails = getMessageAndTraceFromError(err as Error);\n });\n }\n return Promise.reject(err);\n });\n }\n\n result.status = Status.BROKEN;\n }\n });\n this.runtime.stopStep(currentLeafStep);\n this.currentLeafStep = undefined;\n }\n\n stepComment() {\n this.stopCurrentStep((result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n }\n\n stepPassed() {\n if (this.currentBddStep && !this.currentLeafStep) {\n this.runtime.updateStep(this.currentBddStep, (result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(this.currentBddStep);\n this.currentBddStep = undefined;\n return;\n }\n\n if (!this.currentLeafStep) {\n return;\n }\n\n this.runtime.updateStep(this.currentLeafStep, (result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(this.currentLeafStep);\n this.currentLeafStep = undefined;\n }\n\n stopCurrentStep(updateFunc: (result: StepResult) => void) {\n const root = this.currentHook ?? this.currentTest;\n const currentStep = root ? this.runtime.currentStep(root) : undefined;\n\n this.stopStepById(currentStep, updateFunc);\n }\n\n stopStepById(currentStep: string | undefined, updateFunc: (result: StepResult) => void) {\n if (!currentStep) {\n return;\n }\n const promise = getRecorderPromise();\n if (promise) {\n promise.catch((err) => {\n if (!err.message && typeof err.inspect === \"function\") {\n // AssertionFailedError doesn't set message attribute\n err.message = err.inspect();\n }\n if (isErrorInstance(err)) {\n this.runtime.updateStep(currentStep, (step) => {\n step.status = isTryToSession() ? Status.BROKEN : getCodeceptStatusFromError(err as Error);\n step.statusDetails = { ...step.statusDetails, ...getMessageAndTraceFromError(err as Error) };\n });\n }\n return Promise.reject(err);\n });\n }\n\n this.runtime.updateStep(currentStep, updateFunc);\n this.runtime.stopStep(currentStep);\n }\n\n mochaTestFailed(_: Mocha.Test, error: Error) {\n if (!this.currentTest) {\n return;\n }\n\n this.runtime.updateTest(this.currentTest, (result) => {\n result.status = getCodeceptStatusFromError(error, this.currentTestHookName);\n result.statusDetails = {\n ...result.statusDetails,\n ...getMessageAndTraceFromError(error),\n };\n });\n }\n\n protected getFrameworkName = () => \"codecept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,CAAC8B,aAAa,GAAAE,aAAA,CAAAA,aAAA,KAAQhC,IAAI,CAAC8B,aAAa,GAAKlF,2BAA2B,CAACwI,GAAY,CAAC,CAAE;UAC9F,CAAC,CAAC;QACJ;QACA,OAAOC,OAAO,CAACC,MAAM,CAACF,GAAG,CAAC;MAC5B,CAAC,CAAC;IACJ;IAEA,IAAI,CAAC7D,OAAO,CAACgB,UAAU,CAACkD,WAAW,EAAEF,UAAU,CAAC;IAChD,IAAI,CAAChE,OAAO,CAACiB,QAAQ,CAACiD,WAAW,CAAC;EACpC;EAEAlG,eAAeA,CAAC0F,CAAa,EAAE1H,KAAY,EAAE;IAC3C,IAAI,CAAC,IAAI,CAACoD,WAAW,EAAE;MACrB;IACF;IAEA,IAAI,CAACY,OAAO,CAACC,UAAU,CAAC,IAAI,CAACb,WAAW,EAAGoB,MAAM,IAAK;MACpDA,MAAM,CAACjE,MAAM,GAAGF,0BAA0B,CAACL,KAAK,EAAE,IAAI,CAACqD,mBAAmB,CAAC;MAC3EmB,MAAM,CAACD,aAAa,GAAAE,aAAA,CAAAA,aAAA,KACfD,MAAM,CAACD,aAAa,GACpBlF,2BAA2B,CAACW,KAAK,CAAC,CACtC;IACH,CAAC,CAAC;EACJ;AAKF","ignoreList":[]}
@@ -6,6 +6,11 @@ interface MetaStep {
6
6
  name: string;
7
7
  id: string;
8
8
  }
9
+ interface CodeceptTestWithArtifacts {
10
+ artifacts?: {
11
+ screenshot?: string;
12
+ };
13
+ }
9
14
  export declare class AllureCodeceptJsReporter extends AllureMochaReporter {
10
15
  protected currentBddStep?: string;
11
16
  protected metaStepStack: MetaStep[];
@@ -16,8 +21,8 @@ export declare class AllureCodeceptJsReporter extends AllureMochaReporter {
16
21
  testStarted(test: {
17
22
  tags?: string[];
18
23
  }): void;
19
- testFailed(_: {}, error: Error, hookName?: string): void;
20
- testFinished(): void;
24
+ testFailed(test: Mocha.Test, error: Error, hookName?: string): void;
25
+ testFinished(test?: CodeceptTestWithArtifacts): void;
21
26
  stepStarted(step: CodeceptStep): void;
22
27
  bddStepStarted(step: CodeceptBddStep): void;
23
28
  stepFailed(_: CodeceptJS.Step, error?: CodeceptError): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allure-codeceptjs",
3
- "version": "3.10.2",
3
+ "version": "3.11.1",
4
4
  "description": "Allure codeceptjs integration",
5
5
  "keywords": [
6
6
  "allure",
@@ -46,30 +46,29 @@
46
46
  "test": "vitest run"
47
47
  },
48
48
  "dependencies": {
49
- "allure-js-commons": "3.10.2",
50
- "allure-mocha": "3.10.2"
49
+ "allure-js-commons": "3.11.1",
50
+ "allure-mocha": "3.11.1"
51
51
  },
52
52
  "devDependencies": {
53
- "@babel/cli": "^7.28.0",
53
+ "@babel/cli": "^8.0.1",
54
54
  "@babel/core": "^7.28.0",
55
55
  "@babel/plugin-transform-modules-commonjs": "^7.27.1",
56
56
  "@babel/preset-env": "^7.28.0",
57
57
  "@babel/preset-typescript": "^7.27.1",
58
- "@codeceptjs/configure": "^1.0.0",
59
58
  "@codeceptjs/helper": "^2.0.4",
60
59
  "@types/babel__core": "^7.20.5",
61
60
  "@types/babel__preset-env": "^7.10.0",
62
61
  "@types/jasmine": "^6.0.0",
63
- "@types/node": "^20.19.0",
62
+ "@types/node": "^26.0.1",
64
63
  "allure-commandline": "^2.29.0",
65
- "allure-vitest": "3.10.2",
64
+ "allure-vitest": "3.11.1",
66
65
  "babel-plugin-add-module-exports": "^1.0.4",
67
- "codeceptjs": "^3.7.6-beta.1",
66
+ "codeceptjs": "^4.1.0",
68
67
  "codeceptjs-expect": "^1.0.3",
69
68
  "npm-run-all2": "^9.0.2",
70
69
  "rimraf": "^6.0.0",
71
70
  "typescript": "^6.0.3",
72
- "vitest": "^4.1.0"
71
+ "vitest": "^4.1.10"
73
72
  },
74
73
  "peerDependencies": {
75
74
  "codeceptjs": ">=2.3.6"