Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
fix: screenshots to default output even the custom folder is set
  • Loading branch information
kobenguyent committed Apr 30, 2024
commit ba2e81f6047a8fc4404398139e37b32630ee8a7c
2 changes: 1 addition & 1 deletion lib/plugin/stepByStepReport.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ module.exports = function (config) {
stepNum++;
slides[fileName] = step;
try {
await helper.saveScreenshot(path.relative(reportDir, path.join(dir, fileName)), config.fullPageScreenshots);
await helper.saveScreenshot(path.join(dir, fileName), config.fullPageScreenshots);
} catch (err) {
output.plugin(`Can't save step screenshot: ${err}`);
error = err;
Expand Down
2 changes: 1 addition & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ module.exports.screenshotOutputFolder = function (fileName) {
const fileSep = path.sep;

if (!fileName.includes(fileSep) || fileName.includes('record_')) {
return path.join(global.output_dir, fileName);
return path.resolve(global.output_dir, fileName);
}
return path.resolve(global.codecept_dir, fileName);
};
Expand Down