Skip to content

Commit

Permalink
Refactor tests
Browse files Browse the repository at this point in the history
  • Loading branch information
swenban committed Dec 16, 2024
1 parent 1b2cdec commit bf00eb0
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { CREATED_BY, CREATED_ON } from '../../../../support/activity-constants'

const NAME = 'An investment project'
const PROJECT_URL = urls.investments.projects.details('2')
const EYB_LEAD = [{ id: '1' }]

const buildAndMountActivity = (newJobs, eybLeads = []) => {
const activity = {
Expand Down Expand Up @@ -74,7 +75,7 @@ describe('Investment activity card', () => {

context('When the project has one new job and one linked EYB lead', () => {
beforeEach(() => {
buildAndMountActivity(1, ['leadId1'])
buildAndMountActivity(1, EYB_LEAD)
cy.get('[data-test="activity-card-wrapper"]').should('exist')
})

Expand Down Expand Up @@ -108,7 +109,7 @@ describe('Investment activity card', () => {

context('When the project has no new jobs and one linked EYB leads', () => {
beforeEach(() => {
buildAndMountActivity(0, ['leadId1'])
buildAndMountActivity(0, EYB_LEAD)
cy.get('[data-test="activity-card-wrapper"]').should('exist')
})

Expand Down

0 comments on commit bf00eb0

Please sign in to comment.