playwright-slack-report-burak 3.0.35 → 3.0.36

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.
@@ -21,7 +21,6 @@ try {
21
21
  const SUMMARIES_DIR = path.join('./', 'playwright-report');
22
22
  const NODE_ARTIFACTS_DIR = path.join(SUMMARIES_DIR, 'nodeArtifacts');
23
23
  const FINAL_OUTPUT_DIR = path.join(SUMMARIES_DIR, 'finalOutput');
24
- const TEMP_MERGE_DIR = path.join(NODE_ARTIFACTS_DIR, 'temp-merge');
25
24
 
26
25
  class ResultsParser {
27
26
  result;
@@ -483,17 +482,14 @@ class ResultsParser {
483
482
  }
484
483
 
485
484
  // Copy blob files before merging (Playwright merge-reports expects blob files)
486
- // We'll copy them temporarily for merging, then extract later for resource copying
487
- if (!fs.existsSync(TEMP_MERGE_DIR)) {
488
- fs.mkdirSync(TEMP_MERGE_DIR, { recursive: true });
489
- }
485
+ // We'll copy them to FINAL_OUTPUT_DIR for merging, then extract later for resource copying
490
486
 
491
- // Copy all blob zip files to temp directory for merging
487
+ // Copy all blob zip files to FINAL_OUTPUT_DIR for merging
492
488
  for (let i = 1; i <= this.totalShardCount; i++) {
493
489
  const blobZipFile = path.join(NODE_ARTIFACTS_DIR, `blob-report-node-${i}.zip`);
494
490
  if (fs.existsSync(blobZipFile)) {
495
491
  try {
496
- const destFile = path.join(TEMP_MERGE_DIR, `blob-report-node-${i}.zip`);
492
+ const destFile = path.join(FINAL_OUTPUT_DIR, `blob-report-node-${i}.zip`);
497
493
  fs.copyFileSync(blobZipFile, destFile);
498
494
  console.log(`Copied blob-report-node-${i}.zip for merging`);
499
495
  } catch (error) {
@@ -502,8 +498,8 @@ class ResultsParser {
502
498
  }
503
499
  }
504
500
 
505
- // Execute the command to merge reports FROM TEMP_MERGE_DIR INTO finalOutput
506
- exec(`npx playwright merge-reports --reporter html ${TEMP_MERGE_DIR} ${FINAL_OUTPUT_DIR}`);
501
+ // Execute the command to merge reports IN FINAL_OUTPUT_DIR
502
+ exec(`npx playwright merge-reports --reporter html ${FINAL_OUTPUT_DIR}`);
507
503
 
508
504
  // Wait until index.html exists in finalOutput
509
505
  while (!fs.existsSync(path.join(FINAL_OUTPUT_DIR, 'index.html'))) {
package/package.json CHANGED
@@ -32,7 +32,7 @@
32
32
  "lint-fix": "npx eslint . --ext .ts --fix"
33
33
  },
34
34
  "name": "playwright-slack-report-burak",
35
- "version": "3.0.35",
35
+ "version": "3.0.36",
36
36
  "main": "index.js",
37
37
  "types": "dist/index.d.ts",
38
38
  "author": "Burak B. <burak.boluk@hotmail.com>",