playwright-slack-report-burak 1.3.2 → 1.3.3

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.
@@ -128,11 +128,15 @@ const generateProblemCaseList = async (summaryResults) => {
128
128
  for (let i = 0; i < summaryResults.failures.length; i += 1) {
129
129
  const { suiteName } = summaryResults.failures[i];
130
130
  const capitalizedSuiteName = suiteName.charAt(0).toUpperCase() + suiteName.slice(1);
131
- const parts = capitalizedSuiteName.split('/')[0];
131
+ const parts = capitalizedSuiteName.split('/').slice(0, 2).join('/');
132
132
  const backSlashedParts = parts.split('\\')[0];
133
- if (backSlashedParts !== previousSuiteName) {
134
- failedSuites.push(backSlashedParts);
135
- previousSuiteName = backSlashedParts;
133
+ const [category, feature] = backSlashedParts.split('/');
134
+ const formattedSuiteName = feature
135
+ ? `${feature.split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ')} (${category})`
136
+ : backSlashedParts;
137
+ if (formattedSuiteName !== previousSuiteName) {
138
+ failedSuites.push(formattedSuiteName);
139
+ previousSuiteName = formattedSuiteName;
136
140
  }
137
141
  }
138
142
  previousSuiteName = undefined;
@@ -142,11 +146,15 @@ const generateProblemCaseList = async (summaryResults) => {
142
146
  if (result.retry > 0 && result.status === 'passed') {
143
147
  const suiteName = result.suiteName;
144
148
  const capitalizedSuiteName = suiteName.charAt(0).toUpperCase() + suiteName.slice(1);
145
- const parts = capitalizedSuiteName.split('/')[0];
149
+ const parts = capitalizedSuiteName.split('/').slice(0, 2).join('/');
146
150
  const backSlashedParts = parts.split('\\')[0];
147
- if (backSlashedParts !== previousSuiteName) {
148
- flakySuites.push(backSlashedParts);
149
- previousSuiteName = backSlashedParts;
151
+ const [category, feature] = backSlashedParts.split('/');
152
+ const formattedSuiteName = feature
153
+ ? `${feature.split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ')} (${category})`
154
+ : backSlashedParts;
155
+ if (formattedSuiteName !== previousSuiteName) {
156
+ flakySuites.push(formattedSuiteName);
157
+ previousSuiteName = formattedSuiteName;
150
158
  }
151
159
  }
152
160
  }
@@ -158,11 +166,15 @@ const generateProblemCaseList = async (summaryResults) => {
158
166
  if (result.status === 'skipped') {
159
167
  const suiteName = result.suiteName;
160
168
  const capitalizedSuiteName = suiteName.charAt(0).toUpperCase() + suiteName.slice(1);
161
- const parts = capitalizedSuiteName.split('/')[0];
169
+ const parts = capitalizedSuiteName.split('/').slice(0, 2).join('/');
162
170
  const backSlashedParts = parts.split('\\')[0];
163
- if (backSlashedParts !== previousSuiteName) {
164
- skippedSuites.push(backSlashedParts);
165
- previousSuiteName = backSlashedParts;
171
+ const [category, feature] = backSlashedParts.split('/');
172
+ const formattedSuiteName = feature
173
+ ? `${feature.split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ')} (${category})`
174
+ : backSlashedParts;
175
+ if (formattedSuiteName !== previousSuiteName) {
176
+ skippedSuites.push(formattedSuiteName);
177
+ previousSuiteName = formattedSuiteName;
166
178
  }
167
179
  }
168
180
  }
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.3.2",
33
+ "version": "1.3.3",
34
34
  "main": "index.js",
35
35
  "types": "dist/index.d.ts",
36
36
  "repository": "git@github.com:ryanrosello-og/playwright-slack-report.git",