Skip to content

Commit

Permalink
test code related to certTemplateId fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
tareq89 committed Oct 23, 2024
1 parent 3ba7e34 commit 5113141
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

import type { GQLRelatedPersonInput } from '@client/utils/gateway-deprecated-do-not-use'
import { ICertificate, IFileValue, TransformedData } from '@client/forms'
import { ICertificate, IFileValue } from '@client/forms'
import { omit } from 'lodash'

export function stripTypename(obj: any): any {
Expand Down
1 change: 1 addition & 0 deletions packages/client/src/tests/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,7 @@ type History {
system: IntegratedSystem
location: Location
office: Location
certTemplateId: String
dhis2Notification: Boolean
comments: [Comment]
input: [InputOutput]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ export function IssueCollectorForm({
function continueButtonHandler() {
const relationship =
declaration.data.registration.certificates[0].collector?.type
const event = declaration.event
if (!relationship) return
if (relationship === 'OTHER') {
dispatch(goToIssueCertificate(declaration.id, 'otherCollector'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ Object {
"foetalDeathsToMother": null,
"history": Array [
Object {
"certTemplateId": null,
"certificates": Array [
null,
],
Expand Down Expand Up @@ -655,6 +656,7 @@ Object {
"femaleDependentsOfDeceased": 4,
"history": Array [
Object {
"certTemplateId": null,
"certificates": Array [],
"comments": Array [],
"date": "2023-09-22T11:52:48.611+00:00",
Expand Down Expand Up @@ -1203,6 +1205,7 @@ Object {
},
"history": Array [
Object {
"certTemplateId": null,
"certificates": Array [],
"comments": Array [],
"date": "2023-09-22T08:54:57.825+00:00",
Expand Down
4 changes: 2 additions & 2 deletions packages/workflow/src/records/handler/certify.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ describe('Certify record endpoint', () => {
event: 'BIRTH',
certificate: {
hasShowedVerifiedDocument: true,
data: 'data:application/pdf;base64,AXDWYZ',
certTemplateId: 'birth-certificate',
collector: {
relationship: 'INFORMANT'
}
Expand Down Expand Up @@ -215,7 +215,7 @@ describe('Certify record endpoint', () => {
event: 'BIRTH',
certificate: {
hasShowedVerifiedDocument: true,
data: 'data:application/pdf;base64,AXDWYZ',
certTemplateId: 'birth-certificate',
collector: {
relationship: 'Other',
otherRelationship: 'Uncle',
Expand Down

0 comments on commit 5113141

Please sign in to comment.