param domains export const disableSameSiteLax = ( domains ) : void => { Object . keys ( domains ) . forEach ( ( key ) => { const excludeExtensions = '(?<!.css)(?<!.js)(?<!.png)(?<!.svg)(?<!.woff2)' ; const domainRegExp = new RegExp ( `.*${ domains [ key ] }.*${ excludeExtensions }$` ) ; cy . intercept ( domainRegExp , ( req ) => { req . on ( 'response' , ( res ) => { const cookies = res . headers [ 'set-cookie' ] ; if ( Array . isArray ( cookies ) ) { const setCookieHeaders = cookies . map ( ( strCookie ) => strCookie . replace ( /samesite=(lax|strict)/i , 'samesite=none' ) ) ; res . headers [ 'set-cookie' ] = setCookieHeaders ; } } ) ; } ) . as ( `${ key }:SameSiteLax` ) ; } ) ; } ; /**
 * Removes all cookies
 */ export const clearAllCookies = ( ) : void => { todo link cy . clearCookies ( { domain : null } ) ; } ;