Skip to content

Commit

Permalink
Update e2e.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
zlwaterfield committed Mar 27, 2024
1 parent 1597ace commit 876586c
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions cypress/support/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@ beforeEach(() => {
email: '[email protected]',
password: '12345678',
})
cy.visit('/?no-preloaded-app-context=true')
} else if (Cypress.spec.name.includes('before')) {
cy.request('POST', '/api/login/', {
email: '[email protected]',
password: '12345678',
})

cy.visit('/?no-preloaded-app-context=true')
} else {
cy.intercept('GET', /\/api\/projects\/\d+\/insights\/?\?/).as('getInsights')
Expand All @@ -68,10 +61,15 @@ beforeEach(() => {
email: '[email protected]',
password: '12345678',
})
cy.visit('/insights')
cy.wait('@getInsights').then(() => {
cy.get('.saved-insights tr').should('exist')
})

if (Cypress.spec.name.includes('before-onboarding')) {
cy.visit('/?no-preloaded-app-context=true')
} else {
cy.visit('/insights')
cy.wait('@getInsights').then(() => {
cy.get('.saved-insights tr').should('exist')
})
}
}
})

Expand Down

0 comments on commit 876586c

Please sign in to comment.