feat(claims): require optional expert signatures and enrich PDF reports

This commit is contained in:
SepehrYahyaee
2026-11-24 11:23:08 +03:30
parent 297664a9a6
commit 475780f17e
24 changed files with 722 additions and 34 deletions
@@ -41,7 +41,7 @@ describe("Fanavaran depreciation age eligibility", () => {
.mockResolvedValue(product);
service.getFanavaranLookupRows = jest.fn().mockResolvedValue([]);
service.buildCarBodyFanavaranExpertisePayload = jest.fn(
async (input) => ({ payload: { DropAmount: input.priceDropTotal } }),
async (input) => ({ payload: { DropAmount: input.priceDropTotal ?? 0 } }),
);
const claimCase = {
_id: "claim",
@@ -59,7 +59,7 @@ describe("Fanavaran depreciation age eligibility", () => {
? "DropAmount"
: "DropAmountAdditionsDeductions"
],
).toBe(age > 10 ? 0 : 999);
).toBe(product === "car-body" || age > 10 ? 0 : 999);
expect(claimCase.evaluation.priceDrop.total).toBe(999); // Historical data is preserved.
},
);