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
But I want to exclude few files such as login/authentication files from using the preserved cookies because I want to test real login here.
I see that cypress provides something like:
Cypress.Cookies.defaults({
preserve: (cookie) => {
// implement your own logic here
// if the function returns truthy
// then the cookie will not be cleared
// before each test runs
},
})
But I am not sure how to exclude a folder/files inside this.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to preserve cookies in index.js file :
But I want to exclude few files such as login/authentication files from using the preserved cookies because I want to test real login here.
I see that cypress provides something like:
But I am not sure how to exclude a folder/files inside this.
Can someone help me with sample code ?
Beta Was this translation helpful? Give feedback.
All reactions