You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
RachelDSS
changed the title
Combination of options "contains" and "timeout"
Option "contains" don't work if the file not exist (randomBytes method not found)
Mar 6, 2023
const resolveValue = () => {
let result;
if (contains) {
result = cy.task('findFiles', { path: downloadsFolder, fileName }).then((files) => {
let isFileExist = false;
if (files !== null && files[0]) {
if (files.length > 1)
cy.log(
`**WARNING!** More than one file found for the **'${fileName}'** pattern: [${files}] - the first one **[${files[0]}]** will be used`
);
isFileExist = cy.task('isFileExist', join(downloadsFolder, files[0]));
}
return isFileExist;
});
} else {
result = cy.task('isFileExist', downloadFileName);
}
return result.then(checkFile);
};
Add the check on 'files[0]' and don't use the randomBytes method.
I try in my local env, and it work for me.
I'm seeing the same issue, which started after upgrading from node 18.17.0 to node 20.12.1. Looks like the function randomBytes got removed after being deprecated for some time. Merging #94 would be appreciated!
Hello,
Thanks for this project !
I have a question, I would check if a file was download and start by a prefix.
But I need to use a timeout too.
So I combinated options like this :
And it not work. The contains option work, but if the file don't exist, the timeout was ignore, because the method :
Was in error :
Thanks :)
The text was updated successfully, but these errors were encountered: