|
1 | 1 | import {
|
2 | 2 | Applicant,
|
3 | 3 | Check,
|
| 4 | + DeviceIntelligenceReport, |
4 | 5 | Document,
|
5 | 6 | DocumentReport,
|
6 | 7 | DocumentWithAddressInformationReport,
|
| 8 | + DocumentWithDrivingLicenceInformationReport, |
7 | 9 | FacialSimilarityPhotoReport,
|
8 | 10 | Report,
|
9 | 11 | ReportName
|
@@ -113,3 +115,46 @@ it("schema of document with address information report should be valid", async (
|
113 | 115 | "driving_licence"
|
114 | 116 | );
|
115 | 117 | }, 30000);
|
| 118 | + |
| 119 | +it("schema of document with driving license information report should be valid", async () => { |
| 120 | + await uploadLivePhoto(applicant); |
| 121 | + const check: Check = ( |
| 122 | + await createCheck(applicant, document, { |
| 123 | + report_names: [ReportName.DocumentWithDrivingLicenceInformation] |
| 124 | + }) |
| 125 | + ).data; |
| 126 | + |
| 127 | + const report: Report = await repeatRequestUntilStatusChanges( |
| 128 | + "findReport", |
| 129 | + [check.report_ids[0]], |
| 130 | + "complete" |
| 131 | + ); |
| 132 | + |
| 133 | + const document_report = report as DocumentWithDrivingLicenceInformationReport; |
| 134 | + |
| 135 | + expect(document_report.name).toEqual( |
| 136 | + "document_with_driving_licence_information" |
| 137 | + ); |
| 138 | + expect(document_report.properties.driving_licence_information).not.toBeNull(); |
| 139 | +}, 30000); |
| 140 | + |
| 141 | +it("schema of device intelligence report should be valid", async () => { |
| 142 | + await uploadLivePhoto(applicant); |
| 143 | + const check: Check = ( |
| 144 | + await createCheck(applicant, document, { |
| 145 | + report_names: [ReportName.DeviceIntelligence] |
| 146 | + }) |
| 147 | + ).data; |
| 148 | + |
| 149 | + const report: Report = await repeatRequestUntilStatusChanges( |
| 150 | + "findReport", |
| 151 | + [check.report_ids[0]], |
| 152 | + "complete" |
| 153 | + ); |
| 154 | + |
| 155 | + const device_intelligence = report as DeviceIntelligenceReport; |
| 156 | + |
| 157 | + expect(device_intelligence.name).toEqual("device_intelligence"); |
| 158 | + expect(device_intelligence.breakdown).not.toBeNull(); |
| 159 | + expect(device_intelligence.properties).not.toBeNull(); |
| 160 | +}, 30000); |
0 commit comments