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
A client have screenshots with "(attempt n)" in their name, so it creates flakiness (remove / added) and does not compare screenshot. We have to:
Investigate when does Cypress do that
Be sure that the screenshot name is consistent if taken with argosScreenshot method
on('after:screenshot',(details)=>{// Get the base filename without extensionconstbaseName=path.basename(details.path,path.extname(details.path),);// Remove attempt from the filenameconstnewBaseName=baseName.replace(/ \(attempt \d+\)/,'');// Construct a new path with the original file extensionconstnewPath=path.join(path.dirname(details.path),newBaseName+path.extname(details.path),);returnnewPromise((resolve,reject)=>{fs.rename(details.path,newPath,(err)=>{if(err){returnreject(err);}resolve({path: newPath});});});});
The text was updated successfully, but these errors were encountered:
A client have screenshots with "(attempt n)" in their name, so it creates flakiness (remove / added) and does not compare screenshot. We have to:
argosScreenshot
methodThe text was updated successfully, but these errors were encountered: