froth-webdriverio-framework 7.0.119-dev1.8 → 7.0.119-dev1.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.
@@ -36,12 +36,16 @@ module.exports = () => {
36
36
  // Auto-generate report after execution completes
37
37
  onComplete: async function(exitCode, config, capabilities, results) {
38
38
  const { execSync } = require('child_process');
39
+ const nodePath = require('path');
39
40
  try {
40
41
  // Add a small delay to ensure Allure finishes writing all files
41
42
  await new Promise(resolve => setTimeout(resolve, 1000));
42
43
 
44
+ // Resolve script path relative to framework package (works from any CWD)
45
+ const scriptPath = nodePath.resolve(__dirname, '../../allure-report-utils/generate-allure-report.js');
46
+
43
47
  console.log('\nšŸŽÆ Generating Allure report...');
44
- execSync('node allure-report-utils/generate-allure-report.js', { stdio: 'inherit' });
48
+ execSync(`node "${scriptPath}"`, { stdio: 'inherit', cwd: process.cwd() });
45
49
  console.log('āœ… Report generation complete!');
46
50
  } catch (error) {
47
51
  console.error('āŒ Error generating report:', error.message);
@@ -133,12 +133,16 @@ module.exports = (bsCaps) => {
133
133
  // Auto-generate report after execution completes
134
134
  onComplete: async function(exitCode, config, capabilities, results) {
135
135
  const { execSync } = require('child_process');
136
+ const nodePath = require('path');
136
137
  try {
137
138
  // Add a small delay to ensure Allure finishes writing all files
138
139
  await new Promise(resolve => setTimeout(resolve, 1000));
139
140
 
141
+ // Resolve script path relative to framework package (works from any CWD)
142
+ const scriptPath = nodePath.resolve(__dirname, '../../allure-report-utils/generate-allure-report.js');
143
+
140
144
  console.log('\nšŸŽÆ Generating Allure report...');
141
- execSync('node allure-report-utils/generate-allure-report.js', { stdio: 'inherit' });
145
+ execSync(`node "${scriptPath}"`, { stdio: 'inherit', cwd: process.cwd() });
142
146
  console.log('āœ… Report generation complete!');
143
147
  } catch (error) {
144
148
  console.error('āŒ Error generating report:', error.message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "7.0.119-dev1.8",
3
+ "version": "7.0.119-dev1.9",
4
4
  "readme": "WebdriverIO Integration",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",