From a2b14945cefc18d6ecc449805c947aca1c3d652b Mon Sep 17 00:00:00 2001 From: Yen Le Date: Mon, 25 Nov 2024 17:31:52 +0700 Subject: [PATCH] test: add link types into the test --- packages/services/src/__tests__/aggregationEvent.test.ts | 1 + .../src/__tests__/epcisEvents/associationEvent.test.ts | 1 + .../services/src/__tests__/epcisEvents/objectEvent.test.ts | 1 + .../__tests__/epcisEvents/transformationEventOnly.test.ts | 1 + packages/services/src/__tests__/processDPP.test.ts | 5 +++-- .../src/__tests__/processDigitalFacilityRecord.test.ts | 1 + .../src/__tests__/processDigitalIdentityAnchor.test.ts | 1 + packages/services/src/__tests__/transactionEvent.test.ts | 1 + packages/services/src/__tests__/transformationEvent.test.ts | 1 + 9 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/services/src/__tests__/aggregationEvent.test.ts b/packages/services/src/__tests__/aggregationEvent.test.ts index 855d03d5..67a13706 100644 --- a/packages/services/src/__tests__/aggregationEvent.test.ts +++ b/packages/services/src/__tests__/aggregationEvent.test.ts @@ -23,6 +23,7 @@ jest.mock('../linkResolver.service', () => ({ verificationLinkType: 'gs1:verificationService', certificationLinkType: 'gs1:certificationInfo', epcisLinkType: 'gs1:epcis', + traceability: 'traceability', }, })); diff --git a/packages/services/src/__tests__/epcisEvents/associationEvent.test.ts b/packages/services/src/__tests__/epcisEvents/associationEvent.test.ts index e42c108f..cd717f87 100644 --- a/packages/services/src/__tests__/epcisEvents/associationEvent.test.ts +++ b/packages/services/src/__tests__/epcisEvents/associationEvent.test.ts @@ -23,6 +23,7 @@ jest.mock('../../linkResolver.service', () => ({ verificationLinkType: 'verificationService', certificationLinkType: 'certificationInfo', epcisLinkType: 'epcis', + traceability: 'traceability', }, })); diff --git a/packages/services/src/__tests__/epcisEvents/objectEvent.test.ts b/packages/services/src/__tests__/epcisEvents/objectEvent.test.ts index 9554e195..049b4402 100644 --- a/packages/services/src/__tests__/epcisEvents/objectEvent.test.ts +++ b/packages/services/src/__tests__/epcisEvents/objectEvent.test.ts @@ -23,6 +23,7 @@ jest.mock('../../linkResolver.service', () => ({ verificationLinkType: 'verificationService', certificationLinkType: 'certificationInfo', epcisLinkType: 'epcis', + traceability: 'traceability', }, })); diff --git a/packages/services/src/__tests__/epcisEvents/transformationEventOnly.test.ts b/packages/services/src/__tests__/epcisEvents/transformationEventOnly.test.ts index 37fc76b7..653e5b5f 100644 --- a/packages/services/src/__tests__/epcisEvents/transformationEventOnly.test.ts +++ b/packages/services/src/__tests__/epcisEvents/transformationEventOnly.test.ts @@ -23,6 +23,7 @@ jest.mock('../../linkResolver.service', () => ({ verificationLinkType: 'verificationService', certificationLinkType: 'certificationInfo', epcisLinkType: 'epcis', + traceability: 'traceability', }, })); diff --git a/packages/services/src/__tests__/processDPP.test.ts b/packages/services/src/__tests__/processDPP.test.ts index 0f07a5b6..88702547 100644 --- a/packages/services/src/__tests__/processDPP.test.ts +++ b/packages/services/src/__tests__/processDPP.test.ts @@ -21,6 +21,7 @@ jest.mock('../linkResolver.service', () => ({ verificationLinkType: 'gs1:verificationService', certificationLinkType: 'gs1:certificationInfo', epcisLinkType: 'gs1:epcis', + sustainabilityInfo: 'sustainabilityInfo', }, })); @@ -103,13 +104,13 @@ describe('processDPP', () => { '01', dataDPP.data.herd.identifier, dppContext.dlrLinkTitle, - LinkType.certificationLinkType, + LinkType.sustainabilityInfo, dppContext.dlrVerificationPage, dlrContext.dlrAPIUrl, dlrContext.dlrAPIKey, dlrContext.namespace, dataDPP.qualifierPath, - LinkType.certificationLinkType, + LinkType.sustainabilityInfo, ); }); diff --git a/packages/services/src/__tests__/processDigitalFacilityRecord.test.ts b/packages/services/src/__tests__/processDigitalFacilityRecord.test.ts index f29cb93d..83c35414 100644 --- a/packages/services/src/__tests__/processDigitalFacilityRecord.test.ts +++ b/packages/services/src/__tests__/processDigitalFacilityRecord.test.ts @@ -24,6 +24,7 @@ jest.mock('../linkResolver.service', () => ({ verificationLinkType: 'verificationService', certificationLinkType: 'certificationInfo', epcisLinkType: 'epcis', + locationInfo: 'locationInfo', }, })); diff --git a/packages/services/src/__tests__/processDigitalIdentityAnchor.test.ts b/packages/services/src/__tests__/processDigitalIdentityAnchor.test.ts index 57c45ad3..391aeaa9 100644 --- a/packages/services/src/__tests__/processDigitalIdentityAnchor.test.ts +++ b/packages/services/src/__tests__/processDigitalIdentityAnchor.test.ts @@ -24,6 +24,7 @@ jest.mock('../linkResolver.service', () => ({ verificationLinkType: 'verificationService', certificationLinkType: 'certificationInfo', epcisLinkType: 'epcis', + registryEntry: 'registryEntry', }, })); diff --git a/packages/services/src/__tests__/transactionEvent.test.ts b/packages/services/src/__tests__/transactionEvent.test.ts index d9bd6e7d..70746243 100644 --- a/packages/services/src/__tests__/transactionEvent.test.ts +++ b/packages/services/src/__tests__/transactionEvent.test.ts @@ -23,6 +23,7 @@ jest.mock('../linkResolver.service', () => ({ verificationLinkType: 'gs1:verificationService', certificationLinkType: 'gs1:certificationInfo', epcisLinkType: 'gs1:epcis', + traceability: 'traceability', }, })); diff --git a/packages/services/src/__tests__/transformationEvent.test.ts b/packages/services/src/__tests__/transformationEvent.test.ts index 2a8d0adf..a95b11ae 100644 --- a/packages/services/src/__tests__/transformationEvent.test.ts +++ b/packages/services/src/__tests__/transformationEvent.test.ts @@ -27,6 +27,7 @@ jest.mock('../linkResolver.service', () => ({ verificationLinkType: 'gs1:verificationService', certificationLinkType: 'gs1:certificationInfo', epcisLinkType: 'gs1:epcis', + traceability: 'traceability', }, }));