breezy-yak-81068
09/22/2022, 12:20 AMmicroscopic-advantage-2187
09/22/2022, 6:34 AMvictorious-father-41976
09/22/2022, 7:07 AMbrash-magazine-98754
09/22/2022, 8:46 AMrapid-alarm-91235
09/22/2022, 10:39 AMicy-exabyte-68383
09/22/2022, 11:39 AMmysterious-belgium-25713
09/22/2022, 1:07 PMbillowy-bird-41053
09/22/2022, 1:40 PMacceptable-hamburger-48790
09/22/2022, 2:49 PMbillowy-bird-41053
09/22/2022, 2:49 PMblue-printer-60119
09/22/2022, 3:07 PMgray-kilobyte-89541
09/22/2022, 3:21 PMfreezing-piano-2792
09/22/2022, 3:36 PMhelpful-journalist-67147
09/22/2022, 3:36 PMfamous-restaurant-30435
09/22/2022, 5:30 PMnutritious-megabyte-64190
09/22/2022, 7:15 PMcy.getCookies({ log: true }).then(cookies => {
const cookieNames = cookies.map(c => c.name);
// 'cookie1','cookie2','cookie3','cookie4'
console.log(cookieNames.map(s => `'${s}'`).join(','));
//this doesnt work
cy.preserveCookieOnce(cookieNames.map(s => `'${s}'`).join(','));
the error i get is
Command: preserveCookieOnce
index.0fb50328.js:99244 Error:
Error: Expected the cookie name to preserve
at eval (webpack:///./node_modules/cypress-v10-preserve-cookie/src/index.js:10:0)
//this does work with no issues
cy.preserveCookieOnce(
'cookie1',
'cookie2',
'cookie3',
'cookie4'
);
acoustic-eve-26988
09/22/2022, 9:22 PMgray-kilobyte-89541
09/23/2022, 1:31 AMnutritious-megabyte-64190
09/23/2022, 1:32 AMgray-kilobyte-89541
09/23/2022, 1:32 AM...cookieNames
🙂nutritious-megabyte-64190
09/23/2022, 1:43 AMcy.getCookies({log: true})
.then(cookies => {
const cookieNames = cookies.map(c => c.name);
cy.preserveCookieOnce(...cookieNames);
// Cypress.Cookies.preserveOnce(...cookieNames);
}));
i do that but no dice either 😅polite-city-77403
09/23/2022, 6:16 AMcrooked-cartoon-49610
09/23/2022, 8:33 AMhigh-helicopter-11699
09/23/2022, 10:00 AMstale-optician-85950
09/23/2022, 10:03 AMalert-table-88416
09/23/2022, 10:09 AMalert-table-88416
09/23/2022, 10:09 AMvictorious-father-41976
09/23/2022, 10:41 AMfaint-teacher-38938
09/23/2022, 11:13 AMabundant-dentist-45237
09/23/2022, 1:15 PM