forked from Yara724/api
Fix damaged vehicle identity across claim panels and price estimates
This commit is contained in:
@@ -62,6 +62,8 @@ describe("SandHubService inquiry mocks", () => {
|
||||
});
|
||||
|
||||
expect(isMappedPolicyCurrent(result.mapped)).toBe(true);
|
||||
expect(result.mapped.MapTypNam).toBe(result.mapped.SystemField);
|
||||
expect(result.mapped.TypeField).toBeNull();
|
||||
});
|
||||
|
||||
it("returns car-body mock without HTTP when carBodyPlate is off", async () => {
|
||||
@@ -78,6 +80,8 @@ describe("SandHubService inquiry mocks", () => {
|
||||
expect(result.mapped.policyNumber).toBe("1405/1143-70591/220/1/0");
|
||||
expect(result.mapped.CompanyName).toBe("بیمه پارسیان");
|
||||
expect(result.mapped.companyId).toBe(8);
|
||||
expect(result.mapped.MapTypNam).toBe(result.raw.data.vehicleSystemTitle);
|
||||
expect(result.mapped.MapTypNam).not.toBe(result.raw.data.vehicleGroupTitle);
|
||||
expect(result.mapped.insurerNationalCode).toBe("1234567890");
|
||||
expect(result.mapped.platePartOne).toBe(16);
|
||||
expect(result.mapped.platePartThree).toBe(498);
|
||||
|
||||
@@ -211,8 +211,9 @@ export class SandHubService {
|
||||
PrintEndorsCompanyDocumentNumber: "",
|
||||
EndorseDate: null,
|
||||
InsuranceFullName: null,
|
||||
SystemField: "سايپا",
|
||||
TypeField: "111SE",
|
||||
// Keep the mock's vehicle aliases consistent; no FAW trim is known here.
|
||||
SystemField: "فائو ( FAW )",
|
||||
TypeField: null,
|
||||
UsageField: "سواري",
|
||||
MainColorField: "سفيد",
|
||||
SecondColorField: "سفيد شيري",
|
||||
@@ -1152,7 +1153,7 @@ export class SandHubService {
|
||||
VinNumberField: data.vin ?? data.VinNumberField ?? null,
|
||||
vehicleGroupTitle: data.vehicleGroupTitle ?? null,
|
||||
vehicleSystemTitle: data.vehicleSystemTitle ?? null,
|
||||
MapTypNam: data.vehicleGroupTitle ?? data.vehicleSystemTitle ?? null,
|
||||
MapTypNam: data.vehicleSystemTitle ?? null,
|
||||
|
||||
// Policy dates (Jalali strings from the API)
|
||||
IssueDate: data.issueDate ?? data.persianStartDate ?? null,
|
||||
|
||||
Reference in New Issue
Block a user