forked from Yara724/api
fix: harden claim review and inquiry workflows
Preserve damage history and current vehicle price, restore depreciation mapping, normalize inquiry/report output, and support resumable expert review with paginated case retrieval.
This commit is contained in:
@@ -74,7 +74,7 @@ describe("inquiry participant resolver", () => {
|
||||
},
|
||||
vin: "NAAM01E15HK123456",
|
||||
}),
|
||||
).toThrow("previousPolicyholderNationalCode");
|
||||
).toThrow("کد ملی بیمهگذار قبلی");
|
||||
});
|
||||
|
||||
it("defaults an omitted registration state to CURRENT", () => {
|
||||
@@ -102,7 +102,7 @@ describe("inquiry participant resolver", () => {
|
||||
},
|
||||
vin: "TOO-SHORT",
|
||||
}),
|
||||
).toThrow("vehicle.vin must contain exactly 17 characters.");
|
||||
).toThrow("شماره شاسی (VIN) باید دقیقاً ۱۷ کاراکتر باشد.");
|
||||
});
|
||||
|
||||
it("rejects an incomplete current plate", () => {
|
||||
@@ -115,7 +115,7 @@ describe("inquiry participant resolver", () => {
|
||||
ir: "22",
|
||||
},
|
||||
}),
|
||||
).toThrow("vehicle.currentPlate.centerDigits is required.");
|
||||
).toThrow("سه رقم میانی پلاک در پلاک فعلی الزامی است.");
|
||||
});
|
||||
|
||||
it("rejects invalid vehicle choice values", () => {
|
||||
@@ -129,7 +129,7 @@ describe("inquiry participant resolver", () => {
|
||||
ir: "22",
|
||||
},
|
||||
}),
|
||||
).toThrow("vehicle.registrationState must be CURRENT or RECENTLY_TRANSFERRED.");
|
||||
).toThrow("وضعیت پلاک خودرو باید «فعلی» یا «تازه تعویضشده» باشد.");
|
||||
|
||||
expect(() =>
|
||||
resolveInquiryVehicle({
|
||||
@@ -141,7 +141,7 @@ describe("inquiry participant resolver", () => {
|
||||
},
|
||||
isNewCar: "false" as any,
|
||||
}),
|
||||
).toThrow("vehicle.isNewCar must be a boolean.");
|
||||
).toThrow("وضعیت صفر بودن خودرو نامعتبر است.");
|
||||
});
|
||||
|
||||
it("rejects a previous policyholder national code for a current registration", () => {
|
||||
@@ -647,7 +647,7 @@ describe("inquiry participant resolver", () => {
|
||||
|
||||
expect(() =>
|
||||
resolveInquiryParticipants(BlameRequestType.THIRD_PARTY, input as any),
|
||||
).toThrow("THIRD_PARTY_POLICYHOLDER does not support the unknown option.");
|
||||
).toThrow("ثبت بیمهگذار شخص ثالث بهصورت نامشخص امکانپذیر نیست.");
|
||||
});
|
||||
|
||||
it("strips the removed unknown field from historical participant output", () => {
|
||||
|
||||
Reference in New Issue
Block a user