Cypress - Test Organization and Patterns
Given this Cypress test snippet using API-first setup:
What will happen if the API returns status 400 instead of 201?
cy.request('POST', '/api/users', {name: 'Alice'}).then((response) => {
expect(response.status).to.eq(201)
cy.visit('/users/' + response.body.id)
})What will happen if the API returns status 400 instead of 201?
