medium10 pts · first answer countscypressnetwork
Waiting for a request in Cypress
What does this Cypress code do?
cy.intercept('GET', '/api/users*').as('getUsers')
cy.visit('/admin/users')
cy.wait('@getUsers').its('response.statusCode').should('eq', 200)
cy.get('[data-testid=user-row]').should('have.length.greaterThan', 0)Discussion 0
Join free to post in the discussion.
Related questions
- A reusable Cypress commandAutomation Test Engineer
- Where Cypress test code runsAutomation Test Engineer
- Loading test data in CypressAutomation Test Engineer
- Cypress values are not returnedAutomation Test Engineer
- Logging in once in CypressAutomation Test Engineer
- Stubbing an API in CypressAutomation Test Engineer
- Fast-forwarding time in CypressAutomation Test Engineer
- How Cypress retries a chainAutomation Test Engineer