green-book-63455
07/27/2022, 12:35 PM/, {
onBeforeLoad(win) {
win.authorised =true
win.emailName = "johnny@email.com"
win.fred = "Johnny"
win.authToken = body.token
win.userId = body.userId
},
})
})
cy.get('h1').should('contain', 'Svelte To-Do List')
})
Now running this works and in the svelte app, I have some console logging and that shows what I expected / hoped.
Do I need the cy.window? Or can I just use the visit with onBeforeLoad?
Many thanks for this - though being able to authenticate with request is not an essential (the time saving is minimal), this has been frustrating me for a while.