fierce-engineer-40904
09/05/2022, 2:29 PMjs
it('Should open widget and do a preflight', () => {
cy.get('[data-cy="twilio-widget"]').click({ force: true })
cy.intercept(
'GET',
`https://INSERTURLHERE/token`,
(req) => {
const parsedToken = twilioVoiceEntity(req.body.token)
const preflightTest = Device.runPreflight(parsedToken)
preflightTest.on('completed', (report) => {
console.log('report', report)
})
},
)
})
I want to see the console log of the report in cypress and then assert if the test failed or passes.