playwright-slack-report-burak 1.2.0 → 1.2.2

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.
@@ -18,13 +18,14 @@ class ResultsParser {
18
18
  const flakes = await this.getFlakes();
19
19
  let passes = await this.getPasses();
20
20
  const skippers = await this.getSkippers();
21
- if (this.separateFlakyTests) {
21
+ /*if (this.separateFlakyTests) {
22
22
  passes = this.doSeparateFlakyTests(passes, flakes);
23
- }
23
+ }*/
24
24
  const summary = {
25
25
  passed: passes.length,
26
26
  failed: failures.length,
27
- flaky: this.separateFlakyTests ? flakes.length : undefined,
27
+ flaky: (this.separateFlakyTests && flakes.length > 0) ?
28
+ flakes.length : 0,
28
29
  skipped: skippers.length,
29
30
  failures,
30
31
  tests: [],
@@ -32,9 +33,9 @@ class ResultsParser {
32
33
  for (const suite of this.result) {
33
34
  summary.tests = summary.tests.concat(suite.testSuite.tests);
34
35
  for (const test of suite.testSuite.tests) {
35
- if (test.status === 'skipped') {
36
+ /*if (test.status === 'skipped') {
36
37
  summary.skipped += 1;
37
- }
38
+ }*/
38
39
  }
39
40
  }
40
41
  return summary;
@@ -49,6 +50,8 @@ class ResultsParser {
49
50
  failures.push({
50
51
  test: ResultsParser.getTestName(test),
51
52
  failureReason: test.reason,
53
+ retries: test.retries,
54
+ suiteName: test.suiteName,
52
55
  });
53
56
  }
54
57
  }
@@ -74,7 +77,7 @@ class ResultsParser {
74
77
  const passes = [];
75
78
  for (const suite of this.result) {
76
79
  for (const test of suite.testSuite.tests) {
77
- if (test.status === 'passed') {
80
+ if (test.status === 'passed' && test.retry === 0) {
78
81
  passes.push({
79
82
  test: ResultsParser.getTestName(test),
80
83
  });
package/package.json CHANGED
@@ -30,7 +30,7 @@
30
30
  "lint-fix": "npx eslint . --ext .ts --fix"
31
31
  },
32
32
  "name": "playwright-slack-report-burak",
33
- "version": "1.2.00",
33
+ "version": "1.2.2",
34
34
  "main": "index.js",
35
35
  "types": "dist/index.d.ts",
36
36
  "repository": "git@github.com:ryanrosello-og/playwright-slack-report.git",