playwright-slack-report-burak 1.2.4 → 1.2.5
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/dist/src/LayoutGenerator.js +22 -14
- package/package.json +1 -1
|
@@ -122,13 +122,23 @@ const generateFailuresReasons = async (summaryResults) => {
|
|
|
122
122
|
const { failureReason, test, suiteName } = summaryResults.failures[i];
|
|
123
123
|
const parts = suiteName.split('/')[suiteName.split('/').length-1].replace('.spec.ts', '');
|
|
124
124
|
const backSlashedParts = parts.split('\\')[parts.split('\\').length-1];
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
125
|
+
if (failureReason.length > 750) {
|
|
126
|
+
failsList.push({
|
|
127
|
+
type: 'section',
|
|
128
|
+
text: {
|
|
129
|
+
type: 'mrkdwn',
|
|
130
|
+
text: `${i+1}. ${test.split(' [')[0]} (${backSlashedParts})\n:exclamation:Failure reason is too long, only first 750 characters are shown:exclamation:\n\`\`\`${failureReason.substring(0, 750)}\`\`\``,
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
} else {
|
|
134
|
+
failsList.push({
|
|
135
|
+
type: 'section',
|
|
136
|
+
text: {
|
|
137
|
+
type: 'mrkdwn',
|
|
138
|
+
text: `${i+1}. ${test.split(' [')[0]} (${backSlashedParts})\n\`\`\`${failureReason}\`\`\``,
|
|
139
|
+
},
|
|
140
|
+
});
|
|
141
|
+
}
|
|
132
142
|
} else if (3 < summaryResults.failures.length < 25) {
|
|
133
143
|
const { failureReason, test, suiteName } = summaryResults.failures[i];
|
|
134
144
|
const parts = suiteName.split('/')[suiteName.split('/').length-1].replace('.spec.ts', '');
|
|
@@ -185,19 +195,17 @@ const generateFailuresReasons = async (summaryResults) => {
|
|
|
185
195
|
},
|
|
186
196
|
{
|
|
187
197
|
type: 'actions',
|
|
188
|
-
elements: [
|
|
189
|
-
{
|
|
198
|
+
elements: [{
|
|
190
199
|
type: 'button',
|
|
191
200
|
text: {
|
|
192
201
|
type: 'plain_text',
|
|
193
202
|
text: 'Go to Build Details'
|
|
194
203
|
},
|
|
195
204
|
url: process.env.CIRCLE_BUILD_URL
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
}
|
|
205
|
+
}]
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
}
|
|
201
209
|
}
|
|
202
210
|
|
|
203
211
|
// Decide on Titles For Listing Failures & Skips
|
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.
|
|
33
|
+
"version": "1.2.5",
|
|
34
34
|
"main": "index.js",
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"repository": "git@github.com:ryanrosello-og/playwright-slack-report.git",
|