Skip to content

Commit

Permalink
CollectorForm test fixed for certified copies
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammed Tareq Aziz authored and Muhammed Tareq Aziz committed Oct 9, 2024
1 parent 3369067 commit 3b058c3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ describe('Certificate collector test for a birth registration without father det
})
component.update()
expect(history.location.pathname).toBe(
'/print/check/6a5fd35d-01ec-4c37-976e-e055107a74a1/birth/father'
'/print/check/6a5fd35d-01ec-4c37-976e-e055107a74a1/birth-certificate/father'
)
})

Expand Down Expand Up @@ -270,7 +270,7 @@ describe('Certificate collector test for a birth registration without father det
})
component.update()
expect(history.location.pathname).toBe(
'/cert/collector/6a5fd35d-01ec-4c37-976e-e055107a74a1/birth/otherCertCollector'
'/cert/collector/6a5fd35d-01ec-4c37-976e-e055107a74a1/birth-certificate/otherCertCollector'
)
})
})
Expand Down Expand Up @@ -387,7 +387,7 @@ describe('Certificate collector test for a birth registration without father det
})
it('takes the user to affedavit view', async () => {
expect(history.location.pathname).toBe(
'/cert/collector/6a5fd35d-01ec-4c37-976e-e055107a74a1/birth/affidavit'
'/cert/collector/6a5fd35d-01ec-4c37-976e-e055107a74a1/birth-certificate/affidavit'
)
})

Expand Down Expand Up @@ -439,7 +439,7 @@ describe('Certificate collector test for a birth registration without father det
component.find('#submit_confirm').hostNodes().simulate('click')

expect(history.location.pathname).toBe(
'/print/payment/6a5fd35d-01ec-4c37-976e-e055107a74a1/birth'
'/print/payment/6a5fd35d-01ec-4c37-976e-e055107a74a1/birth-certificate'
)
})

Expand All @@ -464,7 +464,7 @@ describe('Certificate collector test for a birth registration without father det
).toHaveLength(1)
component.find('#submit_confirm').hostNodes().simulate('click')
expect(history.location.pathname).toBe(
'/review/6a5fd35d-01ec-4c37-976e-e055107a74a1/birth'
'/review/6a5fd35d-01ec-4c37-976e-e055107a74a1/birth-certificate'
)
})

Expand Down Expand Up @@ -575,7 +575,7 @@ describe('Certificate collector test for a death registration', () => {
$confirm.hostNodes().simulate('click')

expect(history.location.pathname).toBe(
'/review/16ff35e1-3f92-4db3-b812-c402e609fb00/death'
'/review/16ff35e1-3f92-4db3-b812-c402e609fb00/death-certificate'
)
})
})
Expand Down Expand Up @@ -632,7 +632,7 @@ describe('Certificate collector test for a marriage registration', () => {
$confirm.hostNodes().simulate('click')

expect(history.location.pathname).toBe(
'/review/18ff35e1-3d92-4db3-b815-c4d2e609fb23/marriage'
'/review/18ff35e1-3d92-4db3-b815-c4d2e609fb23/marriage-certificate'
)
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ class CollectorFormComponent extends React.Component<IProps, IState> {

this.setState({
...this.state,
certTemplateId: collector.certTemplateId as string
certTemplateId: collector?.certTemplateId as string
})
if (errLength > 0) {
this.setState({
Expand Down Expand Up @@ -310,19 +310,19 @@ class CollectorFormComponent extends React.Component<IProps, IState> {
if (isCertificateForPrintInAdvance(draft)) {
this.props.goToReviewCertificate(
declarationId,
collector.certTemplateId as string
collector?.certTemplateId as string
)
} else {
this.props.goToVerifyCollector(
declarationId,
collector.certTemplateId as string,
collector?.certTemplateId as string,
collector.type as string
)
}
} else {
this.props.goToPrintCertificate(
declarationId,
collector.certTemplateId as string,
collector?.certTemplateId as string,
nextGroup
)
}
Expand Down

0 comments on commit 3b058c3

Please sign in to comment.