playwright-slack-report-burak 3.0.23 → 3.0.24
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 +7 -28
- package/package.json +1 -1
|
@@ -8,24 +8,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
8
8
|
exports.generateAllRunSuites =
|
|
9
9
|
void 0;
|
|
10
10
|
|
|
11
|
-
// Helper function to get build URL and CI platform name
|
|
12
|
-
const getBuildInfo = () => {
|
|
13
|
-
if (process.env.GITHUB_ACTIONS || process.env.SAFETYWINGTEST_GITHUB_TOKEN) {
|
|
14
|
-
const repo = process.env.GITHUB_REPOSITORY;
|
|
15
|
-
const runId = process.env.GITHUB_RUN_ID;
|
|
16
|
-
const serverUrl = process.env.GITHUB_SERVER_URL || 'https://github.com';
|
|
17
|
-
const buildUrl = `${serverUrl}/${repo}/actions/runs/${runId}`;
|
|
18
|
-
return {
|
|
19
|
-
url: buildUrl,
|
|
20
|
-
platform: 'GitHub Actions'
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
return {
|
|
24
|
-
url: '#',
|
|
25
|
-
platform: 'CI'
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
|
|
29
11
|
const generateAllRunSuites = async (summaryResults) => {
|
|
30
12
|
const suitesResults = [];
|
|
31
13
|
const allSuites = [];
|
|
@@ -273,13 +255,12 @@ const generateProblemCaseList = async (summaryResults) => {
|
|
|
273
255
|
let text = `${title}${list.map((value, index) => `*${index + 1}.* ${value}`).join('\n')}`;
|
|
274
256
|
if (text.length > 2700) {
|
|
275
257
|
text = text.substring(0, 2700) + '...';
|
|
276
|
-
const buildInfo = getBuildInfo();
|
|
277
258
|
array.push({
|
|
278
259
|
type: 'section',
|
|
279
260
|
text: {
|
|
280
261
|
type: 'mrkdwn',
|
|
281
|
-
text: text + '\n\n\n' +
|
|
282
|
-
|
|
262
|
+
text: text + '\n\n\n' + '⚠️ *There are too many items to display here. ' +
|
|
263
|
+
'You can view more on Github Actions* ⚠️',
|
|
283
264
|
},
|
|
284
265
|
},
|
|
285
266
|
{
|
|
@@ -290,7 +271,7 @@ const generateProblemCaseList = async (summaryResults) => {
|
|
|
290
271
|
type: 'plain_text',
|
|
291
272
|
text: 'Go to Build Details'
|
|
292
273
|
},
|
|
293
|
-
url:
|
|
274
|
+
url: 'https://github.com/safetywing/test-automation/actions'
|
|
294
275
|
}]
|
|
295
276
|
});
|
|
296
277
|
} else {
|
|
@@ -375,13 +356,12 @@ const generateFailuresReasons = async (summaryResults) => {
|
|
|
375
356
|
},
|
|
376
357
|
});
|
|
377
358
|
if (i === summaryResults.failures.length-1) {
|
|
378
|
-
const buildInfo = getBuildInfo();
|
|
379
359
|
failsList.push({
|
|
380
360
|
type: 'section',
|
|
381
361
|
text: {
|
|
382
362
|
type: 'mrkdwn',
|
|
383
363
|
text: '⚠️ *There are too many failures to display in full detail. '+
|
|
384
|
-
|
|
364
|
+
'You can view more on Github Actions* ⚠️',
|
|
385
365
|
},
|
|
386
366
|
},
|
|
387
367
|
{
|
|
@@ -393,7 +373,7 @@ const generateFailuresReasons = async (summaryResults) => {
|
|
|
393
373
|
type: 'plain_text',
|
|
394
374
|
text: 'Go to Build Details'
|
|
395
375
|
},
|
|
396
|
-
url:
|
|
376
|
+
url: 'https://github.com/safetywing/test-automation/actions'
|
|
397
377
|
}
|
|
398
378
|
]
|
|
399
379
|
});
|
|
@@ -411,13 +391,12 @@ const generateFailuresReasons = async (summaryResults) => {
|
|
|
411
391
|
},
|
|
412
392
|
});
|
|
413
393
|
if (i > 23) {
|
|
414
|
-
const buildInfo = getBuildInfo();
|
|
415
394
|
failsList.push({
|
|
416
395
|
type: 'section',
|
|
417
396
|
text: {
|
|
418
397
|
type: 'mrkdwn',
|
|
419
398
|
text: '⚠️ *There are too many failures to display here '+
|
|
420
|
-
|
|
399
|
+
'You can view more on Github Actions* ⚠️',
|
|
421
400
|
},
|
|
422
401
|
},
|
|
423
402
|
{
|
|
@@ -428,7 +407,7 @@ const generateFailuresReasons = async (summaryResults) => {
|
|
|
428
407
|
type: 'plain_text',
|
|
429
408
|
text: 'Go to Build Details'
|
|
430
409
|
},
|
|
431
|
-
url:
|
|
410
|
+
url: 'https://github.com/safetywing/test-automation/actions'
|
|
432
411
|
}]
|
|
433
412
|
});
|
|
434
413
|
break;
|
package/package.json
CHANGED