allure-playwright 2.0.0-beta.13 → 2.0.0-beta.16

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
@@ -7,7 +7,9 @@ This project implements Allure integration with [Playwright Test](https://playwr
7
7
  ```bash
8
8
  npm i -D @playwright/test allure-playwright
9
9
  ```
10
+
10
11
  or via yarn:
12
+
11
13
  ```bash
12
14
  yarn add @playwright/test allure-playwright --dev
13
15
  ```
@@ -18,7 +20,7 @@ Either add **allure-playwright** into **playwright.config.ts**:
18
20
 
19
21
  ```js
20
22
  {
21
- reporter: 'allure-playwright'
23
+ reporter: "allure-playwright";
22
24
  }
23
25
  ```
24
26
 
@@ -31,12 +33,80 @@ npx playwright test --reporter=line,allure-playwright
31
33
  Specify location for allure results:
32
34
 
33
35
  Mac / Linux
36
+
34
37
  ```bash
35
38
  ALLURE_RESULTS_DIR=my-allure-results npx playwright test --reporter=line,allure-playwright
36
39
  ```
37
40
 
38
41
  Windows
42
+
39
43
  ```bash
40
44
  set ALLURE_RESULTS_DIR=my-allure-results
41
45
  npx playwright test --reporter=line,allure-playwright
42
46
  ```
47
+
48
+ or inside the config via:
49
+
50
+ ```js
51
+ const config = {
52
+ reporter: [ ['allure-playwright', { outputFolder: 'my-allure-results' }] ],
53
+ };
54
+ ```
55
+
56
+ ## Proving extra information
57
+
58
+ You can use allure labels to provide extra information about tests such via
59
+
60
+ - label
61
+ - link
62
+ - id
63
+ - epic
64
+ - feature
65
+ - story
66
+ - suite
67
+ - parentSuite
68
+ - subSuite
69
+ - owner
70
+ - severity
71
+ - tag
72
+ - issue
73
+ - tms
74
+
75
+ ### Labels Usage
76
+
77
+ ```js
78
+ import { test, expect } from "@playwright/test";
79
+ import { allure } from "allure-playwright";
80
+
81
+ test("basic test", async ({ page }, testInfo) => {
82
+ allure.epic("Some Epic");
83
+ allure.story("Some Story");
84
+ });
85
+ ```
86
+
87
+ ### Links Usage
88
+
89
+ ```js
90
+ import { test, expect } from "@playwright/test";
91
+ import { allure } from "allure-playwright";
92
+
93
+ test("basic test", async ({ page }, testInfo) => {
94
+ allure.link({ url: "https://playwright.dev", name: "playwright-site" });
95
+ allure.issue({
96
+ url: "https://github.com/allure-framework/allure-js/issues/352",
97
+ name: "Target issue",
98
+ });
99
+ });
100
+ ```
101
+
102
+ ### Attachments Usage
103
+
104
+ ```js
105
+ import { test, expect } from "@playwright/test";
106
+
107
+ test("basic test", async ({ page }, testInfo) => {
108
+ const path = testInfo.outputPath("screenshot.png");
109
+ await page.screenshot({ path });
110
+ testInfo.attachments.push({ name: "screenshot", path, contentType: "image/png" });
111
+ });
112
+ ```
@@ -0,0 +1,26 @@
1
+ import { Label, Link } from "allure-js-commons";
2
+ export declare const ALLURE_METADATA_CONTENT_TYPE = "application/vnd.allure.metadata+json";
3
+ export interface Metadata {
4
+ labels?: Label[];
5
+ links?: Link[];
6
+ description?: string;
7
+ }
8
+ export declare class allure {
9
+ static addMetadataAttachment(metadata: Metadata): void;
10
+ static label(label: Label | Label[]): void;
11
+ static description(value: string): void;
12
+ static link(link: Link): void;
13
+ static id(id: string): void;
14
+ static epic(epic: string): void;
15
+ static feature(epic: string): void;
16
+ static story(story: string): void;
17
+ static suite(name: string): void;
18
+ static parentSuite(name: string): void;
19
+ static subSuite(name: string): void;
20
+ static owner(owner: string): void;
21
+ static severity(severity: string): void;
22
+ static tag(tag: string): void;
23
+ static issue(issueData: Omit<Link, "type">): void;
24
+ static tms(issueData: Omit<Link, "type">): void;
25
+ }
26
+ export { LabelName } from "allure-js-commons";
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.LabelName = exports.allure = exports.ALLURE_METADATA_CONTENT_TYPE = void 0;
7
+ const test_1 = __importDefault(require("@playwright/test"));
8
+ const allure_js_commons_1 = require("allure-js-commons");
9
+ exports.ALLURE_METADATA_CONTENT_TYPE = "application/vnd.allure.metadata+json";
10
+ class allure {
11
+ static addMetadataAttachment(metadata) {
12
+ test_1.default.info().attach("allure-metadata.json", {
13
+ contentType: exports.ALLURE_METADATA_CONTENT_TYPE,
14
+ body: Buffer.from(JSON.stringify(metadata), "utf8"),
15
+ });
16
+ }
17
+ static label(label) {
18
+ this.addMetadataAttachment({
19
+ labels: Array.isArray(label) ? label : [label],
20
+ });
21
+ }
22
+ static description(value) {
23
+ this.addMetadataAttachment({
24
+ description: value,
25
+ });
26
+ }
27
+ static link(link) {
28
+ this.addMetadataAttachment({
29
+ links: Array.isArray(link) ? link : [link],
30
+ });
31
+ }
32
+ static id(id) {
33
+ this.label({
34
+ value: id,
35
+ name: allure_js_commons_1.LabelName.AS_ID,
36
+ });
37
+ }
38
+ static epic(epic) {
39
+ this.label({
40
+ name: allure_js_commons_1.LabelName.EPIC,
41
+ value: epic,
42
+ });
43
+ }
44
+ static feature(epic) {
45
+ this.label({
46
+ name: allure_js_commons_1.LabelName.FEATURE,
47
+ value: epic,
48
+ });
49
+ }
50
+ static story(story) {
51
+ this.label({
52
+ name: allure_js_commons_1.LabelName.STORY,
53
+ value: story,
54
+ });
55
+ }
56
+ static suite(name) {
57
+ this.label({
58
+ name: allure_js_commons_1.LabelName.SUITE,
59
+ value: name,
60
+ });
61
+ }
62
+ static parentSuite(name) {
63
+ this.label({
64
+ name: allure_js_commons_1.LabelName.PARENT_SUITE,
65
+ value: name,
66
+ });
67
+ }
68
+ static subSuite(name) {
69
+ this.label({
70
+ name: allure_js_commons_1.LabelName.SUB_SUITE,
71
+ value: name,
72
+ });
73
+ }
74
+ static owner(owner) {
75
+ this.label({
76
+ name: allure_js_commons_1.LabelName.OWNER,
77
+ value: owner,
78
+ });
79
+ }
80
+ static severity(severity) {
81
+ this.label({
82
+ name: allure_js_commons_1.LabelName.SEVERITY,
83
+ value: severity,
84
+ });
85
+ }
86
+ static tag(tag) {
87
+ this.label({
88
+ name: allure_js_commons_1.LabelName.TAG,
89
+ value: tag,
90
+ });
91
+ }
92
+ static issue(issueData) {
93
+ this.link({
94
+ url: issueData.url,
95
+ name: issueData.name,
96
+ type: allure_js_commons_1.LinkType.ISSUE,
97
+ });
98
+ }
99
+ static tms(issueData) {
100
+ this.link({
101
+ url: issueData.url,
102
+ name: issueData.name,
103
+ type: allure_js_commons_1.LinkType.TMS,
104
+ });
105
+ }
106
+ }
107
+ exports.allure = allure;
108
+ var allure_js_commons_2 = require("allure-js-commons");
109
+ Object.defineProperty(exports, "LabelName", { enumerable: true, get: function () { return allure_js_commons_2.LabelName; } });
110
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":";;;;;;AAAA,4DAAoC;AACpC,yDAAqE;AAExD,QAAA,4BAA4B,GAAG,sCAAsC,CAAC;AAOnF,MAAa,MAAM;IACjB,MAAM,CAAC,qBAAqB,CAAC,QAAkB;QAC7C,cAAI,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,sBAAsB,EAAE;YACzC,WAAW,EAAE,oCAA4B;YACzC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;SACpD,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,KAAsB;QACjC,IAAI,CAAC,qBAAqB,CAAC;YACzB,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;SAC/C,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,KAAa;QAC9B,IAAI,CAAC,qBAAqB,CAAC;YACzB,WAAW,EAAE,KAAK;SACnB,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,IAAU;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,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,KAAa;QACxB,IAAI,CAAC,KAAK,CAAC;YACT,IAAI,EAAE,6BAAS,CAAC,KAAK;YACrB,KAAK,EAAE,KAAK;SACb,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,QAAgB;QAC9B,IAAI,CAAC,KAAK,CAAC;YACT,IAAI,EAAE,6BAAS,CAAC,QAAQ;YACxB,KAAK,EAAE,QAAQ;SAChB,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,GAAG,CAAC,GAAW;QACpB,IAAI,CAAC,KAAK,CAAC;YACT,IAAI,EAAE,6BAAS,CAAC,GAAG;YACnB,KAAK,EAAE,GAAG;SACX,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,SAA6B;QACxC,IAAI,CAAC,IAAI,CAAC;YACR,GAAG,EAAE,SAAS,CAAC,GAAG;YAClB,IAAI,EAAE,SAAS,CAAC,IAAI;YACpB,IAAI,EAAE,4BAAQ,CAAC,KAAK;SACrB,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,GAAG,CAAC,SAA6B;QACtC,IAAI,CAAC,IAAI,CAAC;YACR,GAAG,EAAE,SAAS,CAAC,GAAG;YAClB,IAAI,EAAE,SAAS,CAAC,IAAI;YACpB,IAAI,EAAE,4BAAQ,CAAC,GAAG;SACnB,CAAC,CAAC;IACL,CAAC;CACF;AA/GD,wBA+GC;AAED,uDAA8C;AAArC,8GAAA,SAAS,OAAA"}
package/dist/index.d.ts CHANGED
@@ -1,10 +1,28 @@
1
1
  import { FullConfig } from "@playwright/test";
2
- import { Reporter, Suite } from "@playwright/test/reporter";
2
+ import { Reporter, Suite, TestCase, TestResult, TestStep } from "@playwright/test/reporter";
3
+ declare type AllureReporterOptions = {
4
+ outputFolder?: string;
5
+ };
3
6
  declare class AllureReporter implements Reporter {
4
7
  config: FullConfig;
5
8
  suite: Suite;
9
+ resultsDir: string;
10
+ options: AllureReporterOptions;
11
+ private allureWriter;
12
+ private allureRuntime;
13
+ private allureGroupCache;
14
+ private allureTestCache;
15
+ private allureStepCache;
16
+ constructor(options?: AllureReporterOptions);
6
17
  onBegin(config: FullConfig, suite: Suite): void;
7
- onTimeout(): void;
18
+ onTestBegin(test: TestCase): void;
19
+ onStepBegin(test: TestCase, _result: TestResult, step: TestStep): void;
20
+ onStepEnd(_test: TestCase, _result: TestResult, step: TestStep): void;
21
+ onTestEnd(test: TestCase, result: TestResult): void;
8
22
  onEnd(): void;
23
+ private getAllureRuntime;
24
+ private ensureAllureGroupCreated;
25
+ private ensureAllureStepCreated;
9
26
  }
10
27
  export default AllureReporter;
28
+ export * from "./helpers";
package/dist/index.js CHANGED
@@ -1,4 +1,14 @@
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
2
12
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
13
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
14
  };
@@ -6,101 +16,163 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
16
  const fs_1 = __importDefault(require("fs"));
7
17
  const path_1 = __importDefault(require("path"));
8
18
  const allure_js_commons_1 = require("allure-js-commons");
19
+ const helpers_1 = require("./helpers");
9
20
  class AllureReporter {
21
+ constructor(options = {}) {
22
+ this.allureWriter = process.env.PW_ALLURE_POST_PROCESSOR_FOR_TEST
23
+ ? new allure_js_commons_1.InMemoryAllureWriter()
24
+ : undefined;
25
+ this.allureGroupCache = new Map();
26
+ this.allureTestCache = new Map();
27
+ this.allureStepCache = new Map();
28
+ this.options = options;
29
+ }
10
30
  onBegin(config, suite) {
11
31
  this.config = config;
12
32
  this.suite = suite;
33
+ this.resultsDir = allureReportFolder(this.options.outputFolder);
34
+ this.allureRuntime = new allure_js_commons_1.AllureRuntime({
35
+ resultsDir: this.resultsDir,
36
+ writer: this.allureWriter,
37
+ });
13
38
  }
14
- onTimeout() {
15
- this.onEnd();
39
+ onTestBegin(test) {
40
+ const suite = test.parent;
41
+ const group = this.ensureAllureGroupCreated(suite);
42
+ const allureTest = group.startTest(test.title);
43
+ allureTest.addLabel(allure_js_commons_1.LabelName.LANGUAGE, "JavaScript");
44
+ allureTest.addLabel(allure_js_commons_1.LabelName.FRAMEWORK, "Playwright");
45
+ const [, projectSuiteTitle, fileSuiteTitle, ...suiteTitles] = suite.titlePath();
46
+ if (projectSuiteTitle) {
47
+ allureTest.addLabel(allure_js_commons_1.LabelName.PARENT_SUITE, projectSuiteTitle);
48
+ }
49
+ if (fileSuiteTitle) {
50
+ allureTest.addLabel(allure_js_commons_1.LabelName.SUITE, fileSuiteTitle);
51
+ }
52
+ if (suiteTitles.length > 0) {
53
+ allureTest.addLabel(allure_js_commons_1.LabelName.SUB_SUITE, suiteTitles.join(" > "));
54
+ }
55
+ allureTest.historyId = test.titlePath().slice(1).join(" ");
56
+ allureTest.fullName = test.title;
57
+ this.allureTestCache.set(test, allureTest);
16
58
  }
17
- onEnd() {
18
- const writerForTest = process.env.PW_ALLURE_POST_PROCESSOR_FOR_TEST
19
- ? new allure_js_commons_1.InMemoryAllureWriter()
20
- : undefined;
21
- const resultsDir = process.env.ALLURE_RESULTS_DIR || path_1.default.join(process.cwd(), "allure-results");
22
- const runtime = new allure_js_commons_1.AllureRuntime({ resultsDir, writer: writerForTest });
23
- const processSuite = (suite, parent) => {
24
- const groupName = "Root";
25
- const group = parent.startGroup(groupName);
26
- for (const test of suite.tests) {
27
- for (const result of test.results) {
28
- const startTime = result.startTime.getTime();
29
- const endTime = startTime + result.duration;
30
- const allureTest = group.startTest(test.title, startTime);
31
- allureTest.addLabel(allure_js_commons_1.LabelName.LANGUAGE, "JavaScript");
32
- allureTest.addLabel(allure_js_commons_1.LabelName.FRAMEWORK, "Playwright");
33
- const [, projectSuiteTitle, fileSuiteTitle, ...suiteTitles] = suite.titlePath();
34
- if (projectSuiteTitle) {
35
- allureTest.addLabel(allure_js_commons_1.LabelName.PARENT_SUITE, projectSuiteTitle);
36
- }
37
- if (fileSuiteTitle) {
38
- allureTest.addLabel(allure_js_commons_1.LabelName.SUITE, fileSuiteTitle);
39
- }
40
- if (suiteTitles.length > 0) {
41
- allureTest.addLabel(allure_js_commons_1.LabelName.SUB_SUITE, suiteTitles.join(" > "));
42
- }
43
- allureTest.historyId = test.titlePath().slice(1).join(" ");
44
- allureTest.fullName = test.title;
45
- allureTest.status = statusToAllureStats(result.status, test.expectedStatus);
46
- if (result.error) {
47
- const message = result.error.message && stripAscii(result.error.message);
48
- let trace = result.error.stack && stripAscii(result.error.stack);
49
- if (trace && message && trace.startsWith(`Error: ${message}`)) {
50
- trace = trace.substr(message.length + "Error: ".length);
51
- }
52
- allureTest.statusDetails = {
53
- message,
54
- trace,
55
- };
56
- }
57
- for (const step of result.steps) {
58
- appendStep(allureTest, step);
59
- }
60
- for (const attachment of result.attachments) {
61
- if (!attachment.body && !attachment.path) {
62
- continue;
63
- }
64
- let fileName;
65
- if (attachment.body) {
66
- fileName = runtime.writeAttachment(attachment.body, attachment.contentType);
67
- }
68
- else {
69
- if (!fs_1.default.existsSync(attachment.path)) {
70
- continue;
71
- }
72
- fileName = runtime.writeAttachmentFromPath(attachment.path, attachment.contentType);
73
- }
74
- allureTest.addAttachment(attachment.name, attachment.contentType, fileName);
75
- if (attachment.name === "diff") {
76
- allureTest.addLabel("testType", "screenshotDiff");
77
- }
78
- }
79
- for (const stdout of result.stdout) {
80
- allureTest.addAttachment("stdout", "text/plain", runtime.writeAttachment(stdout, "text/plain"));
81
- }
82
- for (const stderr of result.stderr) {
83
- allureTest.addAttachment("stderr", "text/plain", runtime.writeAttachment(stderr, "text/plain"));
84
- }
85
- allureTest.endTest(endTime);
59
+ onStepBegin(test, _result, step) {
60
+ const allureTest = this.allureTestCache.get(test);
61
+ if (!allureTest) {
62
+ return;
63
+ }
64
+ this.ensureAllureStepCreated(step, allureTest);
65
+ }
66
+ onStepEnd(_test, _result, step) {
67
+ const allureStep = this.allureStepCache.get(step);
68
+ if (!allureStep) {
69
+ return;
70
+ }
71
+ allureStep.endStep();
72
+ allureStep.status = step.error ? allure_js_commons_1.Status.FAILED : allure_js_commons_1.Status.PASSED;
73
+ }
74
+ onTestEnd(test, result) {
75
+ var _a, _b;
76
+ const runtime = this.getAllureRuntime();
77
+ const allureTest = this.allureTestCache.get(test);
78
+ if (!allureTest) {
79
+ return;
80
+ }
81
+ allureTest.status = statusToAllureStats(result.status, test.expectedStatus);
82
+ if (result.error) {
83
+ const message = result.error.message && stripAscii(result.error.message);
84
+ let trace = result.error.stack && stripAscii(result.error.stack);
85
+ if (trace && message && trace.startsWith(`Error: ${message}`)) {
86
+ trace = trace.substr(message.length + "Error: ".length);
87
+ }
88
+ allureTest.statusDetails = {
89
+ message,
90
+ trace,
91
+ };
92
+ }
93
+ for (const attachment of result.attachments) {
94
+ if (!attachment.body && !attachment.path) {
95
+ continue;
96
+ }
97
+ if (attachment.contentType === helpers_1.ALLURE_METADATA_CONTENT_TYPE) {
98
+ if (!attachment.body) {
99
+ continue;
100
+ }
101
+ const metadata = JSON.parse(attachment.body.toString());
102
+ (_a = metadata.links) === null || _a === void 0 ? void 0 : _a.forEach((val) => allureTest.addLink(val.url, val.name, val.type));
103
+ (_b = metadata.labels) === null || _b === void 0 ? void 0 : _b.forEach((val) => allureTest.addLabel(val.name, val.value));
104
+ if (metadata.description) {
105
+ allureTest.description = metadata.description;
86
106
  }
107
+ continue;
87
108
  }
88
- for (const child of suite.suites) {
89
- processSuite(child, group);
109
+ let fileName;
110
+ if (attachment.body) {
111
+ fileName = runtime.writeAttachment(attachment.body, attachment.contentType);
90
112
  }
113
+ else {
114
+ if (!fs_1.default.existsSync(attachment.path)) {
115
+ continue;
116
+ }
117
+ fileName = runtime.writeAttachmentFromPath(attachment.path, attachment.contentType);
118
+ }
119
+ allureTest.addAttachment(attachment.name, attachment.contentType, fileName);
120
+ if (attachment.name === "diff") {
121
+ allureTest.addLabel("testType", "screenshotDiff");
122
+ }
123
+ }
124
+ for (const stdout of result.stdout) {
125
+ allureTest.addAttachment("stdout", "text/plain", runtime.writeAttachment(stdout, "text/plain"));
126
+ }
127
+ for (const stderr of result.stderr) {
128
+ allureTest.addAttachment("stderr", "text/plain", runtime.writeAttachment(stderr, "text/plain"));
129
+ }
130
+ allureTest.endTest();
131
+ }
132
+ onEnd() {
133
+ for (const group of this.allureGroupCache.values()) {
91
134
  group.endGroup();
92
- };
93
- processSuite(this.suite, runtime);
135
+ }
94
136
  if (process.env.PW_ALLURE_POST_PROCESSOR_FOR_TEST) {
95
137
  try {
138
+ const writer = this.allureWriter;
139
+ void writer;
96
140
  const postProcess = eval(process.env.PW_ALLURE_POST_PROCESSOR_FOR_TEST);
97
- console.log(JSON.stringify(postProcess(writerForTest)));
141
+ console.log(JSON.stringify(postProcess(this.allureWriter)));
98
142
  }
99
143
  catch (e) {
100
- console.log(JSON.stringify({ error: e.toString() }));
144
+ console.log(JSON.stringify({ error: e.stack || String(e) }));
101
145
  }
102
146
  }
103
147
  }
148
+ getAllureRuntime() {
149
+ if (!this.allureRuntime) {
150
+ throw new Error("Unexpected state: `allureRuntime` is not initialized");
151
+ }
152
+ return this.allureRuntime;
153
+ }
154
+ ensureAllureGroupCreated(suite) {
155
+ let group = this.allureGroupCache.get(suite);
156
+ if (!group) {
157
+ const parent = suite.parent
158
+ ? this.ensureAllureGroupCreated(suite.parent)
159
+ : this.getAllureRuntime();
160
+ group = parent.startGroup(suite.title);
161
+ this.allureGroupCache.set(suite, group);
162
+ }
163
+ return group;
164
+ }
165
+ ensureAllureStepCreated(step, allureTest) {
166
+ let allureStep = this.allureStepCache.get(step);
167
+ if (!allureStep) {
168
+ const parent = step.parent
169
+ ? this.ensureAllureStepCreated(step.parent, allureTest)
170
+ : allureTest;
171
+ allureStep = parent.startStep(step.title);
172
+ this.allureStepCache.set(step, allureStep);
173
+ }
174
+ return allureStep;
175
+ }
104
176
  }
105
177
  const statusToAllureStats = (status, expectedStatus) => {
106
178
  if (status === "skipped") {
@@ -127,4 +199,17 @@ const appendStep = (parent, step) => {
127
199
  appendStep(allureStep, child);
128
200
  }
129
201
  };
202
+ const allureReportFolder = (outputFolder) => {
203
+ if (process.env.ALLURE_RESULTS_DIR) {
204
+ return path_1.default.resolve(process.cwd(), process.env.ALLURE_RESULTS_DIR);
205
+ }
206
+ if (outputFolder) {
207
+ return outputFolder;
208
+ }
209
+ return defaultReportFolder();
210
+ };
211
+ const defaultReportFolder = () => {
212
+ return path_1.default.resolve(process.cwd(), "allure-results");
213
+ };
214
+ __exportStar(require("./helpers"), exports);
130
215
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAgBA,4CAAoB;AACpB,gDAAwB;AAGxB,yDAQ2B;AAE3B,MAAM,cAAc;IAIlB,OAAO,CAAC,MAAkB,EAAE,KAAY;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,SAAS;QACP,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IAED,KAAK;QACH,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,iCAAiC;YACjE,CAAC,CAAC,IAAI,wCAAoB,EAAE;YAC5B,CAAC,CAAC,SAAS,CAAC;QACd,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,cAAI,CAAC,IAAI,CAAC,OA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AC,CAAC;KACpE;IACD,IAAI,YAAY,EAAE;QAChB,OAAO,YAAY,CAAC;KACrB;IACD,OAAO,mBAAmB,EAAE,CAAC;AAC/B,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,GAAW,EAAE;IACvC,OAAO,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,gBAAgB,CAAC,CAAC;AACvD,CAAC,CAAC;AAEF,4CAA0B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allure-playwright",
3
- "version": "2.0.0-beta.13",
3
+ "version": "2.0.0-beta.16",
4
4
  "description": "Allure Playwright integration",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -23,14 +23,14 @@
23
23
  "lint:fix": "eslint ./src --ext .ts --fix"
24
24
  },
25
25
  "devDependencies": {
26
- "@playwright/test": "=1.14.1",
26
+ "@playwright/test": "^1.20.0",
27
27
  "eslint": "^7.32.0",
28
28
  "prettier": "^2.3.2",
29
29
  "rimraf": "^3.0.2",
30
30
  "typescript": "^4.4.2"
31
31
  },
32
32
  "dependencies": {
33
- "allure-js-commons": "2.0.0-beta.13"
33
+ "allure-js-commons": "2.0.0-beta.16"
34
34
  },
35
35
  "files": [
36
36
  "dist"