allure-playwright 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.
package/README.md CHANGED
@@ -24,6 +24,14 @@ Either add **allure-playwright** into **playwright.config.ts**:
24
24
  }
25
25
  ```
26
26
 
27
+ Or pass the same value via config file:
28
+
29
+ ```js
30
+ {
31
+ reporter: [['line'], ['allure-playwright']]
32
+ }
33
+ ```
34
+
27
35
  Or pass the same value via command line:
28
36
 
29
37
  ```bash
@@ -45,9 +53,74 @@ set ALLURE_RESULTS_DIR=my-allure-results
45
53
  npx playwright test --reporter=line,allure-playwright
46
54
  ```
47
55
 
56
+ Generate Allure Report:
57
+ ```bash
58
+ allure generate my-allure-results -o allure-report --clean
59
+ ```
60
+
61
+ Open Allure Report:
62
+ ```bash
63
+ allure open allure-report
64
+ ```
65
+
66
+ ## Reporter options
67
+
68
+ Some reporter settings can set by following options:
69
+
70
+ | Option | Description | Default |
71
+ |--------------|------------------------------------------------------------------------------|--------------------|
72
+ | outputFolder | Path to results folder. | `./allure-results` |
73
+ | detail | Hide `pw:api` and `hooks` steps in report. [See below](#hooks-and-api-calls) | `true` |
74
+ | suiteTitle | Use test title instead of `allure.suite()`. [See below](#suit-title) | `true` |
75
+
76
+ ### Options Usage
77
+
78
+ ```js
79
+ const config = {
80
+ reporter: [['allure-playwright', {
81
+ detail: true,
82
+ outputFolder: 'my-allure-results',
83
+ suiteTitle: false
84
+ }]],
85
+ };
86
+ ```
87
+
88
+ ### Options for Allure TestOps compatibility
89
+
90
+ After exporting test results into Allure TestOps, the results may contain extra steps with Playwright’s API calls, as
91
+ well as collisions in the name of the suits.
92
+
93
+ #### Hooks and API calls
94
+
95
+ By default, each step of the `test.step()` functions contains subsections Playwright’s API methods calls.
96
+
97
+ The report looks like:
98
+
99
+ ```text
100
+ > Before Hooks
101
+ > browserContext.newPage
102
+
103
+ > Open example.com
104
+ > page.goto( https://example.com/)
105
+
106
+ > Expect page text
107
+ > expect.toBeVisible
108
+
109
+ > After Hooks
110
+ > browserContext.close
111
+ ```
112
+
113
+ To hide steps with `Before / After hooks` and API calls `page / expect / browser` set the option `detail: false`
114
+
115
+ #### Suit title
116
+
117
+ By default, the reporter uses the test file path as the suite name.
118
+
119
+ If tests uses the `allure.suite()` and it's value must be used in Allure TestOps custom fields, then set the option `suiteTitle: false`
120
+
48
121
  ## Proving extra information
49
122
 
50
- You can use allure labels to provide extra information about tests such via
123
+ Tests extra information can be provided by labels:
51
124
 
52
125
  - label
53
126
  - link
@@ -68,14 +141,12 @@ You can use allure labels to provide extra information about tests such via
68
141
 
69
142
  ```js
70
143
  import { test, expect } from "@playwright/test";
71
- import { allure } from "allure-playwright";
144
+ import { allure, LabelName } from "allure-playwright";
72
145
 
73
146
  test("basic test", async ({ page }, testInfo) => {
74
- allure.epic("Some Epic");
75
- allure.story("Some Story");
147
+ allure.label({ name: LabelName.LANGUAGE, value: "typescript" });
76
148
  });
77
149
  ```
78
-
79
150
  ### Links Usage
80
151
 
81
152
  ```js
@@ -91,6 +162,41 @@ test("basic test", async ({ page }, testInfo) => {
91
162
  });
92
163
  ```
93
164
 
165
+ ### Id Usage
166
+
167
+ ```js
168
+ import { test, expect } from "@playwright/test";
169
+ import { allure, LabelName } from "allure-playwright";
170
+
171
+ test("basic test", async ({ page }, testInfo) => {
172
+ allure.id("Some id");
173
+ });
174
+ ```
175
+
176
+ ### Epics Usage
177
+
178
+ ```js
179
+ import { test, expect } from "@playwright/test";
180
+ import { allure } from "allure-playwright";
181
+
182
+ test("basic test", async ({ page }, testInfo) => {
183
+ allure.epic("Some Epic");
184
+ });
185
+ ```
186
+
187
+ ### Stories Usage
188
+
189
+ ```js
190
+ import { test, expect } from "@playwright/test";
191
+ import { allure } from "allure-playwright";
192
+
193
+ test("basic test", async ({ page }, testInfo) => {
194
+ allure.story("Some Story");
195
+ });
196
+ ```
197
+
198
+
199
+
94
200
  ### Attachments Usage
95
201
 
96
202
  ```js
@@ -102,3 +208,4 @@ test("basic test", async ({ page }, testInfo) => {
102
208
  testInfo.attachments.push({ name: "screenshot", path, contentType: "image/png" });
103
209
  });
104
210
  ```
211
+
package/dist/helpers.d.ts CHANGED
@@ -3,10 +3,12 @@ export declare const ALLURE_METADATA_CONTENT_TYPE = "application/vnd.allure.meta
3
3
  export interface Metadata {
4
4
  labels?: Label[];
5
5
  links?: Link[];
6
+ description?: string;
6
7
  }
7
8
  export declare class allure {
8
9
  static addMetadataAttachment(metadata: Metadata): void;
9
10
  static label(label: Label | Label[]): void;
11
+ static description(value: string): void;
10
12
  static link(link: Link): void;
11
13
  static id(id: string): void;
12
14
  static epic(epic: string): void;
@@ -17,7 +19,7 @@ export declare class allure {
17
19
  static subSuite(name: string): void;
18
20
  static owner(owner: string): void;
19
21
  static severity(severity: string): void;
20
- static tag(tag: string): void;
22
+ static tag(...tags: string[]): void;
21
23
  static issue(issueData: Omit<Link, "type">): void;
22
24
  static tms(issueData: Omit<Link, "type">): void;
23
25
  }
package/dist/helpers.js CHANGED
@@ -19,6 +19,11 @@ class allure {
19
19
  labels: Array.isArray(label) ? label : [label],
20
20
  });
21
21
  }
22
+ static description(value) {
23
+ this.addMetadataAttachment({
24
+ description: value,
25
+ });
26
+ }
22
27
  static link(link) {
23
28
  this.addMetadataAttachment({
24
29
  links: Array.isArray(link) ? link : [link],
@@ -78,11 +83,13 @@ class allure {
78
83
  value: severity,
79
84
  });
80
85
  }
81
- static tag(tag) {
82
- this.label({
83
- name: allure_js_commons_1.LabelName.TAG,
84
- value: tag,
85
- });
86
+ static tag(...tags) {
87
+ for (const tag of tags) {
88
+ this.label({
89
+ name: allure_js_commons_1.LabelName.TAG,
90
+ value: tag,
91
+ });
92
+ }
86
93
  }
87
94
  static issue(issueData) {
88
95
  this.link({
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":";;;;;;AAAA,4DAAoC;AACpC,yDAAqE;A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ACb,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,GAAG,IAAc;QAC1B,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;YACtB,IAAI,CAAC,KAAK,CAAC;gBACT,IAAI,EAAE,6BAAS,CAAC,GAAG;gBACnB,KAAK,EAAE,GAAG;aACX,CAAC,CAAC;SACJ;IACH,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;AAjHD,wBAiHC;AAED,uDAA8C;AAArC,8GAAA,SAAS,OAAA"}
package/dist/index.d.ts CHANGED
@@ -1,11 +1,30 @@
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
+ detail?: boolean;
5
+ outputFolder?: string;
6
+ suiteTitle?: boolean;
7
+ };
3
8
  declare class AllureReporter implements Reporter {
4
9
  config: FullConfig;
5
10
  suite: Suite;
11
+ resultsDir: string;
12
+ options: AllureReporterOptions;
13
+ private allureWriter;
14
+ private allureRuntime;
15
+ private allureGroupCache;
16
+ private allureTestCache;
17
+ private allureStepCache;
18
+ constructor(options?: AllureReporterOptions);
6
19
  onBegin(config: FullConfig, suite: Suite): void;
7
- onTimeout(): void;
20
+ onTestBegin(test: TestCase): void;
21
+ onStepBegin(test: TestCase, _result: TestResult, step: TestStep): void;
22
+ onStepEnd(_test: TestCase, _result: TestResult, step: TestStep): void;
23
+ onTestEnd(test: TestCase, result: TestResult): void;
8
24
  onEnd(): void;
25
+ private getAllureRuntime;
26
+ private ensureAllureGroupCreated;
27
+ private ensureAllureStepCreated;
9
28
  }
10
29
  export default AllureReporter;
11
30
  export * from "./helpers";
package/dist/index.js CHANGED
@@ -18,110 +18,178 @@ const path_1 = __importDefault(require("path"));
18
18
  const allure_js_commons_1 = require("allure-js-commons");
19
19
  const helpers_1 = require("./helpers");
20
20
  class AllureReporter {
21
+ constructor(options = { suiteTitle: true, detail: true }) {
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
+ }
21
30
  onBegin(config, suite) {
22
31
  this.config = config;
23
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
+ });
24
38
  }
25
- onTimeout() {
26
- 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 (this.options.suiteTitle && 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);
27
58
  }
28
- onEnd() {
29
- const writerForTest = process.env.PW_ALLURE_POST_PROCESSOR_FOR_TEST
30
- ? new allure_js_commons_1.InMemoryAllureWriter()
31
- : undefined;
32
- const resultsDir = process.env.ALLURE_RESULTS_DIR || path_1.default.join(process.cwd(), "allure-results");
33
- const runtime = new allure_js_commons_1.AllureRuntime({ resultsDir, writer: writerForTest });
34
- const processSuite = (suite, parent) => {
35
- var _a, _b;
36
- const groupName = "Root";
37
- const group = parent.startGroup(groupName);
38
- for (const test of suite.tests) {
39
- for (const result of test.results) {
40
- const startTime = result.startTime.getTime();
41
- const endTime = startTime + result.duration;
42
- const allureTest = group.startTest(test.title, startTime);
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
- allureTest.status = statusToAllureStats(result.status, test.expectedStatus);
58
- if (result.error) {
59
- const message = result.error.message && stripAscii(result.error.message);
60
- let trace = result.error.stack && stripAscii(result.error.stack);
61
- if (trace && message && trace.startsWith(`Error: ${message}`)) {
62
- trace = trace.substr(message.length + "Error: ".length);
63
- }
64
- allureTest.statusDetails = {
65
- message,
66
- trace,
67
- };
68
- }
69
- for (const step of result.steps) {
70
- appendStep(allureTest, step);
71
- }
72
- for (const attachment of result.attachments) {
73
- if (!attachment.body && !attachment.path) {
74
- continue;
75
- }
76
- if (attachment.contentType === helpers_1.ALLURE_METADATA_CONTENT_TYPE) {
77
- if (!attachment.body) {
78
- continue;
79
- }
80
- const metadata = JSON.parse(attachment.body.toString());
81
- (_a = metadata.links) === null || _a === void 0 ? void 0 : _a.forEach((val) => allureTest.addLink(val.url, val.name, val.type));
82
- (_b = metadata.labels) === null || _b === void 0 ? void 0 : _b.forEach((val) => allureTest.addLabel(val.name, val.value));
83
- continue;
84
- }
85
- let fileName;
86
- if (attachment.body) {
87
- fileName = runtime.writeAttachment(attachment.body, attachment.contentType);
88
- }
89
- else {
90
- if (!fs_1.default.existsSync(attachment.path)) {
91
- continue;
92
- }
93
- fileName = runtime.writeAttachmentFromPath(attachment.path, attachment.contentType);
94
- }
95
- allureTest.addAttachment(attachment.name, attachment.contentType, fileName);
96
- if (attachment.name === "diff") {
97
- allureTest.addLabel("testType", "screenshotDiff");
98
- }
99
- }
100
- for (const stdout of result.stdout) {
101
- allureTest.addAttachment("stdout", "text/plain", runtime.writeAttachment(stdout, "text/plain"));
102
- }
103
- for (const stderr of result.stderr) {
104
- allureTest.addAttachment("stderr", "text/plain", runtime.writeAttachment(stderr, "text/plain"));
105
- }
106
- allureTest.endTest(endTime);
59
+ onStepBegin(test, _result, step) {
60
+ const allureTest = this.allureTestCache.get(test);
61
+ if (!allureTest) {
62
+ return;
63
+ }
64
+ if (!this.options.detail && step.category !== "test.step") {
65
+ return;
66
+ }
67
+ this.ensureAllureStepCreated(step, allureTest);
68
+ }
69
+ onStepEnd(_test, _result, step) {
70
+ const allureStep = this.allureStepCache.get(step);
71
+ if (!allureStep) {
72
+ return;
73
+ }
74
+ if (!this.options.detail && step.category !== "test.step") {
75
+ return;
76
+ }
77
+ allureStep.endStep();
78
+ allureStep.status = step.error ? allure_js_commons_1.Status.FAILED : allure_js_commons_1.Status.PASSED;
79
+ }
80
+ onTestEnd(test, result) {
81
+ var _a, _b;
82
+ const runtime = this.getAllureRuntime();
83
+ const allureTest = this.allureTestCache.get(test);
84
+ if (!allureTest) {
85
+ return;
86
+ }
87
+ allureTest.status = statusToAllureStats(result.status, test.expectedStatus);
88
+ if (result.error) {
89
+ const message = result.error.message && stripAscii(result.error.message);
90
+ let trace = result.error.stack && stripAscii(result.error.stack);
91
+ if (trace && message && trace.startsWith(`Error: ${message}`)) {
92
+ trace = trace.substr(message.length + "Error: ".length);
93
+ }
94
+ allureTest.statusDetails = {
95
+ message,
96
+ trace,
97
+ };
98
+ }
99
+ for (const attachment of result.attachments) {
100
+ if (!attachment.body && !attachment.path) {
101
+ continue;
102
+ }
103
+ if (attachment.contentType === helpers_1.ALLURE_METADATA_CONTENT_TYPE) {
104
+ if (!attachment.body) {
105
+ continue;
106
+ }
107
+ const metadata = JSON.parse(attachment.body.toString());
108
+ (_a = metadata.links) === null || _a === void 0 ? void 0 : _a.forEach((val) => allureTest.addLink(val.url, val.name, val.type));
109
+ (_b = metadata.labels) === null || _b === void 0 ? void 0 : _b.forEach((val) => allureTest.addLabel(val.name, val.value));
110
+ if (metadata.description) {
111
+ allureTest.description = metadata.description;
107
112
  }
113
+ continue;
108
114
  }
109
- for (const child of suite.suites) {
110
- processSuite(child, group);
115
+ let fileName;
116
+ if (attachment.body) {
117
+ fileName = runtime.writeAttachment(attachment.body, attachment.contentType);
118
+ }
119
+ else {
120
+ if (!fs_1.default.existsSync(attachment.path)) {
121
+ continue;
122
+ }
123
+ fileName = runtime.writeAttachmentFromPath(attachment.path, attachment.contentType);
111
124
  }
125
+ if (attachment.name.endsWith("-expected.png")) {
126
+ allureTest.addAttachment("expected", attachment.contentType, fileName);
127
+ }
128
+ else if (attachment.name.endsWith("-actual.png")) {
129
+ allureTest.addAttachment("actual", attachment.contentType, fileName);
130
+ }
131
+ else if (attachment.name.endsWith("-diff.png")) {
132
+ allureTest.addAttachment("diff", attachment.contentType, fileName);
133
+ }
134
+ else {
135
+ allureTest.addAttachment(attachment.name, attachment.contentType, fileName);
136
+ }
137
+ if (attachment.name === "diff" || attachment.name.endsWith("-diff.png")) {
138
+ allureTest.addLabel("testType", "screenshotDiff");
139
+ }
140
+ }
141
+ for (const stdout of result.stdout) {
142
+ allureTest.addAttachment("stdout", "text/plain", runtime.writeAttachment(stdout, "text/plain"));
143
+ }
144
+ for (const stderr of result.stderr) {
145
+ allureTest.addAttachment("stderr", "text/plain", runtime.writeAttachment(stderr, "text/plain"));
146
+ }
147
+ allureTest.endTest();
148
+ }
149
+ onEnd() {
150
+ for (const group of this.allureGroupCache.values()) {
112
151
  group.endGroup();
113
- };
114
- processSuite(this.suite, runtime);
152
+ }
115
153
  if (process.env.PW_ALLURE_POST_PROCESSOR_FOR_TEST) {
116
154
  try {
155
+ const writer = this.allureWriter;
156
+ void writer;
117
157
  const postProcess = eval(process.env.PW_ALLURE_POST_PROCESSOR_FOR_TEST);
118
- console.log(JSON.stringify(postProcess(writerForTest)));
158
+ console.log(JSON.stringify(postProcess(this.allureWriter)));
119
159
  }
120
160
  catch (e) {
121
- console.log(JSON.stringify({ error: e.toString() }));
161
+ console.log(JSON.stringify({ error: e.stack || String(e) }));
122
162
  }
123
163
  }
124
164
  }
165
+ getAllureRuntime() {
166
+ if (!this.allureRuntime) {
167
+ throw new Error("Unexpected state: `allureRuntime` is not initialized");
168
+ }
169
+ return this.allureRuntime;
170
+ }
171
+ ensureAllureGroupCreated(suite) {
172
+ let group = this.allureGroupCache.get(suite);
173
+ if (!group) {
174
+ const parent = suite.parent
175
+ ? this.ensureAllureGroupCreated(suite.parent)
176
+ : this.getAllureRuntime();
177
+ group = parent.startGroup(suite.title);
178
+ this.allureGroupCache.set(suite, group);
179
+ }
180
+ return group;
181
+ }
182
+ ensureAllureStepCreated(step, allureTest) {
183
+ let allureStep = this.allureStepCache.get(step);
184
+ if (!allureStep) {
185
+ const parent = step.parent
186
+ ? this.ensureAllureStepCreated(step.parent, allureTest)
187
+ : allureTest;
188
+ allureStep = parent.startStep(step.title);
189
+ this.allureStepCache.set(step, allureStep);
190
+ }
191
+ return allureStep;
192
+ }
125
193
  }
126
194
  const statusToAllureStats = (status, expectedStatus) => {
127
195
  if (status === "skipped") {
@@ -148,5 +216,17 @@ const appendStep = (parent, step) => {
148
216
  appendStep(allureStep, child);
149
217
  }
150
218
  };
219
+ const allureReportFolder = (outputFolder) => {
220
+ if (process.env.ALLURE_RESULTS_DIR) {
221
+ return path_1.default.resolve(process.cwd(), process.env.ALLURE_RESULTS_DIR);
222
+ }
223
+ if (outputFolder) {
224
+ return outputFolder;
225
+ }
226
+ return defaultReportFolder();
227
+ };
228
+ const defaultReportFolder = () => {
229
+ return path_1.default.resolve(process.cwd(), "allure-results");
230
+ };
151
231
  __exportStar(require("./helpers"), exports);
152
232
  //# 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,yDAS2B;AAE3B,uCAAmE;AAEnE,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,C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CAAC,0BAAM,CAAC,MAAM,CAAC;IAC/D,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,KAAK,IAAI,EAAE,EAAE;QACpC,UAAU,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;KAC/B;AACH,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,YAAqB,EAAU,EAAE;IAC3D,IAAI,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE;QAClC,OAAO,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,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.15",
3
+ "version": "2.0.0-beta.18",
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.18.0",
26
+ "@playwright/test": "^1.22.2",
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.15"
33
+ "allure-js-commons": "2.0.0-beta.18"
34
34
  },
35
35
  "files": [
36
36
  "dist"