File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
tdrs-frontend/cypress/support Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ Cypress.Commands.add('login', (username) => {
4040 . invoke ( 'dispatch' , {
4141 type : 'SET_AUTH' ,
4242 payload : {
43- user : response ?. body ?. user
43+ user : response ?. body ?. user ,
4444 } ,
4545 } )
4646
@@ -85,6 +85,7 @@ Cypress.Commands.add(
8585 cy . get ( '@adminSessionId' ) . then ( ( sessionId ) =>
8686 cy . setCookie ( 'sessionid' , sessionId )
8787 )
88+ cy . clearCookie ( 'csrftoken' )
8889 cy . get ( '@adminCsrfToken' ) . then ( ( csrfToken ) => {
8990 cy . setCookie ( 'csrftoken' , csrfToken )
9091 options . headers [ 'X-CSRFToken' ] = csrfToken
@@ -118,8 +119,11 @@ Cypress.Commands.add(
118119 options = {
119120 method,
120121 body,
121- headers,
122122 url : `${ Cypress . env ( 'apiUrl' ) } ${ path } ` ,
123+ headers : {
124+ ...headers ,
125+ Referer : `${ Cypress . env ( 'apiUrl' ) } ` ,
126+ } ,
123127 }
124128
125129 cy . get ( '@adminSessionId' ) . then ( ( sessionId ) =>
You can’t perform that action at this time.
0 commit comments