allure-cucumberjs 3.13.0 → 3.15.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 CHANGED
@@ -37,7 +37,7 @@ npm install -D allure-cucumberjs
37
37
 
38
38
  Install Allure Report separately when you want to render the generated `allure-results`:
39
39
 
40
- - follow the [Allure Report 2 installation guide](https://allurereport.org/docs/install/) to use the `allure` CLI
40
+ - follow the [Allure Report 2 installation guide](https://allurereport.org/docs/v2/install/) to use the `allure` CLI
41
41
  - or install Allure Report 3 with `npm install -D allure` to use `npx allure`
42
42
 
43
43
  ## Supported versions and platforms
@@ -27,6 +27,7 @@ class AllureCucumberWorld extends _cucumber.World {
27
27
  /**
28
28
  * @deprecated please use import { link } from "allure-js-commons" instead.
29
29
  */
30
+ // @ts-ignore cucumber >= 10.9 declares World.link as (text: string) => void
30
31
  _defineProperty(this, "link", (type, url, name) => Promise.resolve(allure.link(url, name, type)));
31
32
  /**
32
33
  * @deprecated please use import { parameter } from "allure-js-commons" instead.
@@ -1 +1 @@
1
- {"version":3,"file":"legacy.js","names":["_cucumber","require","allure","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_defineProperty","_toPropertyKey","value","enumerable","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","AllureCucumberWorld","World","constructor","arguments","name","Promise","resolve","label","type","url","link","options","parameter","description","html","descriptionHtml","id","testCaseId","historyId","allureId","displayName","content","attachment","contentType","issue","tms","epic","feature","story","suite","parentSuite","subSuite","owner","severity","layer","tag","body","step","exports"],"sources":["../../src/legacy.ts"],"sourcesContent":["import { World } from \"@cucumber/cucumber\";\nimport * as allure from \"allure-js-commons\";\nimport type { ParameterOptions } from \"allure-js-commons\";\n\n/**\n * @deprecated please use api exported by \"allure-js-commons\" instead.\n */\nexport interface AllureCucumberLegacyApi {\n label: (name: string, value: string) => Promise<void>;\n link: (type: string, url: string, name?: string) => Promise<void>;\n parameter: (name: string, value: string, options?: ParameterOptions) => Promise<void>;\n description: (markdown: string) => Promise<void>;\n descriptionHtml: (html: string) => Promise<void>;\n testCaseId: (id: string) => Promise<void>;\n historyId: (id: string) => Promise<void>;\n allureId: (id: string) => Promise<void>;\n displayName: (name: string) => Promise<void>;\n attachment: (name: string, content: Buffer | string, type: string) => Promise<void>;\n issue: (name: string, url: string) => Promise<void>;\n tms: (name: string, url: string) => Promise<void>;\n epic: (name: string) => Promise<void>;\n feature: (name: string) => Promise<void>;\n story: (name: string) => Promise<void>;\n suite: (name: string) => Promise<void>;\n parentSuite: (name: string) => Promise<void>;\n subSuite: (name: string) => Promise<void>;\n owner: (name: string) => Promise<void>;\n severity: (name: string) => Promise<void>;\n layer: (name: string) => Promise<void>;\n tag: (name: string) => Promise<void>;\n step: (name: string, body: () => Promise<void>) => Promise<void>;\n}\n\n/**\n * @deprecated please use api exported by \"allure-js-commons\" instead.\n */\nexport class AllureCucumberWorld extends World implements AllureCucumberLegacyApi {\n /**\n * @deprecated please use import { label } from \"allure-js-commons\" instead.\n */\n label = (name: string, value: string) => Promise.resolve(allure.label(name, value));\n /**\n * @deprecated please use import { link } from \"allure-js-commons\" instead.\n */\n link = (type: string, url: string, name?: string) => Promise.resolve(allure.link(url, name, type));\n /**\n * @deprecated please use import { parameter } from \"allure-js-commons\" instead.\n */\n parameter = (name: string, value: string, options?: ParameterOptions) =>\n Promise.resolve(allure.parameter(name, value, options));\n /**\n * @deprecated please use import { description } from \"allure-js-commons\" instead.\n */\n description = (value: string) => Promise.resolve(allure.description(value));\n /**\n * @deprecated please use import { descriptionHtml } from \"allure-js-commons\" instead.\n */\n descriptionHtml = (html: string) => Promise.resolve(allure.descriptionHtml(html));\n /**\n * @deprecated please use import { testCaseId } from \"allure-js-commons\" instead.\n */\n testCaseId = (id: string) => Promise.resolve(allure.testCaseId(id));\n /**\n * @deprecated please use import { historyId } from \"allure-js-commons\" instead.\n */\n historyId = (id: string) => Promise.resolve(allure.historyId(id));\n /**\n * @deprecated please use import { allureId } from \"allure-js-commons\" instead.\n */\n allureId = (id: string) => Promise.resolve(allure.allureId(id));\n /**\n * @deprecated please use import { displayName } from \"allure-js-commons\" instead.\n */\n displayName = (name: string) => Promise.resolve(allure.displayName(name));\n /**\n * @deprecated please use import { attachment } from \"allure-js-commons\" instead.\n */\n attachment = (name: string, content: Buffer | string, type: string) =>\n Promise.resolve(allure.attachment(name, content, { contentType: type }));\n /**\n * @deprecated please use import { issue } from \"allure-js-commons\" instead.\n */\n issue = (name: string, url: string) => Promise.resolve(allure.issue(url, name));\n /**\n * @deprecated please use import { tms } from \"allure-js-commons\" instead.\n */\n tms = (name: string, url: string) => Promise.resolve(allure.tms(url, name));\n /**\n * @deprecated please use import { epic } from \"allure-js-commons\" instead.\n */\n epic = (name: string) => Promise.resolve(allure.epic(name));\n /**\n * @deprecated please use import { feature } from \"allure-js-commons\" instead.\n */\n feature = (name: string) => Promise.resolve(allure.feature(name));\n /**\n * @deprecated please use import { story } from \"allure-js-commons\" instead.\n */\n story = (name: string) => Promise.resolve(allure.story(name));\n /**\n * @deprecated please use import { suite } from \"allure-js-commons\" instead.\n */\n suite = (name: string) => Promise.resolve(allure.suite(name));\n /**\n * @deprecated please use import { parentSuite } from \"allure-js-commons\" instead.\n */\n parentSuite = (name: string) => Promise.resolve(allure.parentSuite(name));\n /**\n * @deprecated please use import { subSuite } from \"allure-js-commons\" instead.\n */\n subSuite = (name: string) => Promise.resolve(allure.subSuite(name));\n /**\n * @deprecated please use import { owner } from \"allure-js-commons\" instead.\n */\n owner = (name: string) => Promise.resolve(allure.owner(name));\n /**\n * @deprecated please use import { severity } from \"allure-js-commons\" instead.\n */\n severity = (name: string) => Promise.resolve(allure.severity(name));\n /**\n * @deprecated please use import { layer } from \"allure-js-commons\" instead.\n */\n layer = (name: string) => Promise.resolve(allure.layer(name));\n /**\n * @deprecated please use import { tag } from \"allure-js-commons\" instead.\n */\n tag = (name: string) => Promise.resolve(allure.tag(name));\n /**\n * @deprecated please use import { step } from \"allure-js-commons\" instead.\n */\n step = (name: string, body: () => any) => Promise.resolve(allure.step(name, body));\n}\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAA4C,SAAAE,wBAAAC,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAH,uBAAA,YAAAA,wBAAAC,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,cAAAM,EAAA,IAAAd,CAAA,gBAAAc,EAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,EAAA,OAAAP,CAAA,IAAAD,CAAA,GAAAW,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAnB,CAAA,EAAAc,EAAA,OAAAP,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAM,EAAA,EAAAP,CAAA,IAAAC,CAAA,CAAAM,EAAA,IAAAd,CAAA,CAAAc,EAAA,WAAAN,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAAA,SAAAmB,gBAAApB,CAAA,EAAAG,CAAA,EAAAF,CAAA,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,cAGOgB,IAAY,IAAKC,OAAO,CAACC,OAAO,CAACxC,MAAM,CAACqE,GAAG,CAAC/B,IAAI,CAAC,CAAC;IACzD;AACF;AACA;IAFEhB,eAAA,eAGO,CAACgB,IAAY,EAAEgC,IAAe,KAAK/B,OAAO,CAACC,OAAO,CAACxC,MAAM,CAACuE,IAAI,CAACjC,IAAI,EAAEgC,IAAI,CAAC,CAAC;EAAA;AACpF;AAACE,OAAA,CAAAtC,mBAAA,GAAAA,mBAAA","ignoreList":[]}
1
+ {"version":3,"file":"legacy.js","names":["_cucumber","require","allure","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_defineProperty","_toPropertyKey","value","enumerable","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","AllureCucumberWorld","World","constructor","arguments","name","Promise","resolve","label","type","url","link","options","parameter","description","html","descriptionHtml","id","testCaseId","historyId","allureId","displayName","content","attachment","contentType","issue","tms","epic","feature","story","suite","parentSuite","subSuite","owner","severity","layer","tag","body","step","exports"],"sources":["../../src/legacy.ts"],"sourcesContent":["import { World } from \"@cucumber/cucumber\";\nimport * as allure from \"allure-js-commons\";\nimport type { ParameterOptions } from \"allure-js-commons\";\n\n/**\n * @deprecated please use api exported by \"allure-js-commons\" instead.\n */\nexport interface AllureCucumberLegacyApi {\n label: (name: string, value: string) => Promise<void>;\n link: (type: string, url: string, name?: string) => Promise<void>;\n parameter: (name: string, value: string, options?: ParameterOptions) => Promise<void>;\n description: (markdown: string) => Promise<void>;\n descriptionHtml: (html: string) => Promise<void>;\n testCaseId: (id: string) => Promise<void>;\n historyId: (id: string) => Promise<void>;\n allureId: (id: string) => Promise<void>;\n displayName: (name: string) => Promise<void>;\n attachment: (name: string, content: Buffer | string, type: string) => Promise<void>;\n issue: (name: string, url: string) => Promise<void>;\n tms: (name: string, url: string) => Promise<void>;\n epic: (name: string) => Promise<void>;\n feature: (name: string) => Promise<void>;\n story: (name: string) => Promise<void>;\n suite: (name: string) => Promise<void>;\n parentSuite: (name: string) => Promise<void>;\n subSuite: (name: string) => Promise<void>;\n owner: (name: string) => Promise<void>;\n severity: (name: string) => Promise<void>;\n layer: (name: string) => Promise<void>;\n tag: (name: string) => Promise<void>;\n step: (name: string, body: () => Promise<void>) => Promise<void>;\n}\n\n/**\n * @deprecated please use api exported by \"allure-js-commons\" instead.\n */\nexport class AllureCucumberWorld extends World implements AllureCucumberLegacyApi {\n /**\n * @deprecated please use import { label } from \"allure-js-commons\" instead.\n */\n label = (name: string, value: string) => Promise.resolve(allure.label(name, value));\n /**\n * @deprecated please use import { link } from \"allure-js-commons\" instead.\n */\n // @ts-ignore cucumber >= 10.9 declares World.link as (text: string) => void\n link = (type: string, url: string, name?: string) => Promise.resolve(allure.link(url, name, type));\n /**\n * @deprecated please use import { parameter } from \"allure-js-commons\" instead.\n */\n parameter = (name: string, value: string, options?: ParameterOptions) =>\n Promise.resolve(allure.parameter(name, value, options));\n /**\n * @deprecated please use import { description } from \"allure-js-commons\" instead.\n */\n description = (value: string) => Promise.resolve(allure.description(value));\n /**\n * @deprecated please use import { descriptionHtml } from \"allure-js-commons\" instead.\n */\n descriptionHtml = (html: string) => Promise.resolve(allure.descriptionHtml(html));\n /**\n * @deprecated please use import { testCaseId } from \"allure-js-commons\" instead.\n */\n testCaseId = (id: string) => Promise.resolve(allure.testCaseId(id));\n /**\n * @deprecated please use import { historyId } from \"allure-js-commons\" instead.\n */\n historyId = (id: string) => Promise.resolve(allure.historyId(id));\n /**\n * @deprecated please use import { allureId } from \"allure-js-commons\" instead.\n */\n allureId = (id: string) => Promise.resolve(allure.allureId(id));\n /**\n * @deprecated please use import { displayName } from \"allure-js-commons\" instead.\n */\n displayName = (name: string) => Promise.resolve(allure.displayName(name));\n /**\n * @deprecated please use import { attachment } from \"allure-js-commons\" instead.\n */\n attachment = (name: string, content: Buffer | string, type: string) =>\n Promise.resolve(allure.attachment(name, content, { contentType: type }));\n /**\n * @deprecated please use import { issue } from \"allure-js-commons\" instead.\n */\n issue = (name: string, url: string) => Promise.resolve(allure.issue(url, name));\n /**\n * @deprecated please use import { tms } from \"allure-js-commons\" instead.\n */\n tms = (name: string, url: string) => Promise.resolve(allure.tms(url, name));\n /**\n * @deprecated please use import { epic } from \"allure-js-commons\" instead.\n */\n epic = (name: string) => Promise.resolve(allure.epic(name));\n /**\n * @deprecated please use import { feature } from \"allure-js-commons\" instead.\n */\n feature = (name: string) => Promise.resolve(allure.feature(name));\n /**\n * @deprecated please use import { story } from \"allure-js-commons\" instead.\n */\n story = (name: string) => Promise.resolve(allure.story(name));\n /**\n * @deprecated please use import { suite } from \"allure-js-commons\" instead.\n */\n suite = (name: string) => Promise.resolve(allure.suite(name));\n /**\n * @deprecated please use import { parentSuite } from \"allure-js-commons\" instead.\n */\n parentSuite = (name: string) => Promise.resolve(allure.parentSuite(name));\n /**\n * @deprecated please use import { subSuite } from \"allure-js-commons\" instead.\n */\n subSuite = (name: string) => Promise.resolve(allure.subSuite(name));\n /**\n * @deprecated please use import { owner } from \"allure-js-commons\" instead.\n */\n owner = (name: string) => Promise.resolve(allure.owner(name));\n /**\n * @deprecated please use import { severity } from \"allure-js-commons\" instead.\n */\n severity = (name: string) => Promise.resolve(allure.severity(name));\n /**\n * @deprecated please use import { layer } from \"allure-js-commons\" instead.\n */\n layer = (name: string) => Promise.resolve(allure.layer(name));\n /**\n * @deprecated please use import { tag } from \"allure-js-commons\" instead.\n */\n tag = (name: string) => Promise.resolve(allure.tag(name));\n /**\n * @deprecated please use import { step } from \"allure-js-commons\" instead.\n */\n step = (name: string, body: () => any) => Promise.resolve(allure.step(name, body));\n}\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAA4C,SAAAE,wBAAAC,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA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","ignoreList":[]}
@@ -20,6 +20,10 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
20
20
  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; }
21
21
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
22
22
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
23
+ var UNDEFINED_STEP_MESSAGE = "The step doesn't have an implementation.";
24
+ var UNDEFINED_TEST_MESSAGE = "The test doesn't have an implementation.";
25
+ var PENDING_STEP_MESSAGE = "The step is pending.";
26
+ var AMBIGUOUS_STEP_MESSAGE = "The step is ambiguous.";
23
27
  class AllureCucumberReporter extends _cucumber.Formatter {
24
28
  constructor(options) {
25
29
  super(options);
@@ -32,13 +36,19 @@ class AllureCucumberReporter extends _cucumber.Formatter {
32
36
  _defineProperty(this, "scenarioMap", new Map());
33
37
  _defineProperty(this, "stepMap", new Map());
34
38
  _defineProperty(this, "testStepMap", new Map());
39
+ _defineProperty(this, "stepDefinitionMap", new Map());
35
40
  _defineProperty(this, "pickleStepMap", new Map());
36
41
  _defineProperty(this, "pickleMap", new Map());
37
42
  _defineProperty(this, "testCaseMap", new Map());
38
- _defineProperty(this, "testCaseStartedMap", new Map());
43
+ _defineProperty(this, "featureNamesByTestCaseStartedId", new Map());
39
44
  _defineProperty(this, "testResultUuids", new Map());
40
45
  _defineProperty(this, "scopeUuids", new Map());
41
46
  _defineProperty(this, "fixtureUuids", new Map());
47
+ _defineProperty(this, "testRunHookTypes", new Map());
48
+ _defineProperty(this, "testRunHookStartedMap", new Map());
49
+ // executions of test run hooks running in this process, by hook id
50
+ _defineProperty(this, "runningTestRunHooks", new Map());
51
+ _defineProperty(this, "reportedTestRunHookStartedIds", new Set());
42
52
  var _ref = options.parsedArgvOptions,
43
53
  {
44
54
  resultsDir,
@@ -97,34 +107,34 @@ class AllureCucumberReporter extends _cucumber.Formatter {
97
107
  var runTestRunHook = this.runTestRunHook.bind(this);
98
108
  var runCallbackTestRunHook = this.runCallbackTestRunHook.bind(this);
99
109
  hook.code = originalCode.length > 0 ? function (callback) {
100
- return runCallbackTestRunHook(hookName, originalCode, this, callback);
110
+ return runCallbackTestRunHook(hook.id, hookName, originalCode, this, callback);
101
111
  } : function () {
102
- return runTestRunHook(hookName, () => originalCode.call(this));
112
+ return runTestRunHook(hook.id, hookName, () => originalCode.call(this));
103
113
  };
104
114
  });
105
115
  }
106
- runTestRunHook(name, runHook) {
116
+ runTestRunHook(hookId, name, runHook) {
107
117
  try {
108
118
  var result = runHook();
109
119
  if (isPromiseLike(result)) {
110
120
  return result.then(value => value, error => {
111
- this.emitTestRunHookGlobalError(name, error);
121
+ this.emitTestRunHookGlobalError(hookId, name, error);
112
122
  return deferReject(error);
113
123
  });
114
124
  }
115
125
  return result;
116
126
  } catch (error) {
117
- this.emitTestRunHookGlobalError(name, error);
127
+ this.emitTestRunHookGlobalError(hookId, name, error);
118
128
  return deferReject(error);
119
129
  }
120
130
  }
121
- runCallbackTestRunHook(name, originalCode, thisArg, callback) {
131
+ runCallbackTestRunHook(hookId, name, originalCode, thisArg, callback) {
122
132
  var finished = false;
123
133
  var finish = (error, result) => {
124
134
  if (!finished) {
125
135
  finished = true;
126
136
  if (error) {
127
- this.emitTestRunHookGlobalError(name, error);
137
+ this.emitTestRunHookGlobalError(hookId, name, error);
128
138
  }
129
139
  }
130
140
  if (error) {
@@ -144,8 +154,17 @@ class AllureCucumberReporter extends _cucumber.Formatter {
144
154
  throw error;
145
155
  }
146
156
  }
147
- emitTestRunHookGlobalError(name, error) {
148
- this.allureRuntime.applyGlobalRuntimeMessages([toGlobalErrorMessage(name, (0, _sdk.getMessageAndTraceFromError)(this.toError(error)))]);
157
+ emitTestRunHookGlobalError(hookId, name, error) {
158
+ // the same execution is reported again with the testRunHookFinished message (Cucumber 12.3+)
159
+ var testRunHookStartedId = this.runningTestRunHooks.get(hookId);
160
+ if (testRunHookStartedId) {
161
+ this.reportedTestRunHookStartedIds.add(testRunHookStartedId);
162
+ }
163
+ this.allureRuntime.applyGlobalRuntimeMessages([(0, _sdk.toGlobalErrorMessage)({
164
+ name,
165
+ details: (0, _sdk.getMessageAndTraceFromError)(this.toError(error)),
166
+ status: (0, _sdk.getStatusFromError)(error)
167
+ })]);
149
168
  }
150
169
  toError(error) {
151
170
  if (error instanceof Error) {
@@ -155,6 +174,19 @@ class AllureCucumberReporter extends _cucumber.Formatter {
155
174
  }
156
175
  parseEnvelope(envelope) {
157
176
  switch (true) {
177
+ case !!envelope.stepDefinition:
178
+ this.stepDefinitionMap.set(envelope.stepDefinition.id, envelope.stepDefinition);
179
+ break;
180
+ case !!envelope.hook:
181
+ this.testRunHookTypes.set(envelope.hook.id, envelope.hook.type);
182
+ break;
183
+ case !!envelope.testRunHookStarted:
184
+ this.testRunHookStartedMap.set(envelope.testRunHookStarted.id, envelope.testRunHookStarted.hookId);
185
+ this.runningTestRunHooks.set(envelope.testRunHookStarted.hookId, envelope.testRunHookStarted.id);
186
+ break;
187
+ case !!envelope.testRunHookFinished:
188
+ this.onTestRunHookFinished(envelope.testRunHookFinished);
189
+ break;
158
190
  case !!envelope.gherkinDocument:
159
191
  this.onGherkinDocument(envelope.gherkinDocument);
160
192
  break;
@@ -219,9 +251,16 @@ class AllureCucumberReporter extends _cucumber.Formatter {
219
251
  var matchedTags = tags.filter(tag => matcher.pattern.some(pattern => pattern.test(tag.name)));
220
252
  var matchedLinks = matchedTags.map(tag => {
221
253
  var tagValue = tag.name.replace(tagKeyRe, "");
254
+ if ((0, _reporter.isUrl)(tagValue)) {
255
+ return {
256
+ url: tagValue,
257
+ type
258
+ };
259
+ }
222
260
  return {
223
261
  url: (0, _reporter.applyLinkTemplate)(matcher.urlTemplate, tagValue) || tagValue,
224
- type
262
+ type,
263
+ name: matcher.nameTemplate !== undefined ? (0, _reporter.applyLinkTemplate)(matcher.nameTemplate, tagValue) : undefined
225
264
  };
226
265
  });
227
266
  links.push(...matchedLinks);
@@ -236,8 +275,14 @@ class AllureCucumberReporter extends _cucumber.Formatter {
236
275
  case _messages.TestStepResultStatus.PASSED:
237
276
  return _allureJsCommons.Status.PASSED;
238
277
  case _messages.TestStepResultStatus.SKIPPED:
239
- case _messages.TestStepResultStatus.PENDING:
240
278
  return _allureJsCommons.Status.SKIPPED;
279
+ // Cucumber's definition statuses fail strict runs. Since this reporter
280
+ // derives scenario status from steps, they must outrank passed steps.
281
+ case _messages.TestStepResultStatus.AMBIGUOUS:
282
+ case _messages.TestStepResultStatus.PENDING:
283
+ case _messages.TestStepResultStatus.UNDEFINED:
284
+ case _messages.TestStepResultStatus.UNKNOWN:
285
+ return _allureJsCommons.Status.BROKEN;
241
286
  default:
242
287
  return undefined;
243
288
  }
@@ -307,12 +352,6 @@ class AllureCucumberReporter extends _cucumber.Formatter {
307
352
  };
308
353
  result.labels.push(...(0, _reporter.getEnvironmentLabels)());
309
354
  result.labels.push((0, _reporter.getLanguageLabel)(), (0, _reporter.getFrameworkLabel)("cucumberjs"), (0, _reporter.getPackageLabel)((0, _utils.getPathRelativeToProjectRoot)(pickle)), (0, _reporter.getFallbackTestCaseIdLabel)(legacyTestCaseId), (0, _reporter.getHostLabel)(), (0, _reporter.getThreadLabel)(data.workerId));
310
- if (doc !== null && doc !== void 0 && doc.feature) {
311
- result.labels.push({
312
- name: _allureJsCommons.LabelName.FEATURE,
313
- value: doc.feature.name
314
- });
315
- }
316
355
  var pickleLabels = this.parsePickleTags(pickle.tags || []);
317
356
  var featureLabels = this.parseTagsLabels((doc === null || doc === void 0 || (_doc$feature2 = doc.feature) === null || _doc$feature2 === void 0 ? void 0 : _doc$feature2.tags) || []);
318
357
  var featureLinks = this.parseTagsLinks((doc === null || doc === void 0 || (_doc$feature3 = doc.feature) === null || _doc$feature3 === void 0 ? void 0 : _doc$feature3.tags) || []);
@@ -328,7 +367,9 @@ class AllureCucumberReporter extends _cucumber.Formatter {
328
367
  this.scopeUuids.set(data.id, scopeUuid);
329
368
  var testUuid = this.allureRuntime.startTest(result, [scopeUuid]);
330
369
  this.testResultUuids.set(data.id, testUuid);
331
- this.testCaseStartedMap.set(data.id, data);
370
+ if (doc !== null && doc !== void 0 && doc.feature) {
371
+ this.featureNamesByTestCaseStartedId.set(data.id, doc.feature.name);
372
+ }
332
373
  if (!(scenario !== null && scenario !== void 0 && scenario.examples)) {
333
374
  return;
334
375
  }
@@ -336,7 +377,7 @@ class AllureCucumberReporter extends _cucumber.Formatter {
336
377
  var _example$tableHeader, _example$tableBody;
337
378
  var exampleName = example !== null && example !== void 0 && example.name ? "Examples: ".concat(example.name) : "Examples";
338
379
  var parameterNames = example === null || example === void 0 || (_example$tableHeader = example.tableHeader) === null || _example$tableHeader === void 0 ? void 0 : _example$tableHeader.cells.map(cell => cell.value);
339
- var csvDataTableHeader = (parameterNames === null || parameterNames === void 0 ? void 0 : parameterNames.join(",")) || "";
380
+ var csvDataTableHeader = parameterNames ? (0, _utils.serializeCsvRow)(parameterNames) : "";
340
381
  var currentRow = example === null || example === void 0 || (_example$tableBody = example.tableBody) === null || _example$tableBody === void 0 ? void 0 : _example$tableBody.find(tb => astIds.includes(tb.id));
341
382
  if (currentRow) {
342
383
  var parameters = currentRow.cells.map((cell, index) => {
@@ -349,7 +390,7 @@ class AllureCucumberReporter extends _cucumber.Formatter {
349
390
  });
350
391
  _this.allureRuntime.updateTest(testUuid, tr => tr.parameters = [...tr.parameters, ...parameters]);
351
392
  }
352
- var csvDataTableBody = (example === null || example === void 0 ? void 0 : example.tableBody.map(row => row.cells.map(cell => cell.value).join(",")).join("\n")) || "";
393
+ var csvDataTableBody = (example === null || example === void 0 ? void 0 : example.tableBody.map(row => (0, _utils.serializeCsvRow)(row.cells.map(cell => cell.value))).join("\n")) || "";
353
394
  if (!csvDataTableHeader && !csvDataTableBody) {
354
395
  return 1; // continue
355
396
  }
@@ -374,9 +415,14 @@ class AllureCucumberReporter extends _cucumber.Formatter {
374
415
  result.status = (_step$status = step === null || step === void 0 ? void 0 : step.status) !== null && _step$status !== void 0 ? _step$status : _allureJsCommons.Status.PASSED;
375
416
  result.stage = _allureJsCommons.Stage.FINISHED;
376
417
  if (step) {
377
- if (step.status === undefined) {
418
+ var _step$statusDetails;
419
+ if (((_step$statusDetails = step.statusDetails) === null || _step$statusDetails === void 0 ? void 0 : _step$statusDetails.message) === UNDEFINED_STEP_MESSAGE) {
420
+ result.statusDetails = {
421
+ message: UNDEFINED_TEST_MESSAGE
422
+ };
423
+ } else if (step.status === undefined) {
378
424
  result.statusDetails = {
379
- message: "The test doesn't have an implementation."
425
+ message: UNDEFINED_TEST_MESSAGE
380
426
  };
381
427
  } else {
382
428
  result.statusDetails = _objectSpread(_objectSpread({}, result.statusDetails), step.statusDetails);
@@ -386,6 +432,19 @@ class AllureCucumberReporter extends _cucumber.Formatter {
386
432
  this.allureRuntime.stopTest(testUuid, {
387
433
  stop: _messages.TimeConversion.timestampToMillisecondsSinceEpoch(data.timestamp)
388
434
  });
435
+ var featureName = this.featureNamesByTestCaseStartedId.get(data.testCaseStartedId);
436
+ if (featureName !== undefined) {
437
+ this.featureNamesByTestCaseStartedId.delete(data.testCaseStartedId);
438
+ // Runtime and global metadata can supply the feature before the result is written.
439
+ this.allureRuntime.updateTest(testUuid, result => {
440
+ if (!(0, _sdk.hasLabel)(result, _allureJsCommons.LabelName.FEATURE)) {
441
+ result.labels.push({
442
+ name: _allureJsCommons.LabelName.FEATURE,
443
+ value: featureName
444
+ });
445
+ }
446
+ });
447
+ }
389
448
  this.allureRuntime.writeTest(testUuid);
390
449
  this.testResultUuids.delete(data.testCaseStartedId);
391
450
  var scopeUuid = this.scopeUuids.get(data.testCaseStartedId);
@@ -438,7 +497,7 @@ class AllureCucumberReporter extends _cucumber.Formatter {
438
497
  if (!((_stepPickle$argument = stepPickle.argument) !== null && _stepPickle$argument !== void 0 && _stepPickle$argument.dataTable)) {
439
498
  return;
440
499
  }
441
- var csvDataTable = stepPickle.argument.dataTable.rows.reduce((acc, row) => "".concat(acc + row.cells.map(cell => cell.value).join(","), "\n"), "");
500
+ var csvDataTable = stepPickle.argument.dataTable.rows.reduce((acc, row) => "".concat(acc + (0, _utils.serializeCsvRow)(row.cells.map(cell => cell.value)), "\n"), "");
442
501
  this.allureRuntime.writeAttachment(testUuid, stepUuid, "Data table", Buffer.from(csvDataTable, "utf-8"), {
443
502
  contentType: _allureJsCommons.ContentType.CSV,
444
503
  fileExtension: ".csv"
@@ -465,7 +524,11 @@ class AllureCucumberReporter extends _cucumber.Formatter {
465
524
  }
466
525
  });
467
526
  if (error) {
468
- this.allureRuntime.applyGlobalRuntimeMessages([toGlobalErrorMessage(this.getHookName(step.hookId), (0, _sdk.getMessageAndTraceFromError)(error))]);
527
+ this.allureRuntime.applyGlobalRuntimeMessages([(0, _sdk.toGlobalErrorMessage)({
528
+ name: this.getHookName(step.hookId),
529
+ details: (0, _sdk.getMessageAndTraceFromError)(error),
530
+ status: status !== null && status !== void 0 ? status : (0, _sdk.getStatusFromError)(error)
531
+ })]);
469
532
  }
470
533
  this.allureRuntime.stopFixture(fixtureUuid, {
471
534
  stop: _messages.TimeConversion.timestampToMillisecondsSinceEpoch(data.timestamp)
@@ -481,9 +544,23 @@ class AllureCucumberReporter extends _cucumber.Formatter {
481
544
  this.allureRuntime.updateStep(currentStep, r => {
482
545
  r.status = status;
483
546
  r.stage = stage;
484
- if (status === undefined) {
547
+ if (data.testStepResult.status === _messages.TestStepResultStatus.UNDEFINED || status === undefined) {
485
548
  r.statusDetails = {
486
- message: "The step doesn't have an implementation."
549
+ message: UNDEFINED_STEP_MESSAGE
550
+ };
551
+ return;
552
+ }
553
+ if (data.testStepResult.status === _messages.TestStepResultStatus.PENDING) {
554
+ var _data$testStepResult$;
555
+ r.statusDetails = {
556
+ message: (_data$testStepResult$ = data.testStepResult.message) !== null && _data$testStepResult$ !== void 0 ? _data$testStepResult$ : PENDING_STEP_MESSAGE
557
+ };
558
+ return;
559
+ }
560
+ if (data.testStepResult.status === _messages.TestStepResultStatus.AMBIGUOUS) {
561
+ var _data$testStepResult$2;
562
+ r.statusDetails = {
563
+ message: (_data$testStepResult$2 = data.testStepResult.message) !== null && _data$testStepResult$2 !== void 0 ? _data$testStepResult$2 : this.getAmbiguousStepMessage(step)
487
564
  };
488
565
  return;
489
566
  }
@@ -551,10 +628,56 @@ class AllureCucumberReporter extends _cucumber.Formatter {
551
628
  this.allureRuntime.applyGlobalRuntimeMessages(runtimeMessages);
552
629
  }
553
630
  }
631
+
632
+ // Cucumber 12.3+ reports test run hooks with messages. In parallel mode they run in workers,
633
+ // where the patched hook code isn't used, so the messages are the only source of their errors
634
+ onTestRunHookFinished(data) {
635
+ var _this$exceptionToErro, _data$result$exceptio, _data$result$message;
636
+ var hookId = this.testRunHookStartedMap.get(data.testRunHookStartedId);
637
+ if (hookId && this.runningTestRunHooks.get(hookId) === data.testRunHookStartedId) {
638
+ this.runningTestRunHooks.delete(hookId);
639
+ }
640
+
641
+ // dry runs report every test run hook as skipped
642
+ if (!hookId || data.result.status !== _messages.TestStepResultStatus.FAILED || this.reportedTestRunHookStartedIds.has(data.testRunHookStartedId)) {
643
+ return;
644
+ }
645
+ var name = this.testRunHookTypes.get(hookId) === "AFTER_TEST_RUN" ? "AfterAll hook" : "BeforeAll hook";
646
+ var error = (_this$exceptionToErro = this.exceptionToError((_data$result$exceptio = data.result.exception) === null || _data$result$exceptio === void 0 ? void 0 : _data$result$exceptio.message, data.result.exception)) !== null && _this$exceptionToErro !== void 0 ? _this$exceptionToErro : {
647
+ name: "Error",
648
+ message: (_data$result$message = data.result.message) !== null && _data$result$message !== void 0 ? _data$result$message : ""
649
+ };
650
+ this.allureRuntime.applyGlobalRuntimeMessages([(0, _sdk.toGlobalErrorMessage)({
651
+ name,
652
+ details: (0, _sdk.getMessageAndTraceFromError)(error),
653
+ status: (0, _sdk.getStatusFromError)(error)
654
+ })]);
655
+ }
554
656
  onTestRunFinished() {
555
657
  this.allureRuntime.writeCategoriesDefinitions();
556
658
  this.allureRuntime.writeEnvironmentInfo();
557
659
  }
660
+
661
+ // Cucumber 13+ no longer puts the matching step definitions into the ambiguous step result
662
+ getAmbiguousStepMessage(step) {
663
+ var _step$stepDefinitionI;
664
+ var stepDefinitions = ((_step$stepDefinitionI = step.stepDefinitionIds) !== null && _step$stepDefinitionI !== void 0 ? _step$stepDefinitionI : []).map(id => this.stepDefinitionMap.get(id)).filter(stepDefinition => stepDefinition !== undefined);
665
+ if (stepDefinitions.length === 0) {
666
+ return AMBIGUOUS_STEP_MESSAGE;
667
+ }
668
+ var matches = stepDefinitions.map(_ref6 => {
669
+ var _sourceReference$loca;
670
+ var {
671
+ pattern,
672
+ sourceReference
673
+ } = _ref6;
674
+ var patternText = pattern.type === _messages.StepDefinitionPatternType.REGULAR_EXPRESSION ? "/".concat(pattern.source, "/") : pattern.source;
675
+ var line = (_sourceReference$loca = sourceReference.location) === null || _sourceReference$loca === void 0 ? void 0 : _sourceReference$loca.line;
676
+ var location = sourceReference.uri ? "".concat(sourceReference.uri).concat(line !== undefined ? ":".concat(line) : "") : "";
677
+ return location ? " ".concat(patternText, " - ").concat(location) : " ".concat(patternText);
678
+ });
679
+ return ["Multiple step definitions match:", ...matches].join("\n");
680
+ }
558
681
  exceptionToError(message, exception) {
559
682
  if (!exception) {
560
683
  return;
@@ -567,12 +690,6 @@ class AllureCucumberReporter extends _cucumber.Formatter {
567
690
  }
568
691
  }
569
692
  exports.default = AllureCucumberReporter;
570
- var toGlobalErrorMessage = (name, details) => ({
571
- type: "global_error",
572
- data: _objectSpread(_objectSpread({}, details), {}, {
573
- message: details.message ? "".concat(name, " failed: ").concat(details.message) : "".concat(name, " failed")
574
- })
575
- });
576
693
  var isPromiseLike = value => Boolean(value) && typeof value.then === "function";
577
694
  var deferReject = error => new Promise((_resolve, reject) => setImmediate(() => reject(error)));
578
695
  module.exports = exports.default;