Skip to content

Commit

Permalink
file-download-path-set: updates to file download path on new opened t…
Browse files Browse the repository at this point in the history
…ab/window
  • Loading branch information
erla-softrams committed Jul 24, 2024
1 parent 0888213 commit 8df5c29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/_helpers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const { faker } = require("@faker-js/faker");
const taiko = require("taiko");
const path = require("path");
const moment = require("moment");

Expand Down Expand Up @@ -32,7 +31,7 @@ exports.getValue = value => {
return String(getDynamicValue(value));
};

exports.setFileDownloadPath = async () => {
exports.setFileDownloadPath = async (taiko) => {
if (download_dir) {
const file_download_dir = path.isAbsolute(`${download_dir}`) ? `${download_dir}` : process.cwd() + `/${download_dir}`;
var downloadPath = path.resolve(__dirname, file_download_dir);
Expand Down
2 changes: 1 addition & 1 deletion lib/page_steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ step(["Goto <url>", "Open <url>", "Goto <url> in new tab", "Open <url> in new ta
const response = await taiko.goto(navigateUrl);
assert.strictEqual(response.status.code, 200);
}
setFileDownloadPath();
setFileDownloadPath(taiko);
});

step(["Switch to <urlTitle>", "Switch to <urlTitle> window"], async urlTitle => {
Expand Down

0 comments on commit 8df5c29

Please sign in to comment.