@flash-ai-team/flash-test-framework 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.
@@ -80,11 +80,25 @@ function ensureReportFolder(testInfo) {
80
80
  suiteName = fileName.split('.')[0];
81
81
  }
82
82
  }
83
+ // Check if our reporters are already configured.
84
+ // If they are, they will handle folder creation (in the main process), so we shouldn't create a duplicate one here (in the worker process)
85
+ // which would likely differ in timestamp.
86
+ const reporters = testInfo.config.reporter;
87
+ const hasFlashReporter = reporters.some(r => {
88
+ const name = Array.isArray(r) ? r[0] : r;
89
+ if (typeof name === 'string') {
90
+ return name.includes('CustomReporter') || name.includes('HtmlReporter') || name.includes('EmailReporter');
91
+ }
92
+ return false;
93
+ });
94
+ if (hasFlashReporter) {
95
+ return '';
96
+ }
83
97
  cachedReportFolder = path.join(process.cwd(), 'reports', suiteName, `test_${timestamp}`);
84
98
  if (!fs.existsSync(cachedReportFolder)) {
85
99
  fs.mkdirSync(cachedReportFolder, { recursive: true });
100
+ console.log(`[ReporterUtils] AUTO-CREATED report folder: ${cachedReportFolder}`);
86
101
  }
87
- console.log(`[ReporterUtils] AUTO-CREATED report folder: ${cachedReportFolder}`);
88
102
  return cachedReportFolder;
89
103
  }
90
104
  function resetReportFolderCache() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flash-ai-team/flash-test-framework",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "A powerful keyword-driven automation framework built on top of Playwright and TypeScript.",
5
5
  "keywords": [
6
6
  "playwright",