playwright-slack-report-burak 2.0.7 → 2.0.9

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.
@@ -38,7 +38,7 @@ class ResultsParser {
38
38
  }*/
39
39
 
40
40
  // Define the directory to store node summaries
41
- const summariesDir = path.join(process.env.CIRCLE_WORKING_DIRECTORY || './', 'playwright-report');
41
+ const summariesDir = path.join('./', 'playwright-report');
42
42
 
43
43
  if (!fs.existsSync(summariesDir)) {
44
44
  fs.mkdirSync(summariesDir, { recursive: true });
@@ -105,6 +105,8 @@ class ResultsParser {
105
105
  }
106
106
  }
107
107
 
108
+ console.log('Contents of playwright-report for node', this.shardIndex, ':', fs.readdirSync(summariesDir));
109
+
108
110
  if (this.allNodeSummaryFilesExist() && this.allBlobZipsExist()) {
109
111
  // Merge all node summaries into the final summary
110
112
  for (let i = 0; i < this.totalShardCount; i++) {
@@ -270,7 +272,7 @@ class ResultsParser {
270
272
  }*/
271
273
  allNodeSummaryFilesExist() {
272
274
  console.log('Checking if all node summary files exist...');
273
- const summariesDir = path.join(process.env.CIRCLE_WORKING_DIRECTORY || './', 'playwright-report');
275
+ const summariesDir = path.join('./', 'playwright-report');
274
276
 
275
277
  for (let i = 0; i < this.totalShardCount; i++) {
276
278
  const nodeSummaryFile = path.join(summariesDir, `node_summary_${i}.json`);
@@ -283,7 +285,7 @@ class ResultsParser {
283
285
 
284
286
  allBlobZipsExist() {
285
287
  console.log('Checking if all blob zips exist...');
286
- const summariesDir = path.join(process.env.CIRCLE_WORKING_DIRECTORY || './', 'playwright-report');
288
+ const summariesDir = path.join('./', 'playwright-report');
287
289
 
288
290
  for (let i = 0; i < this.totalShardCount; i++) {
289
291
  const blobZipFile = path.join(summariesDir, `blob-report-node-${i}.zip`);
@@ -295,7 +297,7 @@ class ResultsParser {
295
297
  }
296
298
 
297
299
  async fetchAllArtifacts() {
298
- const summariesDir = path.join(process.env.CIRCLE_WORKING_DIRECTORY || './', 'playwright-report');
300
+ const summariesDir = path.join('./', 'playwright-report');
299
301
  while (!this.allNodeSummaryFilesExist() || !this.allBlobZipsExist()) {
300
302
  console.log('Waiting for all blob zips to exist...');
301
303
  if (!fs.existsSync(summariesDir)) {
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.7",
33
+ "version": "2.0.9",
34
34
  "main": "index.js",
35
35
  "types": "dist/index.d.ts",
36
36
  "repository": "git@github.com:ryanrosello-og/playwright-slack-report.git",