playwright-ai-reporter 0.0.5 → 0.0.6

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/reporter.js CHANGED
@@ -438,8 +438,14 @@ class PlaywrightTestReporter {
438
438
  failedTests,
439
439
  };
440
440
  try {
441
+ // Ensure output directory exists
442
+ if (!fs.existsSync(this.outputDir)) {
443
+ fs.mkdirSync(this.outputDir, { recursive: true });
444
+ console.log(`Created output directory: ${path.resolve(this.outputDir)}`);
445
+ }
441
446
  const filePath = path.join(this.outputDir, '.last-run.json');
442
447
  fs.writeFileSync(filePath, JSON.stringify(lastRunData, null, 2));
448
+ console.log(`Last run status written to: ${path.resolve(filePath)}`);
443
449
  }
444
450
  catch (error) {
445
451
  console.error('Failed to write last run status:', error);
@@ -51,12 +51,14 @@ class FileHandler {
51
51
  // Ensure the output directory exists
52
52
  if (!fs.existsSync(outputDir)) {
53
53
  fs.mkdirSync(outputDir, { recursive: true });
54
+ console.log(`Created output directory: ${path.resolve(outputDir)}`);
54
55
  }
55
56
  this.failuresFilePath = path.join(outputDir, 'testFailures.json');
56
57
  this.summaryFilePath = path.join(outputDir, 'testSummary.json');
57
58
  // Initialize failures file with empty array if it doesn't exist
58
59
  if (!fs.existsSync(this.failuresFilePath)) {
59
60
  fs.writeFileSync(this.failuresFilePath, JSON.stringify([], null, 2));
61
+ console.log(`Initialized test failures file: ${path.resolve(this.failuresFilePath)}`);
60
62
  }
61
63
  // Setup periodic flushing of the buffer (every 5 seconds)
62
64
  this.startPeriodicFlush();
@@ -82,6 +84,7 @@ class FileHandler {
82
84
  runEnvironment: summary.buildInfo?.isPipeline ? 'Pipeline' : 'Local',
83
85
  };
84
86
  fs.writeFileSync(this.summaryFilePath, JSON.stringify(summaryWithTests, null, 2));
87
+ console.log(`Test summary written to: ${path.resolve(this.summaryFilePath)}`);
85
88
  // Final flush of failures buffer
86
89
  this.flushFailuresBuffer();
87
90
  // Stop the periodic flush
@@ -124,6 +127,7 @@ class FileHandler {
124
127
  const allFailures = [...existingFailures, ...this.failuresBuffer];
125
128
  // Write back to file
126
129
  fs.writeFileSync(this.failuresFilePath, JSON.stringify(allFailures, null, 2));
130
+ console.log(`Test failures written to: ${path.resolve(this.failuresFilePath)} (${allFailures.length} total failures)`);
127
131
  // Clear buffer
128
132
  this.failuresBuffer = [];
129
133
  this.isBufferDirty = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playwright-ai-reporter",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "Enterprise-grade AI-powered test reporter for Playwright with automatic bug creation, intelligent fix suggestions, auto-healing PRs, and multi-provider support for CI/CD pipelines.",
5
5
  "keywords": [
6
6
  "playwright",
Binary file
Binary file