Cypress - Test Organization and Patterns
Examine this Cypress API-first setup snippet:
What is the likely issue with this code?
cy.request('POST', '/api/auth', {user: 'test', pass: '1234'}).then((res) => {
expect(res.status).to.eq(200)
cy.setCookie('session', res.body.sessionId)
})
cy.visit('/profile')What is the likely issue with this code?
