Skip to content

add: handling for different folder structure turboscale #967

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions bin/helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1179,10 +1179,17 @@
logger.debug(`${files ? files.length : 0} spec files found`);

if (turboScaleSession) {
// remove unwanted path prefix for turboscale
files = files.map((x) => { return path.join(testFolderPath, x.split(testFolderPath)[1]) })
// setting specs for turboScale as we don't have patched API for turboscale so we will rely on info from CLI
bsConfig.run_settings.specs = files;
if (bsConfig.run_settings.cypress_config_file && bsConfig.run_settings.cypress_config_filename !== 'false') {
const configFilePath = path.resolve(bsConfig.run_settings.cypressConfigFilePath);
const directory = path.join(path.dirname(configFilePath), '/');
// remove unwanted path prefix for turboscale
files = files.map((x) => { return path.join('', x.split(directory)[1]) })
// setting specs for turboScale as we don't have patched API for turboscale so we will rely on info from CLI
bsConfig.run_settings.specs = files;
} else {
files = files.map((x) => { return path.join(testFolderPath, x.split(testFolderPath)[1]) })
bsConfig.run_settings.specs = files;
}
}
return files;
};
Expand Down
Loading