Skip to content

Commit

Permalink
check for a request instead of the title of the whole list
Browse files Browse the repository at this point in the history
  • Loading branch information
summer-cook committed Feb 15, 2023
1 parent a7f0fce commit b44a746
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cypress/e2e/requests.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ describe('Viewing all requests', () => {
// Visit a protected route in order to allow cypress to set the cookie and mock the login
cy.visit("/requests")

const requestListExists = cy.get('h1').contains('My Requests') ||
// check that either the requests are showing, or that the user has no requests
const requestListExists = cy.get('article.request-item').should('exist') ||
cy.get('p.no-requests').contains('You do not have any requests yet.')

requestListExists.then(() => {
Expand Down

0 comments on commit b44a746

Please sign in to comment.