allure-cucumberjs 2.0.0-beta.15 → 2.0.0-beta.18

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.
Files changed (33) hide show
  1. package/dist/src/CucumberAllureInterface.js +3 -10
  2. package/dist/src/CucumberAllureInterface.js.map +1 -1
  3. package/dist/src/CucumberJSAllureReporter.d.ts +31 -51
  4. package/dist/src/CucumberJSAllureReporter.js +232 -235
  5. package/dist/src/CucumberJSAllureReporter.js.map +1 -1
  6. package/package.json +16 -10
  7. package/dist/src/events/Example.d.ts +0 -8
  8. package/dist/src/events/Example.js +0 -26
  9. package/dist/src/events/Example.js.map +0 -1
  10. package/dist/src/events/GherkinDocument.d.ts +0 -17
  11. package/dist/src/events/GherkinDocument.js +0 -10
  12. package/dist/src/events/GherkinDocument.js.map +0 -1
  13. package/dist/src/events/GherkinExample.d.ts +0 -15
  14. package/dist/src/events/GherkinExample.js +0 -7
  15. package/dist/src/events/GherkinExample.js.map +0 -1
  16. package/dist/src/events/GherkinStep.d.ts +0 -17
  17. package/dist/src/events/GherkinStep.js +0 -7
  18. package/dist/src/events/GherkinStep.js.map +0 -1
  19. package/dist/src/events/GherkinTestCase.d.ts +0 -18
  20. package/dist/src/events/GherkinTestCase.js +0 -11
  21. package/dist/src/events/GherkinTestCase.js.map +0 -1
  22. package/dist/src/events/Result.d.ts +0 -5
  23. package/dist/src/events/Result.js +0 -7
  24. package/dist/src/events/Result.js.map +0 -1
  25. package/dist/src/events/SourceLocation.d.ts +0 -11
  26. package/dist/src/events/SourceLocation.js +0 -10
  27. package/dist/src/events/SourceLocation.js.map +0 -1
  28. package/dist/src/events/TestHookDefinition.d.ts +0 -8
  29. package/dist/src/events/TestHookDefinition.js +0 -3
  30. package/dist/src/events/TestHookDefinition.js.map +0 -1
  31. package/dist/src/utilities.d.ts +0 -7
  32. package/dist/src/utilities.js +0 -58
  33. package/dist/src/utilities.js.map +0 -1
@@ -42,11 +42,11 @@ class CucumberAllureInterface extends allure_js_commons_1.Allure {
42
42
  step.endStep();
43
43
  }
44
44
  attachment(name, content, options) {
45
- const file = this.reporter.writeAttachment(content, options);
45
+ const file = this.runtime.writeAttachment(content, options);
46
46
  this.currentExecutable.addAttachment(name, options, file);
47
47
  }
48
48
  testAttachment(name, content, options) {
49
- const file = this.reporter.writeAttachment(content, options);
49
+ const file = this.runtime.writeAttachment(content, options);
50
50
  this.currentTest.addAttachment(name, options, file);
51
51
  }
52
52
  addParameter(name, value) {
@@ -62,11 +62,7 @@ class CucumberAllureInterface extends allure_js_commons_1.Allure {
62
62
  this.currentTest.addTmsLink(url, name);
63
63
  }
64
64
  get currentExecutable() {
65
- const result = this.reporter.currentStep || this.reporter.currentTest;
66
- if (result === null) {
67
- throw new Error("No executable!");
68
- }
69
- return result;
65
+ throw new Error("No executable!");
70
66
  }
71
67
  get currentTest() {
72
68
  if (this.reporter.currentTest === null) {
@@ -76,7 +72,6 @@ class CucumberAllureInterface extends allure_js_commons_1.Allure {
76
72
  }
77
73
  startStep(name) {
78
74
  const allureStep = this.currentExecutable.startStep(name);
79
- this.reporter.pushStep(allureStep);
80
75
  return new WrappedStep(this.reporter, allureStep);
81
76
  }
82
77
  }
@@ -88,7 +83,6 @@ class WrappedStep {
88
83
  }
89
84
  startStep(name) {
90
85
  const step = this.step.startStep(name);
91
- this.reporter.pushStep(step);
92
86
  return new WrappedStep(this.reporter, step);
93
87
  }
94
88
  setStatus(status) {
@@ -100,7 +94,6 @@ class WrappedStep {
100
94
  this.step.detailsTrace = error.stack;
101
95
  }
102
96
  endStep() {
103
- this.reporter.popStep();
104
97
  this.step.endStep();
105
98
  }
106
99
  run(body) {
@@ -1 +1 @@
1
- {"version":3,"file":"CucumberAllureInterface.js","sourceRoot":"","sources":["../../src/CucumberAllureInterface.ts"],"names":[],"mappings":";;;AAAA,yDAW2B;AAG3B,MAAa,uBAAwB,SAAQ,0BAAM;IACjD,YAA6B,QAAmC,EAAE,OAAsB;QACtF,KAAK,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AttachmentOptions, ContentType, ExecutableItemWrapper } from "allure-js-commons";
3
- import { World as CucumberWorld, Formatter } from "cucumber";
4
- import { GherkinDocument } from "./events/GherkinDocument";
5
- import { Result } from "./events/Result";
6
- import { SourceLocation } from "./events/SourceLocation";
1
+ import { World as CucumberWorld, Formatter } from "@cucumber/cucumber";
2
+ import { IFormatterOptions } from "@cucumber/cucumber/lib/formatter";
3
+ import { Allure, AllureGroup, AllureRuntime, AllureTest, ExecutableItemWrapper } from "allure-js-commons";
7
4
  export { Allure } from "allure-js-commons";
8
5
  export interface World extends CucumberWorld {
9
6
  allure: Allure;
@@ -34,52 +31,35 @@ export declare class CucumberJSAllureFormatter extends Formatter {
34
31
  private readonly afterHooks;
35
32
  private readonly beforeHooks;
36
33
  private readonly exceptionFormatter;
37
- private readonly featureMap;
38
34
  private readonly labels;
39
35
  private readonly links;
40
- private readonly sourceMap;
41
36
  private stepStack;
42
- private readonly stepsMap;
43
- constructor(options: any, allureRuntime: AllureRuntime, config: CucumberJSAllureFormatterConfig);
44
- get currentStep(): AllureStep | null;
45
- onGherkinDocument(data: {
46
- uri: string;
47
- document: GherkinDocument;
48
- }): void;
49
- onSource(data: {
50
- uri: string;
51
- data: string;
52
- media: {
53
- encoding: string;
54
- type: string;
55
- };
56
- }): void;
57
- onTestCaseFinished(data: {
58
- result: Result;
59
- } & SourceLocation): void;
60
- onTestCasePrepared(data: {
61
- steps: SourceLocation[];
62
- } & SourceLocation): void;
63
- onTestCaseStarted(data: SourceLocation): void;
64
- onTestStepAttachment(data: {
65
- index: number;
66
- data: string;
67
- media: {
68
- type: string;
69
- };
70
- testCase: SourceLocation;
71
- }): void;
72
- onTestStepFinished(data: {
73
- index: number;
74
- result: Result;
75
- testCase: SourceLocation;
76
- }): void;
77
- onTestStepStarted(data: {
78
- index: number;
79
- testCase: SourceLocation;
80
- }): void;
81
- popStep(): void;
82
- pushStep(step: AllureStep): void;
83
- writeAttachment(content: Buffer | string, options: ContentType | string | AttachmentOptions): string;
84
- private setException;
37
+ private readonly documentMap;
38
+ private readonly featureMap;
39
+ private readonly scenarioMap;
40
+ private readonly stepMap;
41
+ private readonly testStepMap;
42
+ private readonly pickleStepMap;
43
+ private readonly stepDefinitionMap;
44
+ private readonly testCaseTestStepsResults;
45
+ private readonly pickleMap;
46
+ private readonly hookMap;
47
+ private readonly sourceMap;
48
+ private readonly testCaseMap;
49
+ private readonly testCaseStartedMap;
50
+ private readonly allureSteps;
51
+ constructor(options: IFormatterOptions, allureRuntime: AllureRuntime, config: CucumberJSAllureFormatterConfig);
52
+ private parseEnvelope;
53
+ private onGherkinDocument;
54
+ private onScenario;
55
+ private onPickle;
56
+ private onTestCase;
57
+ private onTestCaseStarted;
58
+ private onAttachment;
59
+ private onTestCaseFinished;
60
+ private onHook;
61
+ private onSource;
62
+ private onTestStepStarted;
63
+ private onTestStepFinished;
64
+ private convertStatus;
85
65
  }
@@ -1,12 +1,30 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
2
21
  Object.defineProperty(exports, "__esModule", { value: true });
3
22
  exports.CucumberJSAllureFormatter = exports.CucumberJSAllureFormatterConfig = exports.Allure = void 0;
23
+ const cucumber_1 = require("@cucumber/cucumber");
24
+ const messages = __importStar(require("@cucumber/messages"));
25
+ const messages_1 = require("@cucumber/messages");
4
26
  const allure_js_commons_1 = require("allure-js-commons");
5
- const cucumber_1 = require("cucumber");
6
27
  const CucumberAllureInterface_1 = require("./CucumberAllureInterface");
7
- const Example_1 = require("./events/Example");
8
- const SourceLocation_1 = require("./events/SourceLocation");
9
- const utilities_1 = require("./utilities");
10
28
  var allure_js_commons_2 = require("allure-js-commons");
11
29
  Object.defineProperty(exports, "Allure", { enumerable: true, get: function () { return allure_js_commons_2.Allure; } });
12
30
  class CucumberJSAllureFormatterConfig {
@@ -20,19 +38,35 @@ class CucumberJSAllureFormatter extends cucumber_1.Formatter {
20
38
  this.currentBefore = null;
21
39
  this.currentGroup = null;
22
40
  this.currentTest = null;
41
+ this.stepStack = [];
42
+ this.documentMap = new Map();
23
43
  this.featureMap = new Map();
44
+ this.scenarioMap = new Map();
45
+ this.stepMap = new Map();
46
+ this.testStepMap = new Map();
47
+ this.pickleStepMap = new Map();
48
+ this.stepDefinitionMap = new Map();
49
+ this.testCaseTestStepsResults = new Map();
50
+ this.pickleMap = new Map();
51
+ this.hookMap = new Map();
24
52
  this.sourceMap = new Map();
25
- this.stepStack = [];
26
- this.stepsMap = new Map();
27
- options.eventBroadcaster
28
- .on("source", this.onSource.bind(this))
29
- .on("gherkin-document", this.onGherkinDocument.bind(this))
30
- .on("test-case-prepared", this.onTestCasePrepared.bind(this))
31
- .on("test-case-started", this.onTestCaseStarted.bind(this))
32
- .on("test-step-started", this.onTestStepStarted.bind(this))
33
- .on("test-step-attachment", this.onTestStepAttachment.bind(this))
34
- .on("test-step-finished", this.onTestStepFinished.bind(this))
35
- .on("test-case-finished", this.onTestCaseFinished.bind(this));
53
+ this.testCaseMap = new Map();
54
+ this.testCaseStartedMap = new Map();
55
+ this.allureSteps = new Map();
56
+ this.convertStatus = (status) => {
57
+ switch (status) {
58
+ case messages_1.TestStepResultStatus.FAILED:
59
+ return allure_js_commons_1.Status.FAILED;
60
+ case messages_1.TestStepResultStatus.PASSED:
61
+ return allure_js_commons_1.Status.PASSED;
62
+ case messages_1.TestStepResultStatus.SKIPPED:
63
+ case messages_1.TestStepResultStatus.PENDING:
64
+ return allure_js_commons_1.Status.SKIPPED;
65
+ default:
66
+ return undefined;
67
+ }
68
+ };
69
+ options.eventBroadcaster.on("envelope", this.parseEnvelope.bind(this));
36
70
  this.labels = config.labels || {};
37
71
  this.links = config.links || {};
38
72
  this.exceptionFormatter = (message) => {
@@ -51,256 +85,219 @@ class CucumberJSAllureFormatter extends cucumber_1.Formatter {
51
85
  this.beforeHooks = options.supportCodeLibrary.beforeTestCaseHookDefinitions;
52
86
  this.afterHooks = options.supportCodeLibrary.afterTestCaseHookDefinitions;
53
87
  }
54
- get currentStep() {
55
- if (this.stepStack.length > 0) {
56
- return this.stepStack[this.stepStack.length - 1];
88
+ parseEnvelope(envelope) {
89
+ if (envelope.gherkinDocument) {
90
+ this.onGherkinDocument(envelope.gherkinDocument);
91
+ }
92
+ else if (envelope.pickle) {
93
+ this.onPickle(envelope.pickle);
94
+ }
95
+ else if (envelope.testCase) {
96
+ this.onTestCase(envelope.testCase);
97
+ }
98
+ else if (envelope.testCaseStarted) {
99
+ this.onTestCaseStarted(envelope.testCaseStarted);
100
+ }
101
+ else if (envelope.testCaseFinished) {
102
+ this.onTestCaseFinished(envelope.testCaseFinished);
103
+ }
104
+ else if (envelope.attachment) {
105
+ this.onAttachment(envelope.attachment);
106
+ }
107
+ else if (envelope.hook) {
108
+ this.onHook(envelope.hook);
109
+ }
110
+ else if (envelope.source) {
111
+ this.onSource(envelope.source);
112
+ }
113
+ else if (envelope.testStepStarted) {
114
+ this.onTestStepStarted(envelope.testStepStarted);
115
+ }
116
+ else if (envelope.testStepFinished) {
117
+ this.onTestStepFinished(envelope.testStepFinished);
57
118
  }
58
- return null;
59
119
  }
60
120
  onGherkinDocument(data) {
61
- data.document.caseMap = new Map();
62
- data.document.stepMap = new Map();
63
- if (data.document.feature !== undefined) {
64
- for (const test of data.document.feature.children || []) {
65
- test.stepMap = new Map();
66
- if (test.type === "Background") {
67
- data.document.stepMap = new Map();
68
- for (const step of test.steps) {
69
- step.isBackground = true;
70
- data.document.stepMap.set(step.location.line, step);
71
- }
72
- }
73
- else {
74
- for (const step of test.steps) {
75
- test.stepMap.set(step.location.line, step);
76
- }
77
- }
78
- if (test.type === "ScenarioOutline") {
79
- for (const example of (0, Example_1.examplesToSensibleFormat)(test.examples || [])) {
80
- const copy = Object.assign({}, test);
81
- copy.example = example;
82
- data.document.caseMap.set(example.line, copy);
83
- }
84
- }
85
- else {
86
- data.document.caseMap.set(test.location.line, test);
87
- }
88
- }
121
+ var _a, _b;
122
+ if (data.uri) {
123
+ this.documentMap.set(data.uri, data);
89
124
  }
90
- this.featureMap.set(data.uri, data.document);
125
+ (_b = (_a = data.feature) === null || _a === void 0 ? void 0 : _a.children) === null || _b === void 0 ? void 0 : _b.forEach((fc) => {
126
+ if (fc.scenario) {
127
+ this.onScenario(fc.scenario);
128
+ }
129
+ });
91
130
  }
92
- onSource(data) {
93
- this.sourceMap.set(data.uri, data.data.split(/\n/));
131
+ onScenario(data) {
132
+ this.scenarioMap.set(data.id, data);
133
+ data.steps.forEach((step) => this.stepMap.set(step.id, step));
94
134
  }
95
- onTestCaseFinished(data) {
96
- if (this.currentTest === null || this.currentGroup === null) {
97
- throw new Error("No current test info");
98
- }
99
- this.currentTest.status = (0, utilities_1.statusTextToAllure)(data.result.status);
100
- this.currentTest.stage = (0, utilities_1.statusTextToStage)(data.result.status);
101
- this.setException(this.currentTest, data.result.exception);
102
- this.currentTest.endTest();
103
- this.currentGroup.endGroup();
135
+ onPickle(data) {
136
+ this.pickleMap.set(data.id, data);
137
+ data.steps.forEach((ps) => this.pickleStepMap.set(ps.id, ps));
104
138
  }
105
- onTestCasePrepared(data) {
106
- this.stepsMap.clear();
107
- this.stepsMap.set(SourceLocation_1.SourceLocation.toKey(data), data.steps);
108
- this.currentBefore = null;
109
- this.currentAfter = null;
139
+ onTestCase(data) {
140
+ this.testCaseMap.set(data.id, data);
141
+ data.testSteps.forEach((ts) => this.testStepMap.set(ts.id, ts));
110
142
  }
111
143
  onTestCaseStarted(data) {
112
- const feature = this.featureMap.get(data.sourceLocation.uri);
113
- if (feature === undefined || feature.feature === undefined) {
114
- throw new Error("Unknown feature");
115
- }
116
- const test = feature.caseMap === undefined ? undefined : feature.caseMap.get(data.sourceLocation.line);
117
- if (test === undefined) {
118
- throw new Error("Unknown scenario");
119
- }
120
- this.currentGroup = this.allureRuntime.startGroup();
121
- this.currentTest = this.currentGroup.startTest((0, utilities_1.applyExample)(test.name || "Unnamed test", test.example));
122
- const info = {
123
- uri: data.sourceLocation.uri,
124
- f: feature.feature.name,
125
- t: test.name,
126
- a: null,
127
- };
128
- if (test.example !== undefined) {
129
- info.a = test.example.arguments;
130
- for (const prop in test.example.arguments) {
131
- if (!test.example.arguments[prop]) {
132
- continue;
133
- }
134
- this.currentTest.addParameter(prop, test.example.arguments[prop]);
135
- }
144
+ var _a, _b, _c, _d, _e;
145
+ const testCase = this.testCaseMap.get(data.testCaseId);
146
+ if (!testCase) {
147
+ console.error("onTestCaseStarted", "test case not found", data);
148
+ return;
136
149
  }
137
- this.currentTest.historyId = (0, utilities_1.hash)(JSON.stringify(info));
138
- this.currentTest.addLabel(allure_js_commons_1.LabelName.THREAD, `${process.pid}`);
139
- this.currentTest.fullName = `${data.sourceLocation.uri}:${feature.feature.name}:${test.name || "unknown"}`;
140
- this.currentTest.addLabel(allure_js_commons_1.LabelName.FEATURE, feature.feature.name);
141
- this.currentTest.description = (0, utilities_1.stripIndent)(test.description || "");
142
- for (const tag of [...(test.tags || []), ...feature.feature.tags]) {
143
- this.currentTest.addLabel(allure_js_commons_1.LabelName.TAG, tag.name);
144
- for (const label in this.labels) {
145
- if (!this.labels[label]) {
146
- continue;
147
- }
148
- for (const reg of this.labels[label]) {
149
- const match = tag.name.match(reg);
150
- if (match != null && match.length > 1) {
151
- this.currentTest.addLabel(label, match[1]);
152
- }
153
- }
154
- }
155
- if (this.links.issue) {
156
- for (const reg of this.links.issue.pattern) {
157
- const match = tag.name.match(reg);
158
- if (match != null && match.length > 1) {
159
- this.currentTest.addIssueLink(this.links.issue.urlTemplate.replace("%s", match[1]), match[1]);
160
- }
161
- }
162
- }
163
- if (this.links.tms) {
164
- for (const reg of this.links.tms.pattern) {
165
- const match = tag.name.match(reg);
166
- if (match != null && match.length > 1) {
167
- this.currentTest.addTmsLink(this.links.tms.urlTemplate.replace("%s", match[1]), match[1]);
168
- }
169
- }
170
- }
150
+ const pickle = this.pickleMap.get(testCase.pickleId);
151
+ if (!pickle) {
152
+ console.error("onTestCaseStarted", "pickle not found", data);
153
+ return;
171
154
  }
172
- }
173
- onTestStepAttachment(data) {
174
- if (this.currentStep === null) {
175
- throw new Error("There is no step to add attachment to");
155
+ const doc = this.documentMap.get(pickle.uri);
156
+ const scenarioId = (_a = pickle === null || pickle === void 0 ? void 0 : pickle.astNodeIds) === null || _a === void 0 ? void 0 : _a[0];
157
+ const scenario = this.scenarioMap.get(scenarioId);
158
+ this.testCaseStartedMap.set(data.id, data);
159
+ this.testCaseTestStepsResults.set(data.id, []);
160
+ this.currentTest = new allure_js_commons_1.AllureTest(this.allureRuntime, Date.now());
161
+ this.currentTest.name = pickle.name;
162
+ (_b = this.currentTest) === null || _b === void 0 ? void 0 : _b.addLabel(allure_js_commons_1.LabelName.LANGUAGE, "javascript");
163
+ (_c = this.currentTest) === null || _c === void 0 ? void 0 : _c.addLabel(allure_js_commons_1.LabelName.FRAMEWORK, "cucumberjs");
164
+ if (doc === null || doc === void 0 ? void 0 : doc.feature) {
165
+ this.currentTest.addLabel(allure_js_commons_1.LabelName.FEATURE, doc.feature.name);
176
166
  }
177
- const type = data.media.type;
178
- let content = data.data;
179
- if ([allure_js_commons_1.ContentType.JPEG, allure_js_commons_1.ContentType.PNG, allure_js_commons_1.ContentType.WEBM].includes(type)) {
180
- content = Buffer.from(content, "base64");
167
+ if (scenario) {
168
+ (_d = this.currentTest) === null || _d === void 0 ? void 0 : _d.addLabel(allure_js_commons_1.LabelName.SUITE, scenario.name);
181
169
  }
182
- const file = this.allureRuntime.writeAttachment(content, { contentType: type });
183
- this.currentStep.addAttachment("attached", type, file);
184
- }
185
- onTestStepFinished(data) {
186
- const currentStep = this.currentStep;
187
- if (currentStep === null) {
188
- throw new Error("No current step defined");
189
- }
190
- currentStep.status = (0, utilities_1.statusTextToAllure)(data.result.status);
191
- currentStep.stage = (0, utilities_1.statusTextToStage)(data.result.status);
192
- this.setException(currentStep, data.result.exception);
193
- currentStep.endStep();
194
- this.popStep();
195
- }
196
- onTestStepStarted(data) {
197
- const location = (this.stepsMap.get(SourceLocation_1.SourceLocation.toKey(data.testCase)) || [])[data.index];
198
- const feature = this.featureMap.get(data.testCase.sourceLocation.uri);
199
- if (feature === undefined) {
200
- throw new Error("Unknown feature");
201
- }
202
- const test = feature.caseMap === undefined
203
- ? undefined
204
- : feature.caseMap.get(data.testCase.sourceLocation.line);
205
- if (test === undefined) {
206
- throw new Error("Unknown scenario");
207
- }
208
- let step;
209
- if (location.sourceLocation !== undefined && feature.stepMap !== undefined) {
210
- step =
211
- test.stepMap.get(location.sourceLocation.line) ||
212
- feature.stepMap.get(location.sourceLocation.line);
170
+ if ((_e = pickle.tags) === null || _e === void 0 ? void 0 : _e.length) {
171
+ pickle.tags.forEach((tag) => {
172
+ var _a;
173
+ (_a = this.currentTest) === null || _a === void 0 ? void 0 : _a.addLabel(allure_js_commons_1.LabelName.TAG, tag.name);
174
+ });
213
175
  }
214
- else {
215
- if (location.actionLocation === undefined) {
216
- location.actionLocation = {
217
- uri: "unknown",
218
- line: -1,
219
- };
176
+ pickle.steps.forEach((ps) => {
177
+ const { argument } = ps;
178
+ if (!this.currentTest || !(argument === null || argument === void 0 ? void 0 : argument.dataTable)) {
179
+ return;
220
180
  }
221
- step = {
222
- location: { line: -1 },
223
- text: `${location.actionLocation.uri}:${location.actionLocation.line}`,
224
- keyword: "",
225
- };
181
+ const csvDataTable = argument.dataTable.rows.reduce((acc, row) => `${acc + row.cells.map((cell) => cell.value).join(",")}\n`, "");
182
+ const attachmentFilename = this.allureRuntime.writeAttachment(csvDataTable, "text/csv");
183
+ this.currentTest.addAttachment("Data table", {
184
+ contentType: "text/csv",
185
+ }, attachmentFilename);
186
+ });
187
+ if (!scenario) {
188
+ return;
226
189
  }
227
- if (step === undefined) {
228
- throw new Error("Unknown step");
190
+ if (scenario.examples.length === 0) {
191
+ return;
229
192
  }
230
- let stepText = (0, utilities_1.applyExample)(`${step.keyword || ""}${step.text || "unknown"}`, test.example);
231
- const isAfter = this.afterHooks.find(({ uri, line }) => {
232
- if (location.actionLocation === undefined) {
233
- return false;
193
+ scenario.examples.forEach((example) => {
194
+ var _a;
195
+ if (!this.currentTest) {
196
+ return;
234
197
  }
235
- return uri === location.actionLocation.uri && line === location.actionLocation.line;
236
- });
237
- const isBefore = this.beforeHooks.find(({ uri, line }) => {
238
- if (location.actionLocation === undefined) {
239
- return false;
198
+ const csvDataTableHeader = ((_a = example === null || example === void 0 ? void 0 : example.tableHeader) === null || _a === void 0 ? void 0 : _a.cells.map((cell) => cell.value).join(",")) || "";
199
+ const csvDataTableBody = (example === null || example === void 0 ? void 0 : example.tableBody.map((row) => row.cells.map((cell) => cell.value).join(",")).join("\n")) ||
200
+ "";
201
+ if (!csvDataTableHeader && !csvDataTableBody) {
202
+ return;
240
203
  }
241
- return uri === location.actionLocation.uri && line === location.actionLocation.line;
204
+ const csvDataTable = `${csvDataTableHeader}\n${csvDataTableBody}\n`;
205
+ const attachmentFilename = this.allureRuntime.writeAttachment(csvDataTable, "text/csv");
206
+ this.currentTest.addAttachment("Examples", {
207
+ contentType: "text/csv",
208
+ }, attachmentFilename);
242
209
  });
243
- if (step.isBackground) {
244
- if (this.currentBefore === null) {
245
- this.currentBefore = this.currentGroup.addBefore();
246
- }
210
+ }
211
+ onAttachment(data) {
212
+ if (!this.currentTest) {
213
+ return;
247
214
  }
248
- else if (isBefore) {
249
- if (this.currentBefore === null) {
250
- this.currentBefore = this.currentGroup.addBefore();
251
- }
252
- stepText = `Before: ${isBefore.code.name || step.text || "unknown"}`;
215
+ if (!data) {
216
+ console.error("onAttachment", "attachment can't be empty");
217
+ return;
253
218
  }
254
- else if (isAfter) {
255
- if (this.currentAfter === null) {
256
- this.currentAfter = this.currentGroup.addAfter();
257
- }
258
- stepText = `After: ${isAfter.code.name || step.text || "unknown"}`;
219
+ const { fileName = "attachment", body, mediaType } = data;
220
+ const attachmentFilename = this.allureRuntime.writeAttachment(body, mediaType);
221
+ this.currentTest.addAttachment(fileName, {
222
+ contentType: mediaType,
223
+ }, attachmentFilename);
224
+ }
225
+ onTestCaseFinished(data) {
226
+ if (!this.currentTest) {
227
+ console.error("onTestCaseFinished", "current test not found", data);
228
+ return;
259
229
  }
260
- else {
261
- if (this.currentBefore !== null) {
262
- this.currentBefore = null;
263
- }
264
- if (this.currentAfter !== null) {
265
- this.currentAfter = null;
266
- }
230
+ const testCaseStarted = this.testCaseStartedMap.get(data.testCaseStartedId);
231
+ if (!testCaseStarted) {
232
+ console.error("onTestCaseFinished", "testCaseStarted event not found", data);
233
+ return;
267
234
  }
268
- const allureStep = (this.currentAfter || this.currentBefore || this.currentTest).startStep(stepText);
269
- this.pushStep(allureStep);
270
- if (step.argument !== undefined) {
271
- if (step.argument.content !== undefined) {
272
- const file = this.allureRuntime.writeAttachment(step.argument.content, {
273
- contentType: allure_js_commons_1.ContentType.TEXT,
274
- });
275
- allureStep.addAttachment("Text", allure_js_commons_1.ContentType.TEXT, file);
276
- }
277
- if (step.argument.rows !== undefined) {
278
- const file = this.allureRuntime.writeAttachment(step.argument.rows
279
- .map((row) => row.cells.map((cell) => cell.value.replace(/\t/g, " ")).join("\t"))
280
- .join("\n"), { contentType: allure_js_commons_1.ContentType.TSV });
281
- allureStep.addAttachment("Table", allure_js_commons_1.ContentType.TSV, file);
282
- }
235
+ const testCase = this.testCaseMap.get(testCaseStarted.testCaseId);
236
+ if (!testCase) {
237
+ console.error("onTestCaseFinished", "testCase not found", data);
238
+ return;
283
239
  }
240
+ const pickle = this.pickleMap.get(testCase.pickleId);
241
+ if (!pickle) {
242
+ console.error("onTestCaseFinished", "pickle not found", data);
243
+ return;
244
+ }
245
+ const testStepResults = this.testCaseTestStepsResults.get(testCaseStarted.id);
246
+ if (testStepResults === null || testStepResults === void 0 ? void 0 : testStepResults.length) {
247
+ const worstTestStepResult = messages.getWorstTestStepResult(testStepResults);
248
+ this.currentTest.status = this.convertStatus(worstTestStepResult.status);
249
+ this.currentTest.statusDetails = {
250
+ message: worstTestStepResult.message,
251
+ };
252
+ }
253
+ else {
254
+ this.currentTest.status = allure_js_commons_1.Status.PASSED;
255
+ }
256
+ this.currentTest.endTest(Date.now());
284
257
  }
285
- popStep() {
286
- this.stepStack.pop();
287
- }
288
- pushStep(step) {
289
- this.stepStack.push(step);
258
+ onHook(data) {
259
+ this.hookMap.set(data.id, data);
290
260
  }
291
- writeAttachment(content, options) {
292
- return this.allureRuntime.writeAttachment(content, options);
261
+ onSource(data) {
262
+ if (data.uri) {
263
+ this.sourceMap.set(data.uri, data);
264
+ }
293
265
  }
294
- setException(target, exception) {
295
- if (exception !== undefined) {
296
- if (typeof exception === "string") {
297
- target.detailsMessage = this.exceptionFormatter(exception);
298
- }
299
- else {
300
- target.detailsMessage = this.exceptionFormatter(exception.message || "Error.message === undefined");
301
- target.detailsTrace = exception.stack || "";
266
+ onTestStepStarted(data) {
267
+ if (!this.currentTest) {
268
+ return;
269
+ }
270
+ const testStep = this.testStepMap.get(data.testStepId);
271
+ if (!testStep) {
272
+ console.error("onTestStepStarted", "can't find step", data);
273
+ return;
274
+ }
275
+ if (testStep.pickleStepId) {
276
+ const ps = this.pickleStepMap.get(testStep.pickleStepId);
277
+ if (!ps) {
278
+ return;
302
279
  }
280
+ const keyword = ps.astNodeIds
281
+ .map((astNodeId) => this.stepMap.get(astNodeId))
282
+ .map((step) => step === null || step === void 0 ? void 0 : step.keyword)
283
+ .find((kw) => kw !== undefined) || "";
284
+ const allureStep = this.currentTest.startStep(keyword + ps.text, Date.now());
285
+ this.allureSteps.set(data.testStepId, allureStep);
286
+ }
287
+ }
288
+ onTestStepFinished(data) {
289
+ var _a;
290
+ (_a = this.testCaseTestStepsResults.get(data.testCaseStartedId)) === null || _a === void 0 ? void 0 : _a.push(data.testStepResult);
291
+ if (!this.currentTest) {
292
+ return;
293
+ }
294
+ const allureStep = this.allureSteps.get(data.testStepId);
295
+ if (!allureStep) {
296
+ return;
303
297
  }
298
+ allureStep.detailsMessage = data.testStepResult.message;
299
+ allureStep.status = this.convertStatus(data.testStepResult.status);
300
+ allureStep.endStep(Date.now());
304
301
  }
305
302
  }
306
303
  exports.CucumberJSAllureFormatter = CucumberJSAllureFormatter;
@@ -1 +1 @@
1
- {"version":3,"file":"CucumberJSAllureReporter.js","sourceRoot":"","sources":["../../src/CucumberJSAllureReporter.ts"],"names":[],"mappings":";;;AAAA,yDAU2B;AAC3B,uCAA6D;AAC7D,uEAAoE;AACpE,8CAA4D;AAK5D,4DAAyD;AAEzD,2CAMqB;AAErB,uDAA2C;AAAlC,2GAAA,MAAM,OAAA;AAMf,MAAa,+BAA+B;CAa3C;AAbD,0EAaC;AAED,MAAa,yBAA0B,SAAQ,oBAAS;IAyBtD,YACE,OAAY,EACK,aAA4B,EAC7C,MAAuC;QAEvC,KAAK,CAAC,OAAO,CAAC,CAAC;QAHE,kBAAa,GAAb,aAAa,CAAe;QAzB/C,iBAAY,GAAiC,IAAI,CAAC;QAClD,kBAAa,GAAiC,IAAI,CAAC;QACnD,iBAAY,GAAuB,IAAI,CAAC;QACxC,gBAAW,GAAsB,IAAI,CAAC;QAIrB,eAAU,GAAiC,IAAI,GAAG,EAAE,CAAC;QAYrD,cAAS,GAA0B,IAAI,GAAG,EAAE,CAAC;QACtD,cAAS,GAAiB,EAAE,CAAC;QACpB,aAAQ,GAAkC,IAAI,GAAG,EAAE,C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,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;SACnD;IACH,CAAC;IAEO,kBAAkB,CAAC,IAA+B;;QACxD,MAAA,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,0CAAE,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACrF,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YACrB,OAAO;SACR;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACzD,IAAI,CAAC,UAAU,EAAE;YACf,OAAO;SACR;QAED,UAAU,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;QACxD,UAAU,CAAC,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QAEnE,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IACjC,CAAC;CAeF;AA3VD,8DA2VC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allure-cucumberjs",
3
- "version": "2.0.0-beta.15",
3
+ "version": "2.0.0-beta.18",
4
4
  "description": "Allure Cucumber.JS integration",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Ilya Korobitsyn <mail@korobochka.org>",
@@ -12,26 +12,27 @@
12
12
  "types": "./dist/index.d.ts",
13
13
  "scripts": {
14
14
  "clean": "rimraf ./dist ./out",
15
- "lint": "eslint ./src ./features ./index.ts --ext .ts",
16
- "lint:fix": "eslint --fix ./src ./features ./index.ts --ext .ts",
15
+ "lint": "eslint ./src ./index.ts --ext .ts",
16
+ "lint:fix": "eslint --fix ./src ./index.ts --ext .ts",
17
17
  "compile": "tsc",
18
18
  "generate-report": "allure generate ./out/allure-results -o ./out/allure-report --clean",
19
- "test": "cucumber-js --require ./dist/features/step_definitions/ --require ./dist/features/support/ --format ./dist/features/support/report.js:./dist/dummy.txt"
19
+ "test": "nyc ts-node --project test/tsconfig.json test/runner.ts"
20
20
  },
21
21
  "devDependencies": {
22
- "@types/chai": "^4.2.11",
23
- "@types/cucumber": "^6.0.1",
22
+ "@types/chai": "^4.2.21",
24
23
  "@types/fs-extra": "^9.0.1",
25
24
  "@types/glob": "^7.1.4",
26
25
  "@types/mocha": "^9.0.0",
27
26
  "@types/node": "^16.7.8",
28
27
  "@types/verror": "^1.10.3",
29
- "chai": "^4.2.0",
28
+ "allure-mocha": "2.0.0-beta.18",
29
+ "chai": "^4.3.4",
30
30
  "chai-like": "^1.1.1",
31
- "cucumber": "^6.0.5",
32
31
  "eslint": "^7.32.0",
33
32
  "fs-extra": "^10.0.0",
34
- "glob": "^7.1.6",
33
+ "glob": "^7.1.7",
34
+ "mocha": "^9.1.1",
35
+ "nyc": "^15.1.0",
35
36
  "path": "^0.12.7",
36
37
  "prettier": "^2.3.2",
37
38
  "rimraf": "^3.0.2",
@@ -40,7 +41,12 @@
40
41
  "verror": "^1.10.0"
41
42
  },
42
43
  "dependencies": {
43
- "allure-js-commons": "2.0.0-beta.15"
44
+ "@cucumber/cucumber": "^8.3.1",
45
+ "@cucumber/gherkin": "^24.0.0",
46
+ "@cucumber/gherkin-streams": "^5.0.1",
47
+ "@cucumber/gherkin-utils": "^8.0.0",
48
+ "@cucumber/messages": "^19.1.2",
49
+ "allure-js-commons": "2.0.0-beta.18"
44
50
  },
45
51
  "files": [
46
52
  "dist/src/**/*",
@@ -1,8 +0,0 @@
1
- import { GherkinExample } from "./GherkinExample";
2
- export declare class Example {
3
- line: number;
4
- arguments: {
5
- [key: string]: string;
6
- };
7
- }
8
- export declare const examplesToSensibleFormat: (examples: GherkinExample[]) => Example[];
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.examplesToSensibleFormat = exports.Example = void 0;
4
- class Example {
5
- constructor() {
6
- this.line = 0;
7
- this.arguments = {};
8
- }
9
- }
10
- exports.Example = Example;
11
- const examplesToSensibleFormat = (examples) => {
12
- const result = [];
13
- for (const table of examples) {
14
- for (const row of table.tableBody || []) {
15
- const item = new Example();
16
- item.line = row.location.line;
17
- for (let i = 0; i < row.cells.length; i++) {
18
- item.arguments[table.tableHeader.cells[i].value] = row.cells[i].value;
19
- }
20
- result.push(item);
21
- }
22
- }
23
- return result;
24
- };
25
- exports.examplesToSensibleFormat = examplesToSensibleFormat;
26
- //# sourceMappingURL=Example.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Example.js","sourceRoot":"","sources":["../../../src/events/Example.ts"],"names":[],"mappings":";;;AAEA,MAAa,OAAO;IAApB;QACE,SAAI,GAAW,CAAC,CAAC;QACjB,cAAS,GAA8B,EAAE,CAAC;IAC5C,CAAC;CAAA;AAHD,0BAGC;AAEM,MAAM,wBAAwB,GAAG,CAAC,QAA0B,EAAa,EAAE;IAChF,MAAM,MAAM,GAAG,EAAE,CAAC;IAClB,KAAK,MAAM,KAAK,IAAI,QAAQ,EAAE;QAC5B,KAAK,MAAM,GAAG,IAAI,KAAK,CAAC,SAAS,IAAI,EAAE,EAAE;YACvC,MAAM,IAAI,GAAG,IAAI,OAAO,EAAE,CAAC;YAC3B,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC;YAC9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACzC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,WAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;aACxE;YACD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACnB;KACF;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAbW,QAAA,wBAAwB,4BAanC"}
@@ -1,17 +0,0 @@
1
- import { GherkinStep } from "./GherkinStep";
2
- import { GherkinTestCase } from "./GherkinTestCase";
3
- export declare class GherkinDocument {
4
- type?: string;
5
- feature?: {
6
- type: string;
7
- tags: {
8
- name: string;
9
- }[];
10
- name: string;
11
- description: string;
12
- children: GherkinTestCase[];
13
- };
14
- comments: string[];
15
- stepMap?: Map<number, GherkinStep>;
16
- caseMap?: Map<number, GherkinTestCase>;
17
- }
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GherkinDocument = void 0;
4
- class GherkinDocument {
5
- constructor() {
6
- this.comments = [];
7
- }
8
- }
9
- exports.GherkinDocument = GherkinDocument;
10
- //# sourceMappingURL=GherkinDocument.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GherkinDocument.js","sourceRoot":"","sources":["../../../src/events/GherkinDocument.ts"],"names":[],"mappings":";;;AAGA,MAAa,eAAe;IAA5B;QAWE,aAAQ,GAAa,EAAE,CAAC;IAI1B,CAAC;CAAA;AAfD,0CAeC"}
@@ -1,15 +0,0 @@
1
- export declare class GherkinExample {
2
- tableHeader?: {
3
- cells: {
4
- value: string;
5
- }[];
6
- };
7
- tableBody?: {
8
- location: {
9
- line: number;
10
- };
11
- cells: {
12
- value: string;
13
- }[];
14
- }[];
15
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GherkinExample = void 0;
4
- class GherkinExample {
5
- }
6
- exports.GherkinExample = GherkinExample;
7
- //# sourceMappingURL=GherkinExample.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GherkinExample.js","sourceRoot":"","sources":["../../../src/events/GherkinExample.ts"],"names":[],"mappings":";;;AAAA,MAAa,cAAc;CAc1B;AAdD,wCAcC"}
@@ -1,17 +0,0 @@
1
- export declare class GherkinStep {
2
- location?: {
3
- line: number;
4
- };
5
- keyword?: string;
6
- text?: string;
7
- argument?: {
8
- type: string;
9
- content?: string;
10
- rows?: {
11
- cells: {
12
- value: string;
13
- }[];
14
- }[];
15
- };
16
- isBackground?: boolean;
17
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GherkinStep = void 0;
4
- class GherkinStep {
5
- }
6
- exports.GherkinStep = GherkinStep;
7
- //# sourceMappingURL=GherkinStep.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GherkinStep.js","sourceRoot":"","sources":["../../../src/events/GherkinStep.ts"],"names":[],"mappings":";;;AAAA,MAAa,WAAW;CAiBvB;AAjBD,kCAiBC"}
@@ -1,18 +0,0 @@
1
- import { Example } from "./Example";
2
- import { GherkinExample } from "./GherkinExample";
3
- import { GherkinStep } from "./GherkinStep";
4
- export declare class GherkinTestCase {
5
- type?: string;
6
- location?: {
7
- line: number;
8
- };
9
- tags?: {
10
- name: string;
11
- }[];
12
- name?: string;
13
- description?: string;
14
- steps: GherkinStep[];
15
- stepMap: Map<number, GherkinStep>;
16
- examples?: GherkinExample[];
17
- example?: Example;
18
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GherkinTestCase = void 0;
4
- class GherkinTestCase {
5
- constructor() {
6
- this.steps = [];
7
- this.stepMap = new Map();
8
- }
9
- }
10
- exports.GherkinTestCase = GherkinTestCase;
11
- //# sourceMappingURL=GherkinTestCase.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GherkinTestCase.js","sourceRoot":"","sources":["../../../src/events/GherkinTestCase.ts"],"names":[],"mappings":";;;AAIA,MAAa,eAAe;IAA5B;QAUE,UAAK,GAAkB,EAAE,CAAC;QAC1B,YAAO,GAA6B,IAAI,GAAG,EAAE,CAAC;IAGhD,CAAC;CAAA;AAdD,0CAcC"}
@@ -1,5 +0,0 @@
1
- export declare class Result {
2
- status?: string;
3
- duration?: number;
4
- exception?: Error | string;
5
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Result = void 0;
4
- class Result {
5
- }
6
- exports.Result = Result;
7
- //# sourceMappingURL=Result.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Result.js","sourceRoot":"","sources":["../../../src/events/Result.ts"],"names":[],"mappings":";;;AAAA,MAAa,MAAM;CAIlB;AAJD,wBAIC"}
@@ -1,11 +0,0 @@
1
- export declare class SourceLocation {
2
- sourceLocation?: {
3
- uri: string;
4
- line: number;
5
- };
6
- actionLocation?: {
7
- uri: string;
8
- line: number;
9
- };
10
- static toKey(s: SourceLocation): string;
11
- }
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SourceLocation = void 0;
4
- class SourceLocation {
5
- static toKey(s) {
6
- return `${s.sourceLocation.uri}:${s.sourceLocation.line}`;
7
- }
8
- }
9
- exports.SourceLocation = SourceLocation;
10
- //# sourceMappingURL=SourceLocation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SourceLocation.js","sourceRoot":"","sources":["../../../src/events/SourceLocation.ts"],"names":[],"mappings":";;;AAAA,MAAa,cAAc;IAIzB,MAAM,CAAC,KAAK,CAAC,CAAiB;QAC5B,OAAO,GAAG,CAAC,CAAC,cAAe,CAAC,GAAG,IAAI,CAAC,CAAC,cAAe,CAAC,IAAI,EAAE,CAAC;IAC9D,CAAC;CACF;AAPD,wCAOC"}
@@ -1,8 +0,0 @@
1
- import { HookCode, HookOptions } from "cucumber";
2
- export interface TestHookDefinition {
3
- code: HookCode;
4
- line: number;
5
- options?: HookOptions;
6
- pattern?: any;
7
- uri: string;
8
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=TestHookDefinition.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TestHookDefinition.js","sourceRoot":"","sources":["../../../src/events/TestHookDefinition.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- import { Stage, Status } from "allure-js-commons";
2
- import { Example } from "./events/Example";
3
- export declare const statusTextToAllure: (status?: string | undefined) => Status;
4
- export declare const statusTextToStage: (status?: string | undefined) => Stage;
5
- export declare const hash: (data: string) => string;
6
- export declare const applyExample: (text: string, example: Example | undefined) => string;
7
- export declare const stripIndent: (data: string) => string;
@@ -1,58 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stripIndent = exports.applyExample = exports.hash = exports.statusTextToStage = exports.statusTextToAllure = void 0;
4
- const crypto_1 = require("crypto");
5
- const allure_js_commons_1 = require("allure-js-commons");
6
- const statusTextToAllure = (status) => {
7
- if (status === "passed") {
8
- return allure_js_commons_1.Status.PASSED;
9
- }
10
- if (status === "skipped") {
11
- return allure_js_commons_1.Status.SKIPPED;
12
- }
13
- if (status === "failed") {
14
- return allure_js_commons_1.Status.FAILED;
15
- }
16
- return allure_js_commons_1.Status.BROKEN;
17
- };
18
- exports.statusTextToAllure = statusTextToAllure;
19
- const statusTextToStage = (status) => {
20
- if (status === "passed") {
21
- return allure_js_commons_1.Stage.FINISHED;
22
- }
23
- if (status === "skipped") {
24
- return allure_js_commons_1.Stage.PENDING;
25
- }
26
- if (status === "failed") {
27
- return allure_js_commons_1.Stage.INTERRUPTED;
28
- }
29
- return allure_js_commons_1.Stage.INTERRUPTED;
30
- };
31
- exports.statusTextToStage = statusTextToStage;
32
- const hash = (data) => {
33
- return (0, crypto_1.createHash)("md5").update(data).digest("hex");
34
- };
35
- exports.hash = hash;
36
- const applyExample = (text, example) => {
37
- if (example === undefined) {
38
- return text;
39
- }
40
- for (const argName in example.arguments) {
41
- if (!example.arguments[argName]) {
42
- continue;
43
- }
44
- text = text.replace(new RegExp(`<${argName}>`, "g"), `<${example.arguments[argName]}>`);
45
- }
46
- return text;
47
- };
48
- exports.applyExample = applyExample;
49
- const stripIndent = (data) => {
50
- const match = data.match(/^[^\S\n]*(?=\S)/gm);
51
- if (match !== null) {
52
- const indent = Math.min(...match.map((sp) => sp.length));
53
- return data.replace(new RegExp(`^.{${indent}}`, "gm"), "");
54
- }
55
- return data;
56
- };
57
- exports.stripIndent = stripIndent;
58
- //# sourceMappingURL=utilities.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utilities.js","sourceRoot":"","sources":["../../src/utilities.ts"],"names":[],"mappings":";;;AAAA,mCAAoC;AACpC,yDAAkD;AAG3C,MAAM,kBAAkB,GAAG,CAAC,MAAe,EAAU,EAAE;IAC5D,IAAI,MAAM,KAAK,QAAQ,EAAE;QACvB,OAAO,0BAAM,CAAC,MAAM,CAAC;KACtB;IACD,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,OAAO,0BAAM,CAAC,OAAO,CAAC;KACvB;IACD,IAAI,MAAM,KAAK,QAAQ,EAAE;QACvB,OAAO,0BAAM,CAAC,MAAM,CAAC;KACtB;IACD,OAAO,0BAAM,CAAC,MAAM,CAAC;AACvB,CAAC,CAAC;AAXW,QAAA,kBAAkB,sBAW7B;AAEK,MAAM,iBAAiB,GAAG,CAAC,MAAe,EAAS,EAAE;IAC1D,IAAI,MAAM,KAAK,QAAQ,EAAE;QACvB,OAAO,yBAAK,CAAC,QAAQ,CAAC;KACvB;IACD,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,OAAO,yBAAK,CAAC,OAAO,CAAC;KACtB;IACD,IAAI,MAAM,KAAK,QAAQ,EAAE;QACvB,OAAO,yBAAK,CAAC,WAAW,CAAC;KAC1B;IACD,OAAO,yBAAK,CAAC,WAAW,CAAC;AAC3B,CAAC,CAAC;AAXW,QAAA,iBAAiB,qBAW5B;AAEK,MAAM,IAAI,GAAG,CAAC,IAAY,EAAU,EAAE;IAC3C,OAAO,IAAA,mBAAU,EAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACtD,CAAC,CAAC;AA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