playwright-slack-report-burak 2.0.9 → 2.0.11
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.
|
@@ -92,8 +92,9 @@ class ResultsParser {
|
|
|
92
92
|
// Write the updated summary back to the file for the current node
|
|
93
93
|
fs.writeFileSync(nodeSummaryFile, JSON.stringify(nodeSummary, null, 2));
|
|
94
94
|
|
|
95
|
-
console.log('current shard index', this.shardIndex, 'type:', typeof this.shardIndex, 'total shard count', this.totalShardCount, 'type:', typeof this.totalShardCount, 'CI', process.env.CI, 'type:', typeof process.env.CI);
|
|
96
95
|
if (this.shardIndex === 0 && this.totalShardCount > 1) {
|
|
96
|
+
/* console.log('Fetching all artifacts...');
|
|
97
|
+
await this.fetchAllArtifacts(); */
|
|
97
98
|
if (process.env.CI) {
|
|
98
99
|
console.log('Fetching all artifacts...');
|
|
99
100
|
await this.fetchAllArtifacts();
|
|
@@ -312,7 +313,7 @@ class ResultsParser {
|
|
|
312
313
|
|
|
313
314
|
async fetchArtifact(i, file, summariesDir) {
|
|
314
315
|
const circleciToken = process.env.safetywingtest_CIRCLECI_API_TOKEN;
|
|
315
|
-
const circleciJobId = process.env.CIRCLE_WORKFLOW_JOB_ID || '
|
|
316
|
+
const circleciJobId = process.env.CIRCLE_WORKFLOW_JOB_ID || '5175a4cb-273e-42fd-a5a6-40c3dc31c9de';
|
|
316
317
|
const circleciApiUrl = `https://output.circle-artifacts.com/output/job/${circleciJobId}/artifacts/${i}/html-report/${file}`;
|
|
317
318
|
const filePath = path.join(summariesDir, file);
|
|
318
319
|
|
|
@@ -321,7 +322,8 @@ class ResultsParser {
|
|
|
321
322
|
const response = await axios.get(circleciApiUrl, {
|
|
322
323
|
headers: {
|
|
323
324
|
'Circle-Token': circleciToken,
|
|
324
|
-
}
|
|
325
|
+
},
|
|
326
|
+
responseType: 'arraybuffer'
|
|
325
327
|
});
|
|
326
328
|
|
|
327
329
|
fs.writeFileSync(filePath, response.data);
|
|
@@ -341,7 +343,7 @@ class ResultsParser {
|
|
|
341
343
|
mergeReports() {
|
|
342
344
|
try {
|
|
343
345
|
// Execute the command to merge reports
|
|
344
|
-
exec('npx playwright merge-reports --reporter html playwright-report', { stdio: 'inherit' });
|
|
346
|
+
exec('npx playwright merge-reports --reporter html ./playwright-report', { stdio: 'inherit' });
|
|
345
347
|
console.log('Reports merged successfully.');
|
|
346
348
|
} catch (error) {
|
|
347
349
|
// Log a warning instead of throwing an error
|
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": "2.0.
|
|
33
|
+
"version": "2.0.11",
|
|
34
34
|
"main": "index.js",
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"repository": "git@github.com:ryanrosello-og/playwright-slack-report.git",
|