allure-codeceptjs 3.14.0 → 3.16.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/README.md +2 -2
- package/dist/cjs/reporter.js +41 -49
- package/dist/cjs/reporter.js.map +1 -1
- package/dist/esm/reporter.js +41 -49
- package/dist/esm/reporter.js.map +1 -1
- package/dist/types/reporter.d.ts +1 -0
- package/package.json +14 -13
package/README.md
CHANGED
|
@@ -34,14 +34,14 @@ npm install -D allure-codeceptjs
|
|
|
34
34
|
|
|
35
35
|
Install Allure Report separately when you want to render the generated `allure-results`:
|
|
36
36
|
|
|
37
|
-
- follow the [Allure Report 2 installation guide](https://allurereport.org/docs/install/) to use the `allure` CLI
|
|
37
|
+
- follow the [Allure Report 2 installation guide](https://allurereport.org/docs/v2/install/) to use the `allure` CLI
|
|
38
38
|
- or install Allure Report 3 with `npm install -D allure` to use `npx allure`
|
|
39
39
|
|
|
40
40
|
## Supported versions and platforms
|
|
41
41
|
|
|
42
42
|
- `codeceptjs >= 2.3.6`
|
|
43
43
|
- Linux, macOS, and Windows wherever CodeceptJS supports Node.js
|
|
44
|
-
- this repository is validated in CI on Node.js
|
|
44
|
+
- this repository is validated in CI on Node.js 24 and 26
|
|
45
45
|
|
|
46
46
|
## Usage
|
|
47
47
|
|
package/dist/cjs/reporter.js
CHANGED
|
@@ -85,7 +85,7 @@ class AllureCodeceptJsReporter extends _allureMocha.default {
|
|
|
85
85
|
_codeceptjs.event.dispatcher.on(_codeceptjs.event.step.failed, this.stepFailed.bind(this));
|
|
86
86
|
_codeceptjs.event.dispatcher.on(_codeceptjs.event.step.comment, this.stepComment.bind(this));
|
|
87
87
|
_codeceptjs.event.dispatcher.on(_codeceptjs.event.bddStep.before, this.bddStepStarted.bind(this));
|
|
88
|
-
_codeceptjs.event.dispatcher.on(_codeceptjs.event.bddStep.after, this.
|
|
88
|
+
_codeceptjs.event.dispatcher.on(_codeceptjs.event.bddStep.after, this.bddStepFinished.bind(this));
|
|
89
89
|
}
|
|
90
90
|
testStarted(test) {
|
|
91
91
|
if (!this.currentTest) {
|
|
@@ -129,8 +129,9 @@ class AllureCodeceptJsReporter extends _allureMocha.default {
|
|
|
129
129
|
result.statusDetails = _objectSpread(_objectSpread({}, result.statusDetails), statusDetails);
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
for (var _ref2 of [...this.metaStepStack].reverse()) {
|
|
133
|
+
var id = _ref2.id;
|
|
134
|
+
this.runtime.updateStep(id, result => {
|
|
134
135
|
result.stage = _allureJsCommons.Stage.FINISHED;
|
|
135
136
|
result.status = _allureJsCommons.Status.BROKEN;
|
|
136
137
|
if (error) {
|
|
@@ -138,12 +139,11 @@ class AllureCodeceptJsReporter extends _allureMocha.default {
|
|
|
138
139
|
result.statusDetails = _objectSpread({}, statusDetails);
|
|
139
140
|
}
|
|
140
141
|
});
|
|
142
|
+
this.runtime.stopStep(id);
|
|
141
143
|
}
|
|
142
|
-
this.
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
} of this.metaStepStack) {
|
|
146
|
-
this.runtime.updateStep(id, result => {
|
|
144
|
+
this.metaStepStack = [];
|
|
145
|
+
if (this.currentBddStep) {
|
|
146
|
+
this.stopStepById(this.currentBddStep, result => {
|
|
147
147
|
result.stage = _allureJsCommons.Stage.FINISHED;
|
|
148
148
|
result.status = _allureJsCommons.Status.BROKEN;
|
|
149
149
|
if (error) {
|
|
@@ -151,9 +151,8 @@ class AllureCodeceptJsReporter extends _allureMocha.default {
|
|
|
151
151
|
result.statusDetails = _objectSpread({}, statusDetails);
|
|
152
152
|
}
|
|
153
153
|
});
|
|
154
|
-
this.runtime.stopStep(id);
|
|
155
154
|
}
|
|
156
|
-
this.
|
|
155
|
+
this.currentBddStep = undefined;
|
|
157
156
|
if (shouldFinishTest) {
|
|
158
157
|
if (this.currentHook) {
|
|
159
158
|
this.runtime.updateFixture(this.currentHook, result => {
|
|
@@ -180,17 +179,9 @@ class AllureCodeceptJsReporter extends _allureMocha.default {
|
|
|
180
179
|
}
|
|
181
180
|
testFinished(test) {
|
|
182
181
|
this.currentTestHookName = undefined;
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
result.stage = _allureJsCommons.Stage.FINISHED;
|
|
187
|
-
});
|
|
188
|
-
this.runtime.stopStep(this.currentBddStep);
|
|
189
|
-
}
|
|
190
|
-
this.currentBddStep = undefined;
|
|
191
|
-
for (var {
|
|
192
|
-
id
|
|
193
|
-
} of this.metaStepStack) {
|
|
182
|
+
this.bddStepFinished();
|
|
183
|
+
for (var _ref4 of this.metaStepStack) {
|
|
184
|
+
var id = _ref4.id;
|
|
194
185
|
this.runtime.updateStep(id, result => {
|
|
195
186
|
result.status = _allureJsCommons.Status.PASSED;
|
|
196
187
|
result.stage = _allureJsCommons.Stage.FINISHED;
|
|
@@ -217,11 +208,9 @@ class AllureCodeceptJsReporter extends _allureMocha.default {
|
|
|
217
208
|
}, true, false);
|
|
218
209
|
return pendingTest;
|
|
219
210
|
}
|
|
220
|
-
queueFailedBeforeEachHookContext(
|
|
221
|
-
var
|
|
222
|
-
|
|
223
|
-
hookName
|
|
224
|
-
} = _ref;
|
|
211
|
+
queueFailedBeforeEachHookContext(_ref5) {
|
|
212
|
+
var uuid = _ref5.uuid,
|
|
213
|
+
hookName = _ref5.hookName;
|
|
225
214
|
// Helper _failed hooks can await I/O before calling the runtime API, so
|
|
226
215
|
// restore the failure context in the recorder before those hooks run.
|
|
227
216
|
_codeceptjs.recorder.add("allure failed before hook context", () => {
|
|
@@ -229,12 +218,10 @@ class AllureCodeceptJsReporter extends _allureMocha.default {
|
|
|
229
218
|
this.currentTestHookName = hookName;
|
|
230
219
|
}, true, false);
|
|
231
220
|
}
|
|
232
|
-
writeFailedBeforeEachHookTest(
|
|
233
|
-
var
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
hookName
|
|
237
|
-
} = _ref2;
|
|
221
|
+
writeFailedBeforeEachHookTest(_ref6) {
|
|
222
|
+
var test = _ref6.test,
|
|
223
|
+
uuid = _ref6.uuid,
|
|
224
|
+
hookName = _ref6.hookName;
|
|
238
225
|
var currentTest = this.currentTest;
|
|
239
226
|
var currentTestHookName = this.currentTestHookName;
|
|
240
227
|
this.currentTest = uuid;
|
|
@@ -281,9 +268,7 @@ class AllureCodeceptJsReporter extends _allureMocha.default {
|
|
|
281
268
|
index++;
|
|
282
269
|
}
|
|
283
270
|
for (var i = this.metaStepStack.length - 1; i >= index; i--) {
|
|
284
|
-
var
|
|
285
|
-
id
|
|
286
|
-
} = this.metaStepStack[i];
|
|
271
|
+
var id = this.metaStepStack[i].id;
|
|
287
272
|
this.runtime.updateStep(id, s => {
|
|
288
273
|
s.status = _allureJsCommons.Status.PASSED;
|
|
289
274
|
s.stage = _allureJsCommons.Stage.FINISHED;
|
|
@@ -316,16 +301,32 @@ class AllureCodeceptJsReporter extends _allureMocha.default {
|
|
|
316
301
|
if (!root) {
|
|
317
302
|
return;
|
|
318
303
|
}
|
|
319
|
-
|
|
320
|
-
|
|
304
|
+
this.bddStepFinished();
|
|
305
|
+
this.currentBddStep = this.runtime.startStep(root, undefined, {
|
|
306
|
+
name: step.keyword + step.text
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
bddStepFinished() {
|
|
310
|
+
if (!this.currentBddStep) {
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
// Page-object meta steps must finish before their owning Gherkin step.
|
|
315
|
+
for (var _ref8 of [...this.metaStepStack].reverse()) {
|
|
316
|
+
var id = _ref8.id;
|
|
317
|
+
this.runtime.updateStep(id, result => {
|
|
321
318
|
result.status = _allureJsCommons.Status.PASSED;
|
|
322
319
|
result.stage = _allureJsCommons.Stage.FINISHED;
|
|
323
320
|
});
|
|
324
|
-
this.runtime.stopStep(
|
|
321
|
+
this.runtime.stopStep(id);
|
|
325
322
|
}
|
|
326
|
-
this.
|
|
327
|
-
|
|
323
|
+
this.metaStepStack = [];
|
|
324
|
+
this.runtime.updateStep(this.currentBddStep, result => {
|
|
325
|
+
result.status = _allureJsCommons.Status.PASSED;
|
|
326
|
+
result.stage = _allureJsCommons.Stage.FINISHED;
|
|
328
327
|
});
|
|
328
|
+
this.runtime.stopStep(this.currentBddStep);
|
|
329
|
+
this.currentBddStep = undefined;
|
|
329
330
|
}
|
|
330
331
|
|
|
331
332
|
// Step errors are usually reported directly, but some paths still require
|
|
@@ -372,15 +373,6 @@ class AllureCodeceptJsReporter extends _allureMocha.default {
|
|
|
372
373
|
});
|
|
373
374
|
}
|
|
374
375
|
stepPassed() {
|
|
375
|
-
if (this.currentBddStep && !this.currentLeafStep) {
|
|
376
|
-
this.runtime.updateStep(this.currentBddStep, result => {
|
|
377
|
-
result.status = _allureJsCommons.Status.PASSED;
|
|
378
|
-
result.stage = _allureJsCommons.Stage.FINISHED;
|
|
379
|
-
});
|
|
380
|
-
this.runtime.stopStep(this.currentBddStep);
|
|
381
|
-
this.currentBddStep = undefined;
|
|
382
|
-
return;
|
|
383
|
-
}
|
|
384
376
|
if (!this.currentLeafStep) {
|
|
385
377
|
return;
|
|
386
378
|
}
|
package/dist/cjs/reporter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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","isBeforeEachHook","isBeforeHook","isErrorInstance","_constructor","Error","constructor","name","isTryToSession","_recorder$getCurrentS","recorder","getCurrentSessionId","getRecorderPromise","_recorder$promise","promise","getScreenshotArtifactPath","artifacts","undefined","screenshot","AllureCodeceptJsReporter","AllureMochaReporter","runner","opts","isInWorker","registerEvents","on","mochaTestFailed","bind","event","dispatcher","before","testStarted","prependListener","failed","beforeHookTestFailed","testFailed","finished","testFinished","hook","hookFinished","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","pendingTest","flushPendingFailedBeforeEachHookTest","uuid","_this$pendingFailedBe","pendingFailedBeforeEachHookTest","shouldFinishTest","onTest","statusDetails","getMessageAndTraceFromError","result","currentBddStep","stopCurrentStep","stage","Stage","FINISHED","id","metaStepStack","updateStep","stopStep","currentHook","updateFixture","stopFixture","queueFailedBeforeEachHookContext","onTestEnd","PASSED","currentLeafStep","attachScreenshot","add","writeFailedBeforeEachHookTest","_ref","_ref2","writeScreenshotAttachment","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?: unknown;\n}\n\ninterface PendingFailedBeforeEachHookTest {\n test: Mocha.Test;\n uuid: string;\n hookName?: 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 isBeforeEachHook = (hookName?: string) => hookName === \"Before\";\nconst isBeforeHook = (hookName?: string) => isBeforeEachHook(hookName) || 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)?.();\nconst getScreenshotArtifactPath = (test?: CodeceptTestWithArtifacts) => {\n const artifacts = test?.artifacts;\n\n if (typeof artifacts !== \"object\" || artifacts === null || !(\"screenshot\" in artifacts)) {\n return undefined;\n }\n\n return typeof artifacts.screenshot === \"string\" ? artifacts.screenshot : undefined;\n};\n\nexport class AllureCodeceptJsReporter extends AllureMochaReporter {\n protected currentBddStep?: string;\n protected metaStepStack: MetaStep[] = [];\n protected currentLeafStep?: string;\n protected currentTestHookName?: string;\n protected pendingFailedBeforeEachHookTest?: PendingFailedBeforeEachHookTest;\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 // A failed CodeceptJS Before hook emits test.failed before the scenario has\n // started in Mocha. Start the Allure test before other failure listeners so\n // their runtime attachments target the test, then defer writing the result\n // until queued failure artifacts, such as screenshots, are available.\n event.dispatcher.prependListener(event.test.failed, this.beforeHookTestFailed.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 event.dispatcher.on(event.hook.finished, this.hookFinished.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 beforeHookTestFailed(test: Mocha.Test, error: Error, hookName?: string) {\n if (isBeforeEachHook(hookName)) {\n const pendingTest = this.flushPendingFailedBeforeEachHookTest();\n\n if (pendingTest && pendingTest.test !== test && this.currentTest === pendingTest.uuid) {\n this.currentTest = undefined;\n this.currentTestHookName = undefined;\n }\n\n this.testFailed(test, error, hookName);\n }\n }\n\n testFailed(test: Mocha.Test, error: Error, hookName?: string) {\n if (isBeforeEachHook(hookName) && this.pendingFailedBeforeEachHookTest?.test === test) {\n return;\n }\n\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 if (isBeforeEachHook(hookName)) {\n if (this.currentTest) {\n this.pendingFailedBeforeEachHookTest = {\n test,\n uuid: this.currentTest,\n hookName,\n };\n this.queueFailedBeforeEachHookContext(this.pendingFailedBeforeEachHookTest);\n }\n } else {\n this.onTestEnd(test);\n this.currentTestHookName = undefined;\n }\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 if (this.currentTest) {\n this.attachScreenshot(this.currentTest, test);\n }\n }\n\n hookFinished() {\n this.flushPendingFailedBeforeEachHookTest();\n }\n\n protected flushPendingFailedBeforeEachHookTest() {\n const pendingTest = this.pendingFailedBeforeEachHookTest;\n\n if (!pendingTest) {\n return undefined;\n }\n\n this.pendingFailedBeforeEachHookTest = undefined;\n\n recorder.add(\n \"allure failed before hook result\",\n () => {\n this.writeFailedBeforeEachHookTest(pendingTest);\n },\n true,\n false,\n );\n\n return pendingTest;\n }\n\n protected queueFailedBeforeEachHookContext({ uuid, hookName }: PendingFailedBeforeEachHookTest) {\n // Helper _failed hooks can await I/O before calling the runtime API, so\n // restore the failure context in the recorder before those hooks run.\n recorder.add(\n \"allure failed before hook context\",\n () => {\n this.currentTest = uuid;\n this.currentTestHookName = hookName;\n },\n true,\n false,\n );\n }\n\n protected writeFailedBeforeEachHookTest({ test, uuid, hookName }: PendingFailedBeforeEachHookTest) {\n const currentTest = this.currentTest;\n const currentTestHookName = this.currentTestHookName;\n\n this.currentTest = uuid;\n this.currentTestHookName = hookName;\n this.writeScreenshotAttachment(uuid, test);\n this.onTestEnd(test);\n\n if (!this.currentTest && currentTest && currentTest !== uuid) {\n this.currentTest = currentTest;\n this.currentTestHookName = currentTestHookName;\n return;\n }\n\n this.currentTestHookName = undefined;\n }\n\n protected attachScreenshot(currentTest: string, test?: CodeceptTestWithArtifacts) {\n recorder.add(\n \"allure screenshot attachment\",\n () => {\n this.writeScreenshotAttachment(currentTest, test);\n },\n true,\n );\n }\n\n protected writeScreenshotAttachment(currentTest: string, test?: CodeceptTestWithArtifacts) {\n const screenshotPath = getScreenshotArtifactPath(test);\n\n if (!screenshotPath) {\n return;\n }\n\n this.runtime.writeAttachment(currentTest, null, basename(screenshotPath), screenshotPath, {\n contentType: ContentType.PNG,\n wrapInStep: true,\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,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,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,CAACzE,OAAO,CAACsB,QAAQ,CAACqD,WAAW,CAAC;EACpC;EAEAhH,eAAeA,CAACwG,CAAa,EAAE9I,KAAY,EAAE;IAC3C,IAAI,CAAC,IAAI,CAAC+D,WAAW,EAAE;MACrB;IACF;IAEA,IAAI,CAACY,OAAO,CAACC,UAAU,CAAC,IAAI,CAACb,WAAW,EAAGyB,MAAM,IAAK;MACpDA,MAAM,CAAChF,MAAM,GAAGF,0BAA0B,CAACN,KAAK,EAAE,IAAI,CAACgE,mBAAmB,CAAC;MAC3EwB,MAAM,CAACF,aAAa,GAAA9G,aAAA,CAAAA,aAAA,KACfgH,MAAM,CAACF,aAAa,GACpB,IAAAC,gCAA2B,EAACvF,KAAK,CAAC,CACtC;IACH,CAAC,CAAC;EACJ;AAKF;AAACwJ,OAAA,CAAAzH,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","isBeforeEachHook","isBeforeHook","isErrorInstance","_constructor","Error","constructor","name","isTryToSession","_recorder$getCurrentS","recorder","getCurrentSessionId","getRecorderPromise","_recorder$promise","promise","getScreenshotArtifactPath","artifacts","undefined","screenshot","AllureCodeceptJsReporter","AllureMochaReporter","runner","opts","isInWorker","registerEvents","on","mochaTestFailed","bind","event","dispatcher","before","testStarted","prependListener","failed","beforeHookTestFailed","testFailed","finished","testFinished","hook","hookFinished","step","started","stepStarted","passed","stepPassed","stepFailed","comment","stepComment","bddStep","bddStepStarted","after","bddStepFinished","currentTest","currentTestHookName","tags","extraTagLabels","tag","isMetadataTag","map","startsWith","substring","trim","LabelName","TAG","runtime","updateTest","tr","labels","pendingTest","flushPendingFailedBeforeEachHookTest","uuid","_this$pendingFailedBe","pendingFailedBeforeEachHookTest","shouldFinishTest","onTest","statusDetails","getMessageAndTraceFromError","result","_ref2","metaStepStack","reverse","id","updateStep","stage","Stage","FINISHED","stopStep","currentBddStep","stopStepById","currentHook","updateFixture","stopFixture","queueFailedBeforeEachHookContext","onTestEnd","_ref4","PASSED","currentLeafStep","attachScreenshot","add","writeFailedBeforeEachHookTest","_ref5","_ref6","writeScreenshotAttachment","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","_ref8","_","inspect","catch","err","Promise","reject","stopCurrentStep","updateFunc","_this$currentHook3","currentStep","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?: unknown;\n}\n\ninterface PendingFailedBeforeEachHookTest {\n test: Mocha.Test;\n uuid: string;\n hookName?: 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 isBeforeEachHook = (hookName?: string) => hookName === \"Before\";\nconst isBeforeHook = (hookName?: string) => isBeforeEachHook(hookName) || 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)?.();\nconst getScreenshotArtifactPath = (test?: CodeceptTestWithArtifacts) => {\n const artifacts = test?.artifacts;\n\n if (typeof artifacts !== \"object\" || artifacts === null || !(\"screenshot\" in artifacts)) {\n return undefined;\n }\n\n return typeof artifacts.screenshot === \"string\" ? artifacts.screenshot : undefined;\n};\n\nexport class AllureCodeceptJsReporter extends AllureMochaReporter {\n protected currentBddStep?: string;\n protected metaStepStack: MetaStep[] = [];\n protected currentLeafStep?: string;\n protected currentTestHookName?: string;\n protected pendingFailedBeforeEachHookTest?: PendingFailedBeforeEachHookTest;\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 // A failed CodeceptJS Before hook emits test.failed before the scenario has\n // started in Mocha. Start the Allure test before other failure listeners so\n // their runtime attachments target the test, then defer writing the result\n // until queued failure artifacts, such as screenshots, are available.\n event.dispatcher.prependListener(event.test.failed, this.beforeHookTestFailed.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 event.dispatcher.on(event.hook.finished, this.hookFinished.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.bddStepFinished.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 beforeHookTestFailed(test: Mocha.Test, error: Error, hookName?: string) {\n if (isBeforeEachHook(hookName)) {\n const pendingTest = this.flushPendingFailedBeforeEachHookTest();\n\n if (pendingTest && pendingTest.test !== test && this.currentTest === pendingTest.uuid) {\n this.currentTest = undefined;\n this.currentTestHookName = undefined;\n }\n\n this.testFailed(test, error, hookName);\n }\n }\n\n testFailed(test: Mocha.Test, error: Error, hookName?: string) {\n if (isBeforeEachHook(hookName) && this.pendingFailedBeforeEachHookTest?.test === test) {\n return;\n }\n\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 for (const { id } of [...this.metaStepStack].reverse()) {\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 (this.currentBddStep) {\n this.stopStepById(this.currentBddStep, (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 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 if (isBeforeEachHook(hookName)) {\n if (this.currentTest) {\n this.pendingFailedBeforeEachHookTest = {\n test,\n uuid: this.currentTest,\n hookName,\n };\n this.queueFailedBeforeEachHookContext(this.pendingFailedBeforeEachHookTest);\n }\n } else {\n this.onTestEnd(test);\n this.currentTestHookName = undefined;\n }\n }\n }\n\n testFinished(test?: CodeceptTestWithArtifacts) {\n this.currentTestHookName = undefined;\n this.bddStepFinished();\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 if (this.currentTest) {\n this.attachScreenshot(this.currentTest, test);\n }\n }\n\n hookFinished() {\n this.flushPendingFailedBeforeEachHookTest();\n }\n\n protected flushPendingFailedBeforeEachHookTest() {\n const pendingTest = this.pendingFailedBeforeEachHookTest;\n\n if (!pendingTest) {\n return undefined;\n }\n\n this.pendingFailedBeforeEachHookTest = undefined;\n\n recorder.add(\n \"allure failed before hook result\",\n () => {\n this.writeFailedBeforeEachHookTest(pendingTest);\n },\n true,\n false,\n );\n\n return pendingTest;\n }\n\n protected queueFailedBeforeEachHookContext({ uuid, hookName }: PendingFailedBeforeEachHookTest) {\n // Helper _failed hooks can await I/O before calling the runtime API, so\n // restore the failure context in the recorder before those hooks run.\n recorder.add(\n \"allure failed before hook context\",\n () => {\n this.currentTest = uuid;\n this.currentTestHookName = hookName;\n },\n true,\n false,\n );\n }\n\n protected writeFailedBeforeEachHookTest({ test, uuid, hookName }: PendingFailedBeforeEachHookTest) {\n const currentTest = this.currentTest;\n const currentTestHookName = this.currentTestHookName;\n\n this.currentTest = uuid;\n this.currentTestHookName = hookName;\n this.writeScreenshotAttachment(uuid, test);\n this.onTestEnd(test);\n\n if (!this.currentTest && currentTest && currentTest !== uuid) {\n this.currentTest = currentTest;\n this.currentTestHookName = currentTestHookName;\n return;\n }\n\n this.currentTestHookName = undefined;\n }\n\n protected attachScreenshot(currentTest: string, test?: CodeceptTestWithArtifacts) {\n recorder.add(\n \"allure screenshot attachment\",\n () => {\n this.writeScreenshotAttachment(currentTest, test);\n },\n true,\n );\n }\n\n protected writeScreenshotAttachment(currentTest: string, test?: CodeceptTestWithArtifacts) {\n const screenshotPath = getScreenshotArtifactPath(test);\n\n if (!screenshotPath) {\n return;\n }\n\n this.runtime.writeAttachment(currentTest, null, basename(screenshotPath), screenshotPath, {\n contentType: ContentType.PNG,\n wrapInStep: true,\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 this.bddStepFinished();\n this.currentBddStep = this.runtime.startStep(root, undefined, {\n name: step.keyword + step.text,\n });\n }\n\n bddStepFinished() {\n if (!this.currentBddStep) {\n return;\n }\n\n // Page-object meta steps must finish before their owning Gherkin step.\n for (const { id } of [...this.metaStepStack].reverse()) {\n this.runtime.updateStep(id, (result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(id);\n }\n this.metaStepStack = [];\n\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 }\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.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,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,WAA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AW,EAAE;MACrB;IACF;IAEA,IAAI,CAACY,OAAO,CAACC,UAAU,CAAC,IAAI,CAACb,WAAW,EAAGyB,MAAM,IAAK;MACpDA,MAAM,CAACjF,MAAM,GAAGF,0BAA0B,CAACN,KAAK,EAAE,IAAI,CAACiE,mBAAmB,CAAC;MAC3EwB,MAAM,CAACF,aAAa,GAAA/G,aAAA,CAAAA,aAAA,KACfiH,MAAM,CAACF,aAAa,GACpB,IAAAC,gCAA2B,EAACxF,KAAK,CAAC,CACtC;IACH,CAAC,CAAC;EACJ;AAKF;AAAC6J,OAAA,CAAA9H,wBAAA,GAAAA,wBAAA","ignoreList":[]}
|
package/dist/esm/reporter.js
CHANGED
|
@@ -78,7 +78,7 @@ export class AllureCodeceptJsReporter extends AllureMochaReporter {
|
|
|
78
78
|
event.dispatcher.on(event.step.failed, this.stepFailed.bind(this));
|
|
79
79
|
event.dispatcher.on(event.step.comment, this.stepComment.bind(this));
|
|
80
80
|
event.dispatcher.on(event.bddStep.before, this.bddStepStarted.bind(this));
|
|
81
|
-
event.dispatcher.on(event.bddStep.after, this.
|
|
81
|
+
event.dispatcher.on(event.bddStep.after, this.bddStepFinished.bind(this));
|
|
82
82
|
}
|
|
83
83
|
testStarted(test) {
|
|
84
84
|
if (!this.currentTest) {
|
|
@@ -122,8 +122,9 @@ export class AllureCodeceptJsReporter extends AllureMochaReporter {
|
|
|
122
122
|
result.statusDetails = _objectSpread(_objectSpread({}, result.statusDetails), statusDetails);
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
for (var _ref2 of [...this.metaStepStack].reverse()) {
|
|
126
|
+
var id = _ref2.id;
|
|
127
|
+
this.runtime.updateStep(id, result => {
|
|
127
128
|
result.stage = Stage.FINISHED;
|
|
128
129
|
result.status = Status.BROKEN;
|
|
129
130
|
if (error) {
|
|
@@ -131,12 +132,11 @@ export class AllureCodeceptJsReporter extends AllureMochaReporter {
|
|
|
131
132
|
result.statusDetails = _objectSpread({}, statusDetails);
|
|
132
133
|
}
|
|
133
134
|
});
|
|
135
|
+
this.runtime.stopStep(id);
|
|
134
136
|
}
|
|
135
|
-
this.
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
} of this.metaStepStack) {
|
|
139
|
-
this.runtime.updateStep(id, result => {
|
|
137
|
+
this.metaStepStack = [];
|
|
138
|
+
if (this.currentBddStep) {
|
|
139
|
+
this.stopStepById(this.currentBddStep, result => {
|
|
140
140
|
result.stage = Stage.FINISHED;
|
|
141
141
|
result.status = Status.BROKEN;
|
|
142
142
|
if (error) {
|
|
@@ -144,9 +144,8 @@ export class AllureCodeceptJsReporter extends AllureMochaReporter {
|
|
|
144
144
|
result.statusDetails = _objectSpread({}, statusDetails);
|
|
145
145
|
}
|
|
146
146
|
});
|
|
147
|
-
this.runtime.stopStep(id);
|
|
148
147
|
}
|
|
149
|
-
this.
|
|
148
|
+
this.currentBddStep = undefined;
|
|
150
149
|
if (shouldFinishTest) {
|
|
151
150
|
if (this.currentHook) {
|
|
152
151
|
this.runtime.updateFixture(this.currentHook, result => {
|
|
@@ -173,17 +172,9 @@ export class AllureCodeceptJsReporter extends AllureMochaReporter {
|
|
|
173
172
|
}
|
|
174
173
|
testFinished(test) {
|
|
175
174
|
this.currentTestHookName = undefined;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
result.stage = Stage.FINISHED;
|
|
180
|
-
});
|
|
181
|
-
this.runtime.stopStep(this.currentBddStep);
|
|
182
|
-
}
|
|
183
|
-
this.currentBddStep = undefined;
|
|
184
|
-
for (var {
|
|
185
|
-
id
|
|
186
|
-
} of this.metaStepStack) {
|
|
175
|
+
this.bddStepFinished();
|
|
176
|
+
for (var _ref4 of this.metaStepStack) {
|
|
177
|
+
var id = _ref4.id;
|
|
187
178
|
this.runtime.updateStep(id, result => {
|
|
188
179
|
result.status = Status.PASSED;
|
|
189
180
|
result.stage = Stage.FINISHED;
|
|
@@ -210,11 +201,9 @@ export class AllureCodeceptJsReporter extends AllureMochaReporter {
|
|
|
210
201
|
}, true, false);
|
|
211
202
|
return pendingTest;
|
|
212
203
|
}
|
|
213
|
-
queueFailedBeforeEachHookContext(
|
|
214
|
-
var
|
|
215
|
-
|
|
216
|
-
hookName
|
|
217
|
-
} = _ref;
|
|
204
|
+
queueFailedBeforeEachHookContext(_ref5) {
|
|
205
|
+
var uuid = _ref5.uuid,
|
|
206
|
+
hookName = _ref5.hookName;
|
|
218
207
|
// Helper _failed hooks can await I/O before calling the runtime API, so
|
|
219
208
|
// restore the failure context in the recorder before those hooks run.
|
|
220
209
|
recorder.add("allure failed before hook context", () => {
|
|
@@ -222,12 +211,10 @@ export class AllureCodeceptJsReporter extends AllureMochaReporter {
|
|
|
222
211
|
this.currentTestHookName = hookName;
|
|
223
212
|
}, true, false);
|
|
224
213
|
}
|
|
225
|
-
writeFailedBeforeEachHookTest(
|
|
226
|
-
var
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
hookName
|
|
230
|
-
} = _ref2;
|
|
214
|
+
writeFailedBeforeEachHookTest(_ref6) {
|
|
215
|
+
var test = _ref6.test,
|
|
216
|
+
uuid = _ref6.uuid,
|
|
217
|
+
hookName = _ref6.hookName;
|
|
231
218
|
var currentTest = this.currentTest;
|
|
232
219
|
var currentTestHookName = this.currentTestHookName;
|
|
233
220
|
this.currentTest = uuid;
|
|
@@ -274,9 +261,7 @@ export class AllureCodeceptJsReporter extends AllureMochaReporter {
|
|
|
274
261
|
index++;
|
|
275
262
|
}
|
|
276
263
|
for (var i = this.metaStepStack.length - 1; i >= index; i--) {
|
|
277
|
-
var
|
|
278
|
-
id
|
|
279
|
-
} = this.metaStepStack[i];
|
|
264
|
+
var id = this.metaStepStack[i].id;
|
|
280
265
|
this.runtime.updateStep(id, s => {
|
|
281
266
|
s.status = Status.PASSED;
|
|
282
267
|
s.stage = Stage.FINISHED;
|
|
@@ -309,16 +294,32 @@ export class AllureCodeceptJsReporter extends AllureMochaReporter {
|
|
|
309
294
|
if (!root) {
|
|
310
295
|
return;
|
|
311
296
|
}
|
|
312
|
-
|
|
313
|
-
|
|
297
|
+
this.bddStepFinished();
|
|
298
|
+
this.currentBddStep = this.runtime.startStep(root, undefined, {
|
|
299
|
+
name: step.keyword + step.text
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
bddStepFinished() {
|
|
303
|
+
if (!this.currentBddStep) {
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// Page-object meta steps must finish before their owning Gherkin step.
|
|
308
|
+
for (var _ref8 of [...this.metaStepStack].reverse()) {
|
|
309
|
+
var id = _ref8.id;
|
|
310
|
+
this.runtime.updateStep(id, result => {
|
|
314
311
|
result.status = Status.PASSED;
|
|
315
312
|
result.stage = Stage.FINISHED;
|
|
316
313
|
});
|
|
317
|
-
this.runtime.stopStep(
|
|
314
|
+
this.runtime.stopStep(id);
|
|
318
315
|
}
|
|
319
|
-
this.
|
|
320
|
-
|
|
316
|
+
this.metaStepStack = [];
|
|
317
|
+
this.runtime.updateStep(this.currentBddStep, result => {
|
|
318
|
+
result.status = Status.PASSED;
|
|
319
|
+
result.stage = Stage.FINISHED;
|
|
321
320
|
});
|
|
321
|
+
this.runtime.stopStep(this.currentBddStep);
|
|
322
|
+
this.currentBddStep = undefined;
|
|
322
323
|
}
|
|
323
324
|
|
|
324
325
|
// Step errors are usually reported directly, but some paths still require
|
|
@@ -365,15 +366,6 @@ export class AllureCodeceptJsReporter extends AllureMochaReporter {
|
|
|
365
366
|
});
|
|
366
367
|
}
|
|
367
368
|
stepPassed() {
|
|
368
|
-
if (this.currentBddStep && !this.currentLeafStep) {
|
|
369
|
-
this.runtime.updateStep(this.currentBddStep, result => {
|
|
370
|
-
result.status = Status.PASSED;
|
|
371
|
-
result.stage = Stage.FINISHED;
|
|
372
|
-
});
|
|
373
|
-
this.runtime.stopStep(this.currentBddStep);
|
|
374
|
-
this.currentBddStep = undefined;
|
|
375
|
-
return;
|
|
376
|
-
}
|
|
377
369
|
if (!this.currentLeafStep) {
|
|
378
370
|
return;
|
|
379
371
|
}
|
package/dist/esm/reporter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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","isBeforeEachHook","isBeforeHook","isErrorInstance","value","_constructor","Error","constructor","name","isTryToSession","_recorder$getCurrentS","getCurrentSessionId","call","getRecorderPromise","_recorder$promise","promise","getScreenshotArtifactPath","artifacts","undefined","screenshot","AllureCodeceptJsReporter","runner","opts","isInWorker","_defineProperty","registerEvents","on","mochaTestFailed","bind","dispatcher","before","testStarted","prependListener","failed","beforeHookTestFailed","testFailed","finished","testFinished","hook","hookFinished","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","pendingTest","flushPendingFailedBeforeEachHookTest","uuid","_this$pendingFailedBe","pendingFailedBeforeEachHookTest","shouldFinishTest","onTest","statusDetails","result","_objectSpread","currentBddStep","stopCurrentStep","stage","FINISHED","id","metaStepStack","updateStep","stopStep","currentHook","updateFixture","stopFixture","queueFailedBeforeEachHookContext","onTestEnd","PASSED","currentLeafStep","attachScreenshot","add","writeFailedBeforeEachHookTest","_ref","_ref2","writeScreenshotAttachment","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?: unknown;\n}\n\ninterface PendingFailedBeforeEachHookTest {\n test: Mocha.Test;\n uuid: string;\n hookName?: 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 isBeforeEachHook = (hookName?: string) => hookName === \"Before\";\nconst isBeforeHook = (hookName?: string) => isBeforeEachHook(hookName) || 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)?.();\nconst getScreenshotArtifactPath = (test?: CodeceptTestWithArtifacts) => {\n const artifacts = test?.artifacts;\n\n if (typeof artifacts !== \"object\" || artifacts === null || !(\"screenshot\" in artifacts)) {\n return undefined;\n }\n\n return typeof artifacts.screenshot === \"string\" ? artifacts.screenshot : undefined;\n};\n\nexport class AllureCodeceptJsReporter extends AllureMochaReporter {\n protected currentBddStep?: string;\n protected metaStepStack: MetaStep[] = [];\n protected currentLeafStep?: string;\n protected currentTestHookName?: string;\n protected pendingFailedBeforeEachHookTest?: PendingFailedBeforeEachHookTest;\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 // A failed CodeceptJS Before hook emits test.failed before the scenario has\n // started in Mocha. Start the Allure test before other failure listeners so\n // their runtime attachments target the test, then defer writing the result\n // until queued failure artifacts, such as screenshots, are available.\n event.dispatcher.prependListener(event.test.failed, this.beforeHookTestFailed.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 event.dispatcher.on(event.hook.finished, this.hookFinished.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 beforeHookTestFailed(test: Mocha.Test, error: Error, hookName?: string) {\n if (isBeforeEachHook(hookName)) {\n const pendingTest = this.flushPendingFailedBeforeEachHookTest();\n\n if (pendingTest && pendingTest.test !== test && this.currentTest === pendingTest.uuid) {\n this.currentTest = undefined;\n this.currentTestHookName = undefined;\n }\n\n this.testFailed(test, error, hookName);\n }\n }\n\n testFailed(test: Mocha.Test, error: Error, hookName?: string) {\n if (isBeforeEachHook(hookName) && this.pendingFailedBeforeEachHookTest?.test === test) {\n return;\n }\n\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 if (isBeforeEachHook(hookName)) {\n if (this.currentTest) {\n this.pendingFailedBeforeEachHookTest = {\n test,\n uuid: this.currentTest,\n hookName,\n };\n this.queueFailedBeforeEachHookContext(this.pendingFailedBeforeEachHookTest);\n }\n } else {\n this.onTestEnd(test);\n this.currentTestHookName = undefined;\n }\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 if (this.currentTest) {\n this.attachScreenshot(this.currentTest, test);\n }\n }\n\n hookFinished() {\n this.flushPendingFailedBeforeEachHookTest();\n }\n\n protected flushPendingFailedBeforeEachHookTest() {\n const pendingTest = this.pendingFailedBeforeEachHookTest;\n\n if (!pendingTest) {\n return undefined;\n }\n\n this.pendingFailedBeforeEachHookTest = undefined;\n\n recorder.add(\n \"allure failed before hook result\",\n () => {\n this.writeFailedBeforeEachHookTest(pendingTest);\n },\n true,\n false,\n );\n\n return pendingTest;\n }\n\n protected queueFailedBeforeEachHookContext({ uuid, hookName }: PendingFailedBeforeEachHookTest) {\n // Helper _failed hooks can await I/O before calling the runtime API, so\n // restore the failure context in the recorder before those hooks run.\n recorder.add(\n \"allure failed before hook context\",\n () => {\n this.currentTest = uuid;\n this.currentTestHookName = hookName;\n },\n true,\n false,\n );\n }\n\n protected writeFailedBeforeEachHookTest({ test, uuid, hookName }: PendingFailedBeforeEachHookTest) {\n const currentTest = this.currentTest;\n const currentTestHookName = this.currentTestHookName;\n\n this.currentTest = uuid;\n this.currentTestHookName = hookName;\n this.writeScreenshotAttachment(uuid, test);\n this.onTestEnd(test);\n\n if (!this.currentTest && currentTest && currentTest !== uuid) {\n this.currentTest = currentTest;\n this.currentTestHookName = currentTestHookName;\n return;\n }\n\n this.currentTestHookName = undefined;\n }\n\n protected attachScreenshot(currentTest: string, test?: CodeceptTestWithArtifacts) {\n recorder.add(\n \"allure screenshot attachment\",\n () => {\n this.writeScreenshotAttachment(currentTest, test);\n },\n true,\n );\n }\n\n protected writeScreenshotAttachment(currentTest: string, test?: CodeceptTestWithArtifacts) {\n const screenshotPath = getScreenshotArtifactPath(test);\n\n if (!screenshotPath) {\n return;\n }\n\n this.runtime.writeAttachment(currentTest, null, basename(screenshotPath), screenshotPath, {\n contentType: ContentType.PNG,\n wrapInStep: true,\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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MAAM,CAAC9E,MAAM,GAAGF,0BAA0B,CAACL,KAAK,EAAE,IAAI,CAAC6D,mBAAmB,CAAC;MAC3EwB,MAAM,CAACD,aAAa,GAAAE,aAAA,CAAAA,aAAA,KACfD,MAAM,CAACD,aAAa,GACpB/F,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","isBeforeEachHook","isBeforeHook","isErrorInstance","value","_constructor","Error","constructor","name","isTryToSession","_recorder$getCurrentS","getCurrentSessionId","call","getRecorderPromise","_recorder$promise","promise","getScreenshotArtifactPath","artifacts","undefined","screenshot","AllureCodeceptJsReporter","runner","opts","isInWorker","_defineProperty","registerEvents","on","mochaTestFailed","bind","dispatcher","before","testStarted","prependListener","failed","beforeHookTestFailed","testFailed","finished","testFinished","hook","hookFinished","step","started","stepStarted","passed","stepPassed","stepFailed","comment","stepComment","bddStep","bddStepStarted","after","bddStepFinished","currentTest","currentTestHookName","tags","extraTagLabels","filter","tag","map","startsWith","substring","trim","length","TAG","runtime","updateTest","tr","labels","push","pendingTest","flushPendingFailedBeforeEachHookTest","uuid","_this$pendingFailedBe","pendingFailedBeforeEachHookTest","shouldFinishTest","onTest","statusDetails","result","_objectSpread","_ref2","metaStepStack","reverse","id","updateStep","stage","FINISHED","stopStep","currentBddStep","stopStepById","currentHook","updateFixture","stopFixture","queueFailedBeforeEachHookContext","onTestEnd","_ref4","PASSED","currentLeafStep","attachScreenshot","add","writeFailedBeforeEachHookTest","_ref5","_ref6","writeScreenshotAttachment","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","_ref8","_","inspect","catch","err","Promise","reject","stopCurrentStep","updateFunc","_this$currentHook3","currentStep"],"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?: unknown;\n}\n\ninterface PendingFailedBeforeEachHookTest {\n test: Mocha.Test;\n uuid: string;\n hookName?: 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 isBeforeEachHook = (hookName?: string) => hookName === \"Before\";\nconst isBeforeHook = (hookName?: string) => isBeforeEachHook(hookName) || 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)?.();\nconst getScreenshotArtifactPath = (test?: CodeceptTestWithArtifacts) => {\n const artifacts = test?.artifacts;\n\n if (typeof artifacts !== \"object\" || artifacts === null || !(\"screenshot\" in artifacts)) {\n return undefined;\n }\n\n return typeof artifacts.screenshot === \"string\" ? artifacts.screenshot : undefined;\n};\n\nexport class AllureCodeceptJsReporter extends AllureMochaReporter {\n protected currentBddStep?: string;\n protected metaStepStack: MetaStep[] = [];\n protected currentLeafStep?: string;\n protected currentTestHookName?: string;\n protected pendingFailedBeforeEachHookTest?: PendingFailedBeforeEachHookTest;\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 // A failed CodeceptJS Before hook emits test.failed before the scenario has\n // started in Mocha. Start the Allure test before other failure listeners so\n // their runtime attachments target the test, then defer writing the result\n // until queued failure artifacts, such as screenshots, are available.\n event.dispatcher.prependListener(event.test.failed, this.beforeHookTestFailed.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 event.dispatcher.on(event.hook.finished, this.hookFinished.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.bddStepFinished.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 beforeHookTestFailed(test: Mocha.Test, error: Error, hookName?: string) {\n if (isBeforeEachHook(hookName)) {\n const pendingTest = this.flushPendingFailedBeforeEachHookTest();\n\n if (pendingTest && pendingTest.test !== test && this.currentTest === pendingTest.uuid) {\n this.currentTest = undefined;\n this.currentTestHookName = undefined;\n }\n\n this.testFailed(test, error, hookName);\n }\n }\n\n testFailed(test: Mocha.Test, error: Error, hookName?: string) {\n if (isBeforeEachHook(hookName) && this.pendingFailedBeforeEachHookTest?.test === test) {\n return;\n }\n\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 for (const { id } of [...this.metaStepStack].reverse()) {\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 (this.currentBddStep) {\n this.stopStepById(this.currentBddStep, (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 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 if (isBeforeEachHook(hookName)) {\n if (this.currentTest) {\n this.pendingFailedBeforeEachHookTest = {\n test,\n uuid: this.currentTest,\n hookName,\n };\n this.queueFailedBeforeEachHookContext(this.pendingFailedBeforeEachHookTest);\n }\n } else {\n this.onTestEnd(test);\n this.currentTestHookName = undefined;\n }\n }\n }\n\n testFinished(test?: CodeceptTestWithArtifacts) {\n this.currentTestHookName = undefined;\n this.bddStepFinished();\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 if (this.currentTest) {\n this.attachScreenshot(this.currentTest, test);\n }\n }\n\n hookFinished() {\n this.flushPendingFailedBeforeEachHookTest();\n }\n\n protected flushPendingFailedBeforeEachHookTest() {\n const pendingTest = this.pendingFailedBeforeEachHookTest;\n\n if (!pendingTest) {\n return undefined;\n }\n\n this.pendingFailedBeforeEachHookTest = undefined;\n\n recorder.add(\n \"allure failed before hook result\",\n () => {\n this.writeFailedBeforeEachHookTest(pendingTest);\n },\n true,\n false,\n );\n\n return pendingTest;\n }\n\n protected queueFailedBeforeEachHookContext({ uuid, hookName }: PendingFailedBeforeEachHookTest) {\n // Helper _failed hooks can await I/O before calling the runtime API, so\n // restore the failure context in the recorder before those hooks run.\n recorder.add(\n \"allure failed before hook context\",\n () => {\n this.currentTest = uuid;\n this.currentTestHookName = hookName;\n },\n true,\n false,\n );\n }\n\n protected writeFailedBeforeEachHookTest({ test, uuid, hookName }: PendingFailedBeforeEachHookTest) {\n const currentTest = this.currentTest;\n const currentTestHookName = this.currentTestHookName;\n\n this.currentTest = uuid;\n this.currentTestHookName = hookName;\n this.writeScreenshotAttachment(uuid, test);\n this.onTestEnd(test);\n\n if (!this.currentTest && currentTest && currentTest !== uuid) {\n this.currentTest = currentTest;\n this.currentTestHookName = currentTestHookName;\n return;\n }\n\n this.currentTestHookName = undefined;\n }\n\n protected attachScreenshot(currentTest: string, test?: CodeceptTestWithArtifacts) {\n recorder.add(\n \"allure screenshot attachment\",\n () => {\n this.writeScreenshotAttachment(currentTest, test);\n },\n true,\n );\n }\n\n protected writeScreenshotAttachment(currentTest: string, test?: CodeceptTestWithArtifacts) {\n const screenshotPath = getScreenshotArtifactPath(test);\n\n if (!screenshotPath) {\n return;\n }\n\n this.runtime.writeAttachment(currentTest, null, basename(screenshotPath), screenshotPath, {\n contentType: ContentType.PNG,\n wrapInStep: true,\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 this.bddStepFinished();\n this.currentBddStep = this.runtime.startStep(root, undefined, {\n name: step.keyword + step.text,\n });\n }\n\n bddStepFinished() {\n if (!this.currentBddStep) {\n return;\n }\n\n // Page-object meta steps must finish before their owning Gherkin step.\n for (const { id } of [...this.metaStepStack].reverse()) {\n this.runtime.updateStep(id, (result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n this.runtime.stopStep(id);\n }\n this.metaStepStack = [];\n\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 }\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.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,QAAQ,QAAQ,WAAW;AAEpC,SAASC,WAAW,EAAEC,SAAS,EAAEC,KAAK,EAAEC,MAAM,QAAyB,mBAAmB;AAC1F,SAASC,2BAA2B,EAAEC,kBAAkB,EAAEC,aAAa,EAAEC,SAAS,QAAQ,uBAAuB;AACjH,OAAOC,mBAAmB,MAAM,cAAc;AAC9C,SAASC,KAAK,EAAEC,QAAQ,QAAQ,YAAY;AAoB5C,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,GAAGjB,kBAAkB,CAACU,KAAK,CAAC;EAExC,IAAIO,MAAM,KAAKnB,MAAM,CAACoB,MAAM,IAAIF,QAAQ,EAAE;IACxC,OAAOC,MAAM;EACf;EAEA,OAAOR,gCAAgC,CAACC,KAAK,CAAC,GAAGZ,MAAM,CAACoB,MAAM,GAAGp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AAO,CAACsB,QAAQ,CAACyD,WAAW,CAAC;EACpC;EAEApH,eAAeA,CAAC2G,CAAa,EAAE/I,KAAY,EAAE;IAC3C,IAAI,CAAC,IAAI,CAAC6D,WAAW,EAAE;MACrB;IACF;IAEA,IAAI,CAACY,OAAO,CAACC,UAAU,CAAC,IAAI,CAACb,WAAW,EAAGyB,MAAM,IAAK;MACpDA,MAAM,CAAC/E,MAAM,GAAGF,0BAA0B,CAACL,KAAK,EAAE,IAAI,CAAC8D,mBAAmB,CAAC;MAC3EwB,MAAM,CAACD,aAAa,GAAAE,aAAA,CAAAA,aAAA,KACfD,MAAM,CAACD,aAAa,GACpBhG,2BAA2B,CAACW,KAAK,CAAC,CACtC;IACH,CAAC,CAAC;EACJ;AAKF","ignoreList":[]}
|
package/dist/types/reporter.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export declare class AllureCodeceptJsReporter extends AllureMochaReporter {
|
|
|
36
36
|
protected writeScreenshotAttachment(currentTest: string, test?: CodeceptTestWithArtifacts): void;
|
|
37
37
|
stepStarted(step: CodeceptStep): void;
|
|
38
38
|
bddStepStarted(step: CodeceptBddStep): void;
|
|
39
|
+
bddStepFinished(): void;
|
|
39
40
|
stepFailed(_: CodeceptJS.Step, error?: CodeceptError): void;
|
|
40
41
|
stepComment(): void;
|
|
41
42
|
stepPassed(): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "allure-codeceptjs",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.16.0",
|
|
4
4
|
"description": "Allure codeceptjs integration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
@@ -36,39 +36,40 @@
|
|
|
36
36
|
"allure-report": "allure serve ./out/allure-results",
|
|
37
37
|
"clean": "rimraf ./dist ./out ./test-results",
|
|
38
38
|
"compile": "run-s 'compile:*'",
|
|
39
|
-
"compile:esm": "babel --config-file ./babel.esm.json ./src --out-dir ./dist/esm --extensions
|
|
40
|
-
"compile:cjs": "babel --config-file ./babel.cjs.json ./src --out-dir ./dist/cjs --extensions
|
|
39
|
+
"compile:esm": "babel --config-file ./babel.esm.json ./src --out-dir ./dist/esm --extensions .ts --source-maps",
|
|
40
|
+
"compile:cjs": "babel --config-file ./babel.cjs.json ./src --out-dir ./dist/cjs --extensions .ts --source-maps",
|
|
41
41
|
"compile:types": "tsc",
|
|
42
42
|
"compile:fixup": "node ./scripts/fixup.mjs",
|
|
43
43
|
"generate-report": "allure generate ./out/allure-results -o ./out/allure-report --clean",
|
|
44
|
-
"lint": "
|
|
45
|
-
"lint:fix": "
|
|
46
|
-
"test": "
|
|
44
|
+
"lint": "vp lint src test",
|
|
45
|
+
"lint:fix": "vp lint --fix src test",
|
|
46
|
+
"test": "run-s test:prepare test:run",
|
|
47
|
+
"test:prepare": "yarn workspaces foreach -R --topological-dev run compile",
|
|
48
|
+
"test:run": "vp test run"
|
|
47
49
|
},
|
|
48
50
|
"dependencies": {
|
|
49
|
-
"allure-js-commons": "3.
|
|
50
|
-
"allure-mocha": "3.
|
|
51
|
+
"allure-js-commons": "3.16.0",
|
|
52
|
+
"allure-mocha": "3.16.0"
|
|
51
53
|
},
|
|
52
54
|
"devDependencies": {
|
|
53
55
|
"@babel/cli": "^8.0.1",
|
|
54
56
|
"@babel/core": "^7.28.0",
|
|
55
|
-
"@babel/plugin-transform-modules-commonjs": "^7.27.1",
|
|
56
57
|
"@babel/preset-env": "^7.28.0",
|
|
57
58
|
"@babel/preset-typescript": "^7.27.1",
|
|
58
59
|
"@codeceptjs/helper": "^2.0.4",
|
|
59
|
-
"@types/babel__core": "^7.20.5",
|
|
60
|
-
"@types/babel__preset-env": "^7.10.0",
|
|
61
60
|
"@types/jasmine": "^6.0.0",
|
|
62
61
|
"@types/node": "^26.0.1",
|
|
63
62
|
"allure-commandline": "^2.29.0",
|
|
64
|
-
"allure-vitest": "3.
|
|
63
|
+
"allure-vitest": "3.16.0",
|
|
65
64
|
"babel-plugin-add-module-exports": "^1.0.4",
|
|
66
65
|
"codeceptjs": "^4.1.0",
|
|
67
66
|
"codeceptjs-expect": "^1.0.3",
|
|
68
67
|
"npm-run-all2": "^9.0.2",
|
|
69
68
|
"rimraf": "^6.0.0",
|
|
70
69
|
"typescript": "^6.0.3",
|
|
71
|
-
"
|
|
70
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@^8.3.8000",
|
|
71
|
+
"vite-plus": "^1.7.0",
|
|
72
|
+
"vitest": "^5.1.0"
|
|
72
73
|
},
|
|
73
74
|
"peerDependencies": {
|
|
74
75
|
"codeceptjs": ">=2.3.6"
|