allure-codeceptjs 3.0.0-beta.2 → 3.0.0-beta.3

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.
@@ -11,6 +11,9 @@ var _sdk = require("allure-js-commons/sdk");
11
11
  var _reporter = require("allure-js-commons/sdk/reporter");
12
12
  var _helpers = require("./helpers.js");
13
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, void 0, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = RegExp(e, t); return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { var t = o[r]; return "$" + (Array.isArray(t) ? t.join("$") : t); })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != typeof e[e.length - 1] && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); }
15
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
16
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
14
17
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
15
18
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
16
19
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
@@ -102,6 +105,9 @@ class AllureCodeceptJsReporter {
102
105
  // Hooks
103
106
  _codeceptjs.event.dispatcher.addListener(_codeceptjs.event.hook.started, this.hookStarted.bind(this));
104
107
  _codeceptjs.event.dispatcher.addListener(_codeceptjs.event.hook.passed, this.hookPassed.bind(this));
108
+ // Suite
109
+ _codeceptjs.event.dispatcher.addListener(_codeceptjs.event.suite.before, this.suiteBefore.bind(this));
110
+ _codeceptjs.event.dispatcher.addListener(_codeceptjs.event.suite.after, this.suiteAfter.bind(this));
105
111
  // Test
106
112
  _codeceptjs.event.dispatcher.addListener(_codeceptjs.event.test.started, this.testStarted.bind(this));
107
113
  _codeceptjs.event.dispatcher.addListener(_codeceptjs.event.test.skipped, this.testSkipped.bind(this));
@@ -113,31 +119,34 @@ class AllureCodeceptJsReporter {
113
119
  _codeceptjs.event.dispatcher.addListener(_codeceptjs.event.step.failed, this.stepFailed.bind(this));
114
120
  _codeceptjs.event.dispatcher.addListener(_codeceptjs.event.step.comment, this.stepComment.bind(this));
115
121
  }
122
+ suiteBefore() {
123
+ this.allureRuntime.startScope();
124
+ }
125
+ suiteAfter() {
126
+ this.allureRuntime.writeScope();
127
+ }
116
128
  hookStarted(hook) {
117
129
  var _hook$ctx;
118
- var currentTest = hook === null || hook === void 0 || (_hook$ctx = hook.ctx) === null || _hook$ctx === void 0 ? void 0 : _hook$ctx.currentTest;
119
- if (!currentTest) {
120
- return;
121
- }
122
-
123
- // @ts-ignore
124
- this.startAllureTest(currentTest);
125
- // TODO: group before hooks into fixture
126
- this.allureRuntime.startStep({
127
- name: "before hook"
128
- }, this.currentAllureResultUuid);
130
+ var currentRunnable = hook === null || hook === void 0 || (_hook$ctx = hook.ctx) === null || _hook$ctx === void 0 ? void 0 : _hook$ctx.test;
131
+ var hookType = currentRunnable.title.match( /*#__PURE__*/_wrapRegExp(/^"(.+)" hook/, {
132
+ hookType: 1
133
+ })).groups.hookType;
134
+ var fixtureType = /before/.test(hookType) ? "before" : "after";
135
+ this.allureRuntime.startFixture(fixtureType, {
136
+ name: currentRunnable.title,
137
+ stage: _allureJsCommons.Stage.RUNNING,
138
+ start: Date.now()
139
+ });
129
140
  }
130
141
  hookPassed() {
131
- if (!this.currentAllureResultUuid) {
132
- return;
133
- }
134
- this.allureRuntime.updateStep(result => {
142
+ this.allureRuntime.updateFixture(result => {
135
143
  result.status = _allureJsCommons.Status.PASSED;
136
144
  result.stage = _allureJsCommons.Stage.FINISHED;
137
- }, this.currentAllureResultUuid);
138
- this.allureRuntime.stopStep({
139
- uuid: this.currentAllureResultUuid
140
145
  });
146
+ var fixtureUuid = this.allureRuntime.stopFixture({
147
+ stop: Date.now()
148
+ });
149
+ this.allureRuntime.writeFixture(fixtureUuid);
141
150
  }
142
151
  testStarted(test) {
143
152
  // test has been already started
@@ -1 +1 @@
1
- {"version":3,"file":"reporter.js","names":["_codeceptjs","require","_nodePath","_interopRequireDefault","_allureJsCommons","_sdk","_reporter","_helpers","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","AllureCodeceptJsReporter","constructor","config","registerEvents","allureRuntime","ReporterRuntime","writer","testMode","MessageWriter","FileSystemWriter","resultsDir","closeCurrentAllureTest","test","currentAllureResultUuid","updateTest","result","stage","Stage","FINISHED","_retries","parameters","name","concat","retryNum","stopTest","uuid","writeTest","undefined","startAllureTest","relativeFile","path","relative","codecept_dir","file","split","sep","join","fullName","title","titleMetadata","extractMetadataFromString","labels","extractMeta","startTest","cleanTitle","testCaseId","md5","_test$parent","LabelName","LANGUAGE","FRAMEWORK","parent","SUITE","closeCurrentAllureStep","updateStep","stopStep","event","dispatcher","addListener","hook","started","hookStarted","bind","passed","hookPassed","testStarted","skipped","testSkipped","testPassed","failed","testFailed","step","stepStarted","stepPassed","stepFailed","comment","stepComment","_hook$ctx","currentTest","ctx","startStep","status","Status","PASSED","err","FAILED","statusDetails","getMessageAndTraceFromError","SKIPPED","opts","skipInfo","message","actor","handleRuntimeMessage","applyRuntimeMessages","testUuid","exports"],"sources":["../../src/reporter.ts"],"sourcesContent":["import { event } from \"codeceptjs\";\nimport path from \"node:path\";\nimport { LabelName, Stage, Status } from \"allure-js-commons\";\nimport { type RuntimeMessage, extractMetadataFromString, getMessageAndTraceFromError } from \"allure-js-commons/sdk\";\nimport { FileSystemWriter, MessageWriter, ReporterRuntime, md5 } from \"allure-js-commons/sdk/reporter\";\nimport { extractMeta } from \"./helpers.js\";\nimport type { AllureCodeceptJsConfig, CodeceptError, CodeceptHook, CodeceptStep, CodeceptTest } from \"./model.js\";\n\nexport class AllureCodeceptJsReporter {\n allureRuntime?: ReporterRuntime;\n currentAllureResultUuid?: string;\n currentTest: CodeceptTest | null = null;\n config!: AllureCodeceptJsConfig;\n\n constructor(config: AllureCodeceptJsConfig) {\n this.registerEvents();\n this.config = config || {};\n this.allureRuntime = new ReporterRuntime({\n ...config,\n writer: config.testMode\n ? new MessageWriter()\n : new FileSystemWriter({\n resultsDir: config.resultsDir || \"./allure-results\",\n }),\n });\n }\n\n private closeCurrentAllureTest(test: CodeceptTest) {\n if (!this.currentAllureResultUuid) {\n return;\n }\n\n this.allureRuntime!.updateTest((result) => {\n result.stage = Stage.FINISHED;\n\n // @ts-ignore\n if (test._retries <= 0) {\n return;\n }\n\n // @ts-ignore\n result.parameters!.push({ name: \"Repetition\", value: `${test.retryNum + 1}` });\n }, this.currentAllureResultUuid);\n\n this.allureRuntime!.stopTest({ uuid: this.currentAllureResultUuid });\n this.allureRuntime!.writeTest(this.currentAllureResultUuid);\n this.currentAllureResultUuid = undefined;\n }\n\n private startAllureTest(test: CodeceptTest) {\n const relativeFile = path.relative(codecept_dir, test.file!).split(path.sep).join(\"/\");\n const fullName = `${relativeFile}#${test.title}`;\n const titleMetadata = extractMetadataFromString(test.title);\n // @ts-ignore\n const { labels } = extractMeta(test);\n\n this.currentAllureResultUuid = this.allureRuntime!.startTest({\n name: titleMetadata.cleanTitle,\n fullName,\n testCaseId: md5(fullName),\n });\n\n this.allureRuntime!.updateTest((result) => {\n result.labels.push(...labels);\n result.labels.push(...titleMetadata.labels);\n result.labels.push({ name: LabelName.LANGUAGE, value: \"javascript\" });\n result.labels.push({ name: LabelName.FRAMEWORK, value: \"codeceptjs\" });\n\n if (test?.parent?.title) {\n result.labels.push({\n name: LabelName.SUITE,\n value: test.parent.title,\n });\n }\n }, this.currentAllureResultUuid);\n }\n\n private closeCurrentAllureStep() {\n if (!this.currentAllureResultUuid) {\n return;\n }\n\n this.allureRuntime!.updateStep((result) => {\n result.stage = Stage.FINISHED;\n }, this.currentAllureResultUuid);\n this.allureRuntime!.stopStep({ uuid: this.currentAllureResultUuid });\n }\n\n registerEvents() {\n // Hooks\n event.dispatcher.addListener(event.hook.started, this.hookStarted.bind(this));\n event.dispatcher.addListener(event.hook.passed, this.hookPassed.bind(this));\n // Test\n event.dispatcher.addListener(event.test.started, this.testStarted.bind(this));\n event.dispatcher.addListener(event.test.skipped, this.testSkipped.bind(this));\n event.dispatcher.addListener(event.test.passed, this.testPassed.bind(this));\n event.dispatcher.addListener(event.test.failed, this.testFailed.bind(this));\n // Step\n event.dispatcher.addListener(event.step.started, this.stepStarted.bind(this));\n event.dispatcher.addListener(event.step.passed, this.stepPassed.bind(this));\n event.dispatcher.addListener(event.step.failed, this.stepFailed.bind(this));\n event.dispatcher.addListener(event.step.comment, this.stepComment.bind(this));\n }\n\n hookStarted(hook: CodeceptHook) {\n const currentTest = hook?.ctx?.currentTest;\n\n if (!currentTest) {\n return;\n }\n\n // @ts-ignore\n this.startAllureTest(currentTest);\n // TODO: group before hooks into fixture\n this.allureRuntime!.startStep(\n {\n name: \"before hook\",\n },\n this.currentAllureResultUuid!,\n );\n }\n\n hookPassed() {\n if (!this.currentAllureResultUuid) {\n return;\n }\n\n this.allureRuntime!.updateStep((result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n }, this.currentAllureResultUuid);\n this.allureRuntime!.stopStep({ uuid: this.currentAllureResultUuid });\n }\n\n testStarted(test: CodeceptTest & { tags: string[] }) {\n // test has been already started\n if (this.currentAllureResultUuid) {\n return;\n }\n\n this.startAllureTest(test);\n }\n\n testFailed(test: CodeceptTest, err: CodeceptError) {\n if (!this.currentAllureResultUuid) {\n return;\n }\n\n this.allureRuntime!.updateTest((result) => {\n result.status = Status.FAILED;\n // @ts-ignore\n result.statusDetails = getMessageAndTraceFromError(err);\n }, this.currentAllureResultUuid);\n this.closeCurrentAllureTest(test);\n }\n\n testPassed(test: CodeceptTest) {\n if (!this.currentAllureResultUuid) {\n return;\n }\n\n this.allureRuntime!.updateTest((result) => {\n result.status = Status.PASSED;\n }, this.currentAllureResultUuid);\n this.closeCurrentAllureTest(test);\n }\n\n testSkipped(\n test: CodeceptTest & {\n opts: {\n skipInfo: {\n message: string;\n isFastSkipped: boolean;\n };\n };\n },\n ) {\n if (!this.currentAllureResultUuid) {\n return;\n }\n\n this.allureRuntime!.updateTest((result) => {\n result.status = Status.SKIPPED;\n\n if (test.opts.skipInfo) {\n result.statusDetails = { message: test.opts.skipInfo.message };\n }\n }, this.currentAllureResultUuid);\n this.closeCurrentAllureTest(test);\n }\n\n stepStarted(step: CodeceptStep) {\n this.allureRuntime!.startStep(\n {\n name: `${step.actor} ${step.name}`,\n },\n this.currentAllureResultUuid!,\n );\n }\n\n stepFailed() {\n this.allureRuntime!.updateStep((result) => {\n result.status = Status.FAILED;\n }, this.currentAllureResultUuid!);\n this.closeCurrentAllureStep();\n }\n\n stepComment() {\n this.allureRuntime!.updateStep((result) => {\n result.status = Status.PASSED;\n }, this.currentAllureResultUuid!);\n this.closeCurrentAllureStep();\n }\n\n stepPassed() {\n this.allureRuntime!.updateStep((result) => {\n result.status = Status.PASSED;\n }, this.currentAllureResultUuid!);\n this.closeCurrentAllureStep();\n }\n\n // TODO: not implemented in the new version at all\n // addScreenDiff(name: string, expectedImg: string, actualImg: string, diffImg: string) {\n // const screenDiff = {\n // name,\n // expected: `data:image/png;base64,${expectedImg}`,\n // actual: `data:image/png;base64,${actualImg}`,\n // diff: `data:image/png;base64,${diffImg}`,\n // };\n // this.addAttachment(name, JSON.stringify(screenDiff), \"application/vnd.allure.image.diff\");\n // }\n\n handleRuntimeMessage(message: RuntimeMessage) {\n this.allureRuntime!.applyRuntimeMessages([message], { testUuid: this.currentAllureResultUuid! });\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAA2C,SAAAE,uBA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AACtE,aAAa,CAAEkD,UAAU,CAAEvC,MAAM,IAAK;MACzCA,MAAM,CAACkE,MAAM,GAAGC,uBAAM,CAACG,MAAM;IAC/B,CAAC,EAAE,IAAI,CAACxE,uBAAwB,CAAC;IACjC,IAAI,CAACwC,sBAAsB,CAAC,CAAC;EAC/B;EAEAuB,WAAWA,CAAA,EAAG;IACZ,IAAI,CAACxE,aAAa,CAAEkD,UAAU,CAAEvC,MAAM,IAAK;MACzCA,MAAM,CAACkE,MAAM,GAAGC,uBAAM,CAACC,MAAM;IAC/B,CAAC,EAAE,IAAI,CAACtE,uBAAwB,CAAC;IACjC,IAAI,CAACwC,sBAAsB,CAAC,CAAC;EAC/B;EAEAoB,UAAUA,CAAA,EAAG;IACX,IAAI,CAACrE,aAAa,CAAEkD,UAAU,CAAEvC,MAAM,IAAK;MACzCA,MAAM,CAACkE,MAAM,GAAGC,uBAAM,CAACC,MAAM;IAC/B,CAAC,EAAE,IAAI,CAACtE,uBAAwB,CAAC;IACjC,IAAI,CAACwC,sBAAsB,CAAC,CAAC;EAC/B;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEAwC,oBAAoBA,CAACF,OAAuB,EAAE;IAC5C,IAAI,CAACvF,aAAa,CAAE0F,oBAAoB,CAAC,CAACH,OAAO,CAAC,EAAE;MAAEI,QAAQ,EAAE,IAAI,CAAClF;IAAyB,CAAC,CAAC;EAClG;AACF;AAACmF,OAAA,CAAAhG,wBAAA,GAAAA,wBAAA","ignoreList":[]}
1
+ {"version":3,"file":"reporter.js","names":["_codeceptjs","require","_nodePath","_interopRequireDefault","_allureJsCommons","_sdk","_reporter","_helpers","e","__esModule","default","_wrapRegExp","r","BabelRegExp","RegExp","prototype","WeakMap","t","p","o","set","get","_setPrototypeOf","buildGroups","Object","keys","reduce","i","length","create","_inherits","exec","call","groups","indices","Symbol","replace","Array","isArray","join","arguments","slice","push","apply","TypeError","constructor","value","writable","configurable","defineProperty","setPrototypeOf","bind","__proto__","ownKeys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","enumerable","_objectSpread","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","_toPrimitive","toPrimitive","String","Number","AllureCodeceptJsReporter","config","registerEvents","allureRuntime","ReporterRuntime","writer","testMode","MessageWriter","FileSystemWriter","resultsDir","closeCurrentAllureTest","test","currentAllureResultUuid","updateTest","result","stage","Stage","FINISHED","_retries","parameters","name","concat","retryNum","stopTest","uuid","writeTest","undefined","startAllureTest","relativeFile","path","relative","codecept_dir","file","split","sep","fullName","title","titleMetadata","extractMetadataFromString","labels","extractMeta","startTest","cleanTitle","testCaseId","md5","_test$parent","LabelName","LANGUAGE","FRAMEWORK","parent","SUITE","closeCurrentAllureStep","updateStep","stopStep","event","dispatcher","addListener","hook","started","hookStarted","passed","hookPassed","suite","before","suiteBefore","after","suiteAfter","testStarted","skipped","testSkipped","testPassed","failed","testFailed","step","stepStarted","stepPassed","stepFailed","comment","stepComment","startScope","writeScope","_hook$ctx","currentRunnable","ctx","hookType","match","fixtureType","startFixture","RUNNING","start","Date","now","updateFixture","status","Status","PASSED","fixtureUuid","stopFixture","stop","writeFixture","err","FAILED","statusDetails","getMessageAndTraceFromError","SKIPPED","opts","skipInfo","message","startStep","actor","handleRuntimeMessage","applyRuntimeMessages","testUuid","exports"],"sources":["../../src/reporter.ts"],"sourcesContent":["import { event } from \"codeceptjs\";\nimport path from \"node:path\";\nimport { LabelName, Stage, Status } from \"allure-js-commons\";\nimport { type RuntimeMessage, extractMetadataFromString, getMessageAndTraceFromError } from \"allure-js-commons/sdk\";\nimport { FileSystemWriter, MessageWriter, ReporterRuntime, md5 } from \"allure-js-commons/sdk/reporter\";\nimport { extractMeta } from \"./helpers.js\";\nimport type { AllureCodeceptJsConfig, CodeceptError, CodeceptHook, CodeceptStep, CodeceptTest } from \"./model.js\";\n\nexport class AllureCodeceptJsReporter {\n allureRuntime?: ReporterRuntime;\n currentAllureResultUuid?: string;\n currentTest: CodeceptTest | null = null;\n config!: AllureCodeceptJsConfig;\n\n constructor(config: AllureCodeceptJsConfig) {\n this.registerEvents();\n this.config = config || {};\n this.allureRuntime = new ReporterRuntime({\n ...config,\n writer: config.testMode\n ? new MessageWriter()\n : new FileSystemWriter({\n resultsDir: config.resultsDir || \"./allure-results\",\n }),\n });\n }\n\n private closeCurrentAllureTest(test: CodeceptTest) {\n if (!this.currentAllureResultUuid) {\n return;\n }\n\n this.allureRuntime!.updateTest((result) => {\n result.stage = Stage.FINISHED;\n\n // @ts-ignore\n if (test._retries <= 0) {\n return;\n }\n\n // @ts-ignore\n result.parameters!.push({ name: \"Repetition\", value: `${test.retryNum + 1}` });\n }, this.currentAllureResultUuid);\n\n this.allureRuntime!.stopTest({ uuid: this.currentAllureResultUuid });\n this.allureRuntime!.writeTest(this.currentAllureResultUuid);\n this.currentAllureResultUuid = undefined;\n }\n\n private startAllureTest(test: CodeceptTest) {\n const relativeFile = path.relative(codecept_dir, test.file!).split(path.sep).join(\"/\");\n const fullName = `${relativeFile}#${test.title}`;\n const titleMetadata = extractMetadataFromString(test.title);\n // @ts-ignore\n const { labels } = extractMeta(test);\n\n this.currentAllureResultUuid = this.allureRuntime!.startTest({\n name: titleMetadata.cleanTitle,\n fullName,\n testCaseId: md5(fullName),\n });\n\n this.allureRuntime!.updateTest((result) => {\n result.labels.push(...labels);\n result.labels.push(...titleMetadata.labels);\n result.labels.push({ name: LabelName.LANGUAGE, value: \"javascript\" });\n result.labels.push({ name: LabelName.FRAMEWORK, value: \"codeceptjs\" });\n\n if (test?.parent?.title) {\n result.labels.push({\n name: LabelName.SUITE,\n value: test.parent.title,\n });\n }\n }, this.currentAllureResultUuid);\n }\n\n private closeCurrentAllureStep() {\n if (!this.currentAllureResultUuid) {\n return;\n }\n\n this.allureRuntime!.updateStep((result) => {\n result.stage = Stage.FINISHED;\n }, this.currentAllureResultUuid);\n this.allureRuntime!.stopStep({ uuid: this.currentAllureResultUuid });\n }\n\n registerEvents() {\n // Hooks\n event.dispatcher.addListener(event.hook.started, this.hookStarted.bind(this));\n event.dispatcher.addListener(event.hook.passed, this.hookPassed.bind(this));\n // Suite\n event.dispatcher.addListener(event.suite.before, this.suiteBefore.bind(this));\n event.dispatcher.addListener(event.suite.after, this.suiteAfter.bind(this));\n // Test\n event.dispatcher.addListener(event.test.started, this.testStarted.bind(this));\n event.dispatcher.addListener(event.test.skipped, this.testSkipped.bind(this));\n event.dispatcher.addListener(event.test.passed, this.testPassed.bind(this));\n event.dispatcher.addListener(event.test.failed, this.testFailed.bind(this));\n // Step\n event.dispatcher.addListener(event.step.started, this.stepStarted.bind(this));\n event.dispatcher.addListener(event.step.passed, this.stepPassed.bind(this));\n event.dispatcher.addListener(event.step.failed, this.stepFailed.bind(this));\n event.dispatcher.addListener(event.step.comment, this.stepComment.bind(this));\n }\n\n suiteBefore() {\n this.allureRuntime!.startScope();\n }\n\n suiteAfter() {\n this.allureRuntime!.writeScope();\n }\n\n hookStarted(hook: CodeceptHook) {\n const currentRunnable = hook?.ctx?.test;\n const hookType = currentRunnable!.title.match(/^\"(?<hookType>.+)\" hook/)!.groups!.hookType;\n const fixtureType = /before/.test(hookType) ? \"before\" : \"after\";\n\n this.allureRuntime!.startFixture(fixtureType, {\n name: currentRunnable!.title,\n stage: Stage.RUNNING,\n start: Date.now(),\n });\n }\n\n hookPassed() {\n this.allureRuntime!.updateFixture((result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n\n const fixtureUuid = this.allureRuntime!.stopFixture({ stop: Date.now() });\n\n this.allureRuntime!.writeFixture(fixtureUuid);\n }\n\n testStarted(test: CodeceptTest & { tags: string[] }) {\n // test has been already started\n if (this.currentAllureResultUuid) {\n return;\n }\n\n this.startAllureTest(test);\n }\n\n testFailed(test: CodeceptTest, err: CodeceptError) {\n if (!this.currentAllureResultUuid) {\n return;\n }\n\n this.allureRuntime!.updateTest((result) => {\n result.status = Status.FAILED;\n // @ts-ignore\n result.statusDetails = getMessageAndTraceFromError(err);\n }, this.currentAllureResultUuid);\n this.closeCurrentAllureTest(test);\n }\n\n testPassed(test: CodeceptTest) {\n if (!this.currentAllureResultUuid) {\n return;\n }\n\n this.allureRuntime!.updateTest((result) => {\n result.status = Status.PASSED;\n }, this.currentAllureResultUuid);\n this.closeCurrentAllureTest(test);\n }\n\n testSkipped(\n test: CodeceptTest & {\n opts: {\n skipInfo: {\n message: string;\n isFastSkipped: boolean;\n };\n };\n },\n ) {\n if (!this.currentAllureResultUuid) {\n return;\n }\n\n this.allureRuntime!.updateTest((result) => {\n result.status = Status.SKIPPED;\n\n if (test.opts.skipInfo) {\n result.statusDetails = { message: test.opts.skipInfo.message };\n }\n }, this.currentAllureResultUuid);\n this.closeCurrentAllureTest(test);\n }\n\n stepStarted(step: CodeceptStep) {\n this.allureRuntime!.startStep(\n {\n name: `${step.actor} ${step.name}`,\n },\n this.currentAllureResultUuid!,\n );\n }\n\n stepFailed() {\n this.allureRuntime!.updateStep((result) => {\n result.status = Status.FAILED;\n }, this.currentAllureResultUuid!);\n this.closeCurrentAllureStep();\n }\n\n stepComment() {\n this.allureRuntime!.updateStep((result) => {\n result.status = Status.PASSED;\n }, this.currentAllureResultUuid!);\n this.closeCurrentAllureStep();\n }\n\n stepPassed() {\n this.allureRuntime!.updateStep((result) => {\n result.status = Status.PASSED;\n }, this.currentAllureResultUuid!);\n this.closeCurrentAllureStep();\n }\n\n // TODO: not implemented in the new version at all\n // addScreenDiff(name: string, expectedImg: string, actualImg: string, diffImg: string) {\n // const screenDiff = {\n // name,\n // expected: `data:image/png;base64,${expectedImg}`,\n // actual: `data:image/png;base64,${actualImg}`,\n // diff: `data:image/png;base64,${diffImg}`,\n // };\n // this.addAttachment(name, JSON.stringify(screenDiff), \"application/vnd.allure.image.diff\");\n // }\n\n handleRuntimeMessage(message: RuntimeMessage) {\n this.allureRuntime!.applyRuntimeMessages([message], { testUuid: this.currentAllureResultUuid! });\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,W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;IACX,IAAI,CAACzE,aAAa,CAAEiD,UAAU,CAAEtC,MAAM,IAAK;MACzCA,MAAM,CAAC+E,MAAM,GAAGC,uBAAM,CAACO,MAAM;IAC/B,CAAC,EAAE,IAAI,CAACzF,uBAAwB,CAAC;IACjC,IAAI,CAACuC,sBAAsB,CAAC,CAAC;EAC/B;EAEA2B,WAAWA,CAAA,EAAG;IACZ,IAAI,CAAC3E,aAAa,CAAEiD,UAAU,CAAEtC,MAAM,IAAK;MACzCA,MAAM,CAAC+E,MAAM,GAAGC,uBAAM,CAACC,MAAM;IAC/B,CAAC,EAAE,IAAI,CAACnF,uBAAwB,CAAC;IACjC,IAAI,CAACuC,sBAAsB,CAAC,CAAC;EAC/B;EAEAwB,UAAUA,CAAA,EAAG;IACX,IAAI,CAACxE,aAAa,CAAEiD,UAAU,CAAEtC,MAAM,IAAK;MACzCA,MAAM,CAAC+E,MAAM,GAAGC,uBAAM,CAACC,MAAM;IAC/B,CAAC,EAAE,IAAI,CAACnF,uBAAwB,CAAC;IACjC,IAAI,CAACuC,sBAAsB,CAAC,CAAC;EAC/B;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA2D,oBAAoBA,CAACH,OAAuB,EAAE;IAC5C,IAAI,CAACxG,aAAa,CAAE4G,oBAAoB,CAAC,CAACJ,OAAO,CAAC,EAAE;MAAEK,QAAQ,EAAE,IAAI,CAACpG;IAAyB,CAAC,CAAC;EAClG;AACF;AAACqG,OAAA,CAAAjH,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -1,3 +1,6 @@
1
+ function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, void 0, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = RegExp(e, t); return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { var t = o[r]; return "$" + (Array.isArray(t) ? t.join("$") : t); })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != typeof e[e.length - 1] && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); }
2
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
3
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
1
4
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3
6
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
@@ -95,6 +98,9 @@ export class AllureCodeceptJsReporter {
95
98
  // Hooks
96
99
  event.dispatcher.addListener(event.hook.started, this.hookStarted.bind(this));
97
100
  event.dispatcher.addListener(event.hook.passed, this.hookPassed.bind(this));
101
+ // Suite
102
+ event.dispatcher.addListener(event.suite.before, this.suiteBefore.bind(this));
103
+ event.dispatcher.addListener(event.suite.after, this.suiteAfter.bind(this));
98
104
  // Test
99
105
  event.dispatcher.addListener(event.test.started, this.testStarted.bind(this));
100
106
  event.dispatcher.addListener(event.test.skipped, this.testSkipped.bind(this));
@@ -106,31 +112,34 @@ export class AllureCodeceptJsReporter {
106
112
  event.dispatcher.addListener(event.step.failed, this.stepFailed.bind(this));
107
113
  event.dispatcher.addListener(event.step.comment, this.stepComment.bind(this));
108
114
  }
115
+ suiteBefore() {
116
+ this.allureRuntime.startScope();
117
+ }
118
+ suiteAfter() {
119
+ this.allureRuntime.writeScope();
120
+ }
109
121
  hookStarted(hook) {
110
122
  var _hook$ctx;
111
- var currentTest = hook === null || hook === void 0 || (_hook$ctx = hook.ctx) === null || _hook$ctx === void 0 ? void 0 : _hook$ctx.currentTest;
112
- if (!currentTest) {
113
- return;
114
- }
115
-
116
- // @ts-ignore
117
- this.startAllureTest(currentTest);
118
- // TODO: group before hooks into fixture
119
- this.allureRuntime.startStep({
120
- name: "before hook"
121
- }, this.currentAllureResultUuid);
123
+ var currentRunnable = hook === null || hook === void 0 || (_hook$ctx = hook.ctx) === null || _hook$ctx === void 0 ? void 0 : _hook$ctx.test;
124
+ var hookType = currentRunnable.title.match( /*#__PURE__*/_wrapRegExp(/^"(.+)" hook/, {
125
+ hookType: 1
126
+ })).groups.hookType;
127
+ var fixtureType = /before/.test(hookType) ? "before" : "after";
128
+ this.allureRuntime.startFixture(fixtureType, {
129
+ name: currentRunnable.title,
130
+ stage: Stage.RUNNING,
131
+ start: Date.now()
132
+ });
122
133
  }
123
134
  hookPassed() {
124
- if (!this.currentAllureResultUuid) {
125
- return;
126
- }
127
- this.allureRuntime.updateStep(result => {
135
+ this.allureRuntime.updateFixture(result => {
128
136
  result.status = Status.PASSED;
129
137
  result.stage = Stage.FINISHED;
130
- }, this.currentAllureResultUuid);
131
- this.allureRuntime.stopStep({
132
- uuid: this.currentAllureResultUuid
133
138
  });
139
+ var fixtureUuid = this.allureRuntime.stopFixture({
140
+ stop: Date.now()
141
+ });
142
+ this.allureRuntime.writeFixture(fixtureUuid);
134
143
  }
135
144
  testStarted(test) {
136
145
  // test has been already started
@@ -1 +1 @@
1
- {"version":3,"file":"reporter.js","names":["event","path","LabelName","Stage","Status","extractMetadataFromString","getMessageAndTraceFromError","FileSystemWriter","MessageWriter","ReporterRuntime","md5","extractMeta","AllureCodeceptJsReporter","constructor","config","_defineProperty","registerEvents","allureRuntime","_objectSpread","writer","testMode","resultsDir","closeCurrentAllureTest","test","currentAllureResultUuid","updateTest","result","stage","FINISHED","_retries","parameters","push","name","value","concat","retryNum","stopTest","uuid","writeTest","undefined","startAllureTest","relativeFile","relative","codecept_dir","file","split","sep","join","fullName","title","titleMetadata","labels","startTest","cleanTitle","testCaseId","_test$parent","LANGUAGE","FRAMEWORK","parent","SUITE","closeCurrentAllureStep","updateStep","stopStep","dispatcher","addListener","hook","started","hookStarted","bind","passed","hookPassed","testStarted","skipped","testSkipped","testPassed","failed","testFailed","step","stepStarted","stepPassed","stepFailed","comment","stepComment","_hook$ctx","currentTest","ctx","startStep","status","PASSED","err","FAILED","statusDetails","SKIPPED","opts","skipInfo","message","actor","handleRuntimeMessage","applyRuntimeMessages","testUuid"],"sources":["../../src/reporter.ts"],"sourcesContent":["import { event } from \"codeceptjs\";\nimport path from \"node:path\";\nimport { LabelName, Stage, Status } from \"allure-js-commons\";\nimport { type RuntimeMessage, extractMetadataFromString, getMessageAndTraceFromError } from \"allure-js-commons/sdk\";\nimport { FileSystemWriter, MessageWriter, ReporterRuntime, md5 } from \"allure-js-commons/sdk/reporter\";\nimport { extractMeta } from \"./helpers.js\";\nimport type { AllureCodeceptJsConfig, CodeceptError, CodeceptHook, CodeceptStep, CodeceptTest } from \"./model.js\";\n\nexport class AllureCodeceptJsReporter {\n allureRuntime?: ReporterRuntime;\n currentAllureResultUuid?: string;\n currentTest: CodeceptTest | null = null;\n config!: AllureCodeceptJsConfig;\n\n constructor(config: AllureCodeceptJsConfig) {\n this.registerEvents();\n this.config = config || {};\n this.allureRuntime = new ReporterRuntime({\n ...config,\n writer: config.testMode\n ? new MessageWriter()\n : new FileSystemWriter({\n resultsDir: config.resultsDir || \"./allure-results\",\n }),\n });\n }\n\n private closeCurrentAllureTest(test: CodeceptTest) {\n if (!this.currentAllureResultUuid) {\n return;\n }\n\n this.allureRuntime!.updateTest((result) => {\n result.stage = Stage.FINISHED;\n\n // @ts-ignore\n if (test._retries <= 0) {\n return;\n }\n\n // @ts-ignore\n result.parameters!.push({ name: \"Repetition\", value: `${test.retryNum + 1}` });\n }, this.currentAllureResultUuid);\n\n this.allureRuntime!.stopTest({ uuid: this.currentAllureResultUuid });\n this.allureRuntime!.writeTest(this.currentAllureResultUuid);\n this.currentAllureResultUuid = undefined;\n }\n\n private startAllureTest(test: CodeceptTest) {\n const relativeFile = path.relative(codecept_dir, test.file!).split(path.sep).join(\"/\");\n const fullName = `${relativeFile}#${test.title}`;\n const titleMetadata = extractMetadataFromString(test.title);\n // @ts-ignore\n const { labels } = extractMeta(test);\n\n this.currentAllureResultUuid = this.allureRuntime!.startTest({\n name: titleMetadata.cleanTitle,\n fullName,\n testCaseId: md5(fullName),\n });\n\n this.allureRuntime!.updateTest((result) => {\n result.labels.push(...labels);\n result.labels.push(...titleMetadata.labels);\n result.labels.push({ name: LabelName.LANGUAGE, value: \"javascript\" });\n result.labels.push({ name: LabelName.FRAMEWORK, value: \"codeceptjs\" });\n\n if (test?.parent?.title) {\n result.labels.push({\n name: LabelName.SUITE,\n value: test.parent.title,\n });\n }\n }, this.currentAllureResultUuid);\n }\n\n private closeCurrentAllureStep() {\n if (!this.currentAllureResultUuid) {\n return;\n }\n\n this.allureRuntime!.updateStep((result) => {\n result.stage = Stage.FINISHED;\n }, this.currentAllureResultUuid);\n this.allureRuntime!.stopStep({ uuid: this.currentAllureResultUuid });\n }\n\n registerEvents() {\n // Hooks\n event.dispatcher.addListener(event.hook.started, this.hookStarted.bind(this));\n event.dispatcher.addListener(event.hook.passed, this.hookPassed.bind(this));\n // Test\n event.dispatcher.addListener(event.test.started, this.testStarted.bind(this));\n event.dispatcher.addListener(event.test.skipped, this.testSkipped.bind(this));\n event.dispatcher.addListener(event.test.passed, this.testPassed.bind(this));\n event.dispatcher.addListener(event.test.failed, this.testFailed.bind(this));\n // Step\n event.dispatcher.addListener(event.step.started, this.stepStarted.bind(this));\n event.dispatcher.addListener(event.step.passed, this.stepPassed.bind(this));\n event.dispatcher.addListener(event.step.failed, this.stepFailed.bind(this));\n event.dispatcher.addListener(event.step.comment, this.stepComment.bind(this));\n }\n\n hookStarted(hook: CodeceptHook) {\n const currentTest = hook?.ctx?.currentTest;\n\n if (!currentTest) {\n return;\n }\n\n // @ts-ignore\n this.startAllureTest(currentTest);\n // TODO: group before hooks into fixture\n this.allureRuntime!.startStep(\n {\n name: \"before hook\",\n },\n this.currentAllureResultUuid!,\n );\n }\n\n hookPassed() {\n if (!this.currentAllureResultUuid) {\n return;\n }\n\n this.allureRuntime!.updateStep((result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n }, this.currentAllureResultUuid);\n this.allureRuntime!.stopStep({ uuid: this.currentAllureResultUuid });\n }\n\n testStarted(test: CodeceptTest & { tags: string[] }) {\n // test has been already started\n if (this.currentAllureResultUuid) {\n return;\n }\n\n this.startAllureTest(test);\n }\n\n testFailed(test: CodeceptTest, err: CodeceptError) {\n if (!this.currentAllureResultUuid) {\n return;\n }\n\n this.allureRuntime!.updateTest((result) => {\n result.status = Status.FAILED;\n // @ts-ignore\n result.statusDetails = getMessageAndTraceFromError(err);\n }, this.currentAllureResultUuid);\n this.closeCurrentAllureTest(test);\n }\n\n testPassed(test: CodeceptTest) {\n if (!this.currentAllureResultUuid) {\n return;\n }\n\n this.allureRuntime!.updateTest((result) => {\n result.status = Status.PASSED;\n }, this.currentAllureResultUuid);\n this.closeCurrentAllureTest(test);\n }\n\n testSkipped(\n test: CodeceptTest & {\n opts: {\n skipInfo: {\n message: string;\n isFastSkipped: boolean;\n };\n };\n },\n ) {\n if (!this.currentAllureResultUuid) {\n return;\n }\n\n this.allureRuntime!.updateTest((result) => {\n result.status = Status.SKIPPED;\n\n if (test.opts.skipInfo) {\n result.statusDetails = { message: test.opts.skipInfo.message };\n }\n }, this.currentAllureResultUuid);\n this.closeCurrentAllureTest(test);\n }\n\n stepStarted(step: CodeceptStep) {\n this.allureRuntime!.startStep(\n {\n name: `${step.actor} ${step.name}`,\n },\n this.currentAllureResultUuid!,\n );\n }\n\n stepFailed() {\n this.allureRuntime!.updateStep((result) => {\n result.status = Status.FAILED;\n }, this.currentAllureResultUuid!);\n this.closeCurrentAllureStep();\n }\n\n stepComment() {\n this.allureRuntime!.updateStep((result) => {\n result.status = Status.PASSED;\n }, this.currentAllureResultUuid!);\n this.closeCurrentAllureStep();\n }\n\n stepPassed() {\n this.allureRuntime!.updateStep((result) => {\n result.status = Status.PASSED;\n }, this.currentAllureResultUuid!);\n this.closeCurrentAllureStep();\n }\n\n // TODO: not implemented in the new version at all\n // addScreenDiff(name: string, expectedImg: string, actualImg: string, diffImg: string) {\n // const screenDiff = {\n // name,\n // expected: `data:image/png;base64,${expectedImg}`,\n // actual: `data:image/png;base64,${actualImg}`,\n // diff: `data:image/png;base64,${diffImg}`,\n // };\n // this.addAttachment(name, JSON.stringify(screenDiff), \"application/vnd.allure.image.diff\");\n // }\n\n handleRuntimeMessage(message: RuntimeMessage) {\n this.allureRuntime!.applyRuntimeMessages([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Aa,CAAE4C,UAAU,CAAEnC,MAAM,IAAK;MACzCA,MAAM,CAAC6D,MAAM,GAAGnF,MAAM,CAACoF,MAAM;IAC/B,CAAC,EAAE,IAAI,CAAChE,uBAAwB,CAAC;IACjC,IAAI,CAACoC,sBAAsB,CAAC,CAAC;EAC/B;EAEAmB,UAAUA,CAAA,EAAG;IACX,IAAI,CAAC9D,aAAa,CAAE4C,UAAU,CAAEnC,MAAM,IAAK;MACzCA,MAAM,CAAC6D,MAAM,GAAGnF,MAAM,CAACoF,MAAM;IAC/B,CAAC,EAAE,IAAI,CAAChE,uBAAwB,CAAC;IACjC,IAAI,CAACoC,sBAAsB,CAAC,CAAC;EAC/B;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEAqC,oBAAoBA,CAACF,OAAuB,EAAE;IAC5C,IAAI,CAAC9E,aAAa,CAAEiF,oBAAoB,CAAC,CAACH,OAAO,CAAC,EAAE;MAAEI,QAAQ,EAAE,IAAI,CAAC3E;IAAyB,CAAC,CAAC;EAClG;AACF","ignoreList":[]}
1
+ {"version":3,"file":"reporter.js","names":["event","path","LabelName","Stage","Status","extractMetadataFromString","getMessageAndTraceFromError","FileSystemWriter","MessageWriter","ReporterRuntime","md5","extractMeta","AllureCodeceptJsReporter","constructor","config","_defineProperty","registerEvents","allureRuntime","_objectSpread","writer","testMode","resultsDir","closeCurrentAllureTest","test","currentAllureResultUuid","updateTest","result","stage","FINISHED","_retries","parameters","push","name","value","concat","retryNum","stopTest","uuid","writeTest","undefined","startAllureTest","relativeFile","relative","codecept_dir","file","split","sep","join","fullName","title","titleMetadata","labels","startTest","cleanTitle","testCaseId","_test$parent","LANGUAGE","FRAMEWORK","parent","SUITE","closeCurrentAllureStep","updateStep","stopStep","dispatcher","addListener","hook","started","hookStarted","bind","passed","hookPassed","suite","before","suiteBefore","after","suiteAfter","testStarted","skipped","testSkipped","testPassed","failed","testFailed","step","stepStarted","stepPassed","stepFailed","comment","stepComment","startScope","writeScope","_hook$ctx","currentRunnable","ctx","hookType","match","_wrapRegExp","groups","fixtureType","startFixture","RUNNING","start","Date","now","updateFixture","status","PASSED","fixtureUuid","stopFixture","stop","writeFixture","err","FAILED","statusDetails","SKIPPED","opts","skipInfo","message","startStep","actor","handleRuntimeMessage","applyRuntimeMessages","testUuid"],"sources":["../../src/reporter.ts"],"sourcesContent":["import { event } from \"codeceptjs\";\nimport path from \"node:path\";\nimport { LabelName, Stage, Status } from \"allure-js-commons\";\nimport { type RuntimeMessage, extractMetadataFromString, getMessageAndTraceFromError } from \"allure-js-commons/sdk\";\nimport { FileSystemWriter, MessageWriter, ReporterRuntime, md5 } from \"allure-js-commons/sdk/reporter\";\nimport { extractMeta } from \"./helpers.js\";\nimport type { AllureCodeceptJsConfig, CodeceptError, CodeceptHook, CodeceptStep, CodeceptTest } from \"./model.js\";\n\nexport class AllureCodeceptJsReporter {\n allureRuntime?: ReporterRuntime;\n currentAllureResultUuid?: string;\n currentTest: CodeceptTest | null = null;\n config!: AllureCodeceptJsConfig;\n\n constructor(config: AllureCodeceptJsConfig) {\n this.registerEvents();\n this.config = config || {};\n this.allureRuntime = new ReporterRuntime({\n ...config,\n writer: config.testMode\n ? new MessageWriter()\n : new FileSystemWriter({\n resultsDir: config.resultsDir || \"./allure-results\",\n }),\n });\n }\n\n private closeCurrentAllureTest(test: CodeceptTest) {\n if (!this.currentAllureResultUuid) {\n return;\n }\n\n this.allureRuntime!.updateTest((result) => {\n result.stage = Stage.FINISHED;\n\n // @ts-ignore\n if (test._retries <= 0) {\n return;\n }\n\n // @ts-ignore\n result.parameters!.push({ name: \"Repetition\", value: `${test.retryNum + 1}` });\n }, this.currentAllureResultUuid);\n\n this.allureRuntime!.stopTest({ uuid: this.currentAllureResultUuid });\n this.allureRuntime!.writeTest(this.currentAllureResultUuid);\n this.currentAllureResultUuid = undefined;\n }\n\n private startAllureTest(test: CodeceptTest) {\n const relativeFile = path.relative(codecept_dir, test.file!).split(path.sep).join(\"/\");\n const fullName = `${relativeFile}#${test.title}`;\n const titleMetadata = extractMetadataFromString(test.title);\n // @ts-ignore\n const { labels } = extractMeta(test);\n\n this.currentAllureResultUuid = this.allureRuntime!.startTest({\n name: titleMetadata.cleanTitle,\n fullName,\n testCaseId: md5(fullName),\n });\n\n this.allureRuntime!.updateTest((result) => {\n result.labels.push(...labels);\n result.labels.push(...titleMetadata.labels);\n result.labels.push({ name: LabelName.LANGUAGE, value: \"javascript\" });\n result.labels.push({ name: LabelName.FRAMEWORK, value: \"codeceptjs\" });\n\n if (test?.parent?.title) {\n result.labels.push({\n name: LabelName.SUITE,\n value: test.parent.title,\n });\n }\n }, this.currentAllureResultUuid);\n }\n\n private closeCurrentAllureStep() {\n if (!this.currentAllureResultUuid) {\n return;\n }\n\n this.allureRuntime!.updateStep((result) => {\n result.stage = Stage.FINISHED;\n }, this.currentAllureResultUuid);\n this.allureRuntime!.stopStep({ uuid: this.currentAllureResultUuid });\n }\n\n registerEvents() {\n // Hooks\n event.dispatcher.addListener(event.hook.started, this.hookStarted.bind(this));\n event.dispatcher.addListener(event.hook.passed, this.hookPassed.bind(this));\n // Suite\n event.dispatcher.addListener(event.suite.before, this.suiteBefore.bind(this));\n event.dispatcher.addListener(event.suite.after, this.suiteAfter.bind(this));\n // Test\n event.dispatcher.addListener(event.test.started, this.testStarted.bind(this));\n event.dispatcher.addListener(event.test.skipped, this.testSkipped.bind(this));\n event.dispatcher.addListener(event.test.passed, this.testPassed.bind(this));\n event.dispatcher.addListener(event.test.failed, this.testFailed.bind(this));\n // Step\n event.dispatcher.addListener(event.step.started, this.stepStarted.bind(this));\n event.dispatcher.addListener(event.step.passed, this.stepPassed.bind(this));\n event.dispatcher.addListener(event.step.failed, this.stepFailed.bind(this));\n event.dispatcher.addListener(event.step.comment, this.stepComment.bind(this));\n }\n\n suiteBefore() {\n this.allureRuntime!.startScope();\n }\n\n suiteAfter() {\n this.allureRuntime!.writeScope();\n }\n\n hookStarted(hook: CodeceptHook) {\n const currentRunnable = hook?.ctx?.test;\n const hookType = currentRunnable!.title.match(/^\"(?<hookType>.+)\" hook/)!.groups!.hookType;\n const fixtureType = /before/.test(hookType) ? \"before\" : \"after\";\n\n this.allureRuntime!.startFixture(fixtureType, {\n name: currentRunnable!.title,\n stage: Stage.RUNNING,\n start: Date.now(),\n });\n }\n\n hookPassed() {\n this.allureRuntime!.updateFixture((result) => {\n result.status = Status.PASSED;\n result.stage = Stage.FINISHED;\n });\n\n const fixtureUuid = this.allureRuntime!.stopFixture({ stop: Date.now() });\n\n this.allureRuntime!.writeFixture(fixtureUuid);\n }\n\n testStarted(test: CodeceptTest & { tags: string[] }) {\n // test has been already started\n if (this.currentAllureResultUuid) {\n return;\n }\n\n this.startAllureTest(test);\n }\n\n testFailed(test: CodeceptTest, err: CodeceptError) {\n if (!this.currentAllureResultUuid) {\n return;\n }\n\n this.allureRuntime!.updateTest((result) => {\n result.status = Status.FAILED;\n // @ts-ignore\n result.statusDetails = getMessageAndTraceFromError(err);\n }, this.currentAllureResultUuid);\n this.closeCurrentAllureTest(test);\n }\n\n testPassed(test: CodeceptTest) {\n if (!this.currentAllureResultUuid) {\n return;\n }\n\n this.allureRuntime!.updateTest((result) => {\n result.status = Status.PASSED;\n }, this.currentAllureResultUuid);\n this.closeCurrentAllureTest(test);\n }\n\n testSkipped(\n test: CodeceptTest & {\n opts: {\n skipInfo: {\n message: string;\n isFastSkipped: boolean;\n };\n };\n },\n ) {\n if (!this.currentAllureResultUuid) {\n return;\n }\n\n this.allureRuntime!.updateTest((result) => {\n result.status = Status.SKIPPED;\n\n if (test.opts.skipInfo) {\n result.statusDetails = { message: test.opts.skipInfo.message };\n }\n }, this.currentAllureResultUuid);\n this.closeCurrentAllureTest(test);\n }\n\n stepStarted(step: CodeceptStep) {\n this.allureRuntime!.startStep(\n {\n name: `${step.actor} ${step.name}`,\n },\n this.currentAllureResultUuid!,\n );\n }\n\n stepFailed() {\n this.allureRuntime!.updateStep((result) => {\n result.status = Status.FAILED;\n }, this.currentAllureResultUuid!);\n this.closeCurrentAllureStep();\n }\n\n stepComment() {\n this.allureRuntime!.updateStep((result) => {\n result.status = Status.PASSED;\n }, this.currentAllureResultUuid!);\n this.closeCurrentAllureStep();\n }\n\n stepPassed() {\n this.allureRuntime!.updateStep((result) => {\n result.status = Status.PASSED;\n }, this.currentAllureResultUuid!);\n this.closeCurrentAllureStep();\n }\n\n // TODO: not implemented in the new version at all\n // addScreenDiff(name: string, expectedImg: string, actualImg: string, diffImg: string) {\n // const screenDiff = {\n // name,\n // expected: `data:image/png;base64,${expectedImg}`,\n // actual: `data:image/png;base64,${actualImg}`,\n // diff: `data:image/png;base64,${diffImg}`,\n // };\n // this.addAttachment(name, JSON.stringify(screenDiff), \"application/vnd.allure.image.diff\");\n // }\n\n handleRuntimeMessage(message: RuntimeMessage) {\n this.allureRuntime!.applyRuntimeMessages([message], { testUuid: this.currentAllureResultUuid! });\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAASA,KAAK,QAAQ,YAAY;AAClC,OAAOC,IAAI,MAAM,WAAW;AAC5B,SAASC,SAAS,EAAEC,KAAK,EAAEC,MAAM,QAAQ,mBAAmB;AAC5D,SAA8BC,yBAAyB,EAAEC,2BAA2B,QAAQ,uBAAuB;AACnH,SAASC,gBAAgB,EAAEC,aAAa,EAAEC,eAAe,EAAEC,GAAG,QAAQ,gCAAgC;AACtG,SAASC,WAAW,QAAQ,cAAc;AAG1C,OAAO,MAAMC,wBAAwB,CAAC;EAMpCC,WAAWA,CAACC,MAA8B,EAAE;IAAAC,eAAA;IAAAA,eAAA;IAAAA,eAAA,sBAHT,IAAI;IAAAA,eAAA;IAIrC,IAAI,CAACC,cAAc,CAAC,CAAC;IACrB,IAAI,CAACF,MAAM,GAAGA,MAAM,IAAI,CAAC,CAAC;IAC1B,IAAI,CAACG,aAAa,GAAG,IAAIR,eAAe,CAAAS,aAAA,CAAAA,aAAA,KACnCJ,MAAM;MACTK,MAAM,EAAEL,MAAM,CAACM,QAAQ,GAC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,IAAI,CAACtE,aAAa,CAAE4C,UAAU,CAAEnC,MAAM,IAAK;MACzCA,MAAM,CAAC8E,MAAM,GAAGpG,MAAM,CAACqG,MAAM;IAC/B,CAAC,EAAE,IAAI,CAACjF,uBAAwB,CAAC;IACjC,IAAI,CAACoC,sBAAsB,CAAC,CAAC;EAC/B;EAEAwB,UAAUA,CAAA,EAAG;IACX,IAAI,CAACnE,aAAa,CAAE4C,UAAU,CAAEnC,MAAM,IAAK;MACzCA,MAAM,CAAC8E,MAAM,GAAGpG,MAAM,CAACqG,MAAM;IAC/B,CAAC,EAAE,IAAI,CAACjF,uBAAwB,CAAC;IACjC,IAAI,CAACoC,sBAAsB,CAAC,CAAC;EAC/B;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA2D,oBAAoBA,CAACH,OAAuB,EAAE;IAC5C,IAAI,CAACnG,aAAa,CAAEuG,oBAAoB,CAAC,CAACJ,OAAO,CAAC,EAAE;MAAEK,QAAQ,EAAE,IAAI,CAACjG;IAAyB,CAAC,CAAC;EAClG;AACF","ignoreList":[]}
@@ -11,6 +11,8 @@ export declare class AllureCodeceptJsReporter {
11
11
  private startAllureTest;
12
12
  private closeCurrentAllureStep;
13
13
  registerEvents(): void;
14
+ suiteBefore(): void;
15
+ suiteAfter(): void;
14
16
  hookStarted(hook: CodeceptHook): void;
15
17
  hookPassed(): void;
16
18
  testStarted(test: CodeceptTest & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allure-codeceptjs",
3
- "version": "3.0.0-beta.2",
3
+ "version": "3.0.0-beta.3",
4
4
  "description": "Allure codeceptjs integration",
5
5
  "keywords": [
6
6
  "codeceptjs",
@@ -38,7 +38,7 @@
38
38
  "test": "vitest run"
39
39
  },
40
40
  "dependencies": {
41
- "allure-js-commons": "3.0.0-beta.2"
41
+ "allure-js-commons": "3.0.0-beta.3"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@babel/cli": "^7.24.6",