I'm trying to test that all 12 requests involved in creating an object are successful, so far this is the only way I can figure out that works. IS there a better/more efficient/more flexible way that won't break as soon as we add or remove a request?
cy.intercept('/api/**/**').as('objectCreation');
$button.click();
cy.wait('@objectCreation').its('response.statusCode').should('eq', 200);
cy.wait('@objectCreation').its('response.statusCode').should('eq', 200);
cy.wait('@objectCreation').its('response.statusCode').should('eq', 200);
cy.wait('@objectCreation').its('response.statusCode').should('eq', 200);
cy.wait('@objectCreation').its('response.statusCode').should('eq', 200);
cy.wait('@objectCreation').its('response.statusCode').should('eq', 200);
cy.wait('@objectCreation').its('response.statusCode').should('eq', 200);
cy.wait('@objectCreation').its('response.statusCode').should('eq', 200);
cy.wait('@objectCreation').its('response.statusCode').should('eq', 200);
cy.wait('@objectCreation').its('response.statusCode').should('eq', 200);
cy.wait('@objectCreation').its('response.statusCode').should('eq', 200);
cy.wait('@objectCreation').its('response.statusCode').should('eq', 200);