@flash-ai-team/flash-test-framework 0.0.16 → 0.0.17
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.
|
@@ -86,6 +86,31 @@ class HtmlReporter {
|
|
|
86
86
|
}
|
|
87
87
|
fs.writeFileSync(this.reportPath, html);
|
|
88
88
|
console.log(`HTML Report generated at: ${this.reportPath}`);
|
|
89
|
+
// Check if we should open the report
|
|
90
|
+
let openReport = true; // Default to true
|
|
91
|
+
try {
|
|
92
|
+
const configPath = path.join(process.cwd(), 'report.config.json');
|
|
93
|
+
if (fs.existsSync(configPath)) {
|
|
94
|
+
const config = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
|
|
95
|
+
if (config.openReport === false) {
|
|
96
|
+
openReport = false;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
catch (e) { /* ignore */ }
|
|
101
|
+
if (openReport) {
|
|
102
|
+
try {
|
|
103
|
+
// Write a marker file for VS Code extension to detect and open Latest Run view
|
|
104
|
+
const markerPath = path.join(process.cwd(), '.flash-report-ready');
|
|
105
|
+
fs.writeFileSync(markerPath, JSON.stringify({
|
|
106
|
+
reportPath: this.reportPath,
|
|
107
|
+
timestamp: Date.now()
|
|
108
|
+
}));
|
|
109
|
+
}
|
|
110
|
+
catch (e) {
|
|
111
|
+
console.log('Could not write report marker file.');
|
|
112
|
+
}
|
|
113
|
+
}
|
|
89
114
|
}
|
|
90
115
|
onTestEnd(test, result) {
|
|
91
116
|
let suite = test.parent;
|