forked from Yara724/api
feat: route user claims by branch and align licence issue dates
Require the damaged party in user flows to select an active insurer branch and preserve branch access rules. Accept older licence issue dates, correct anniversary boundaries, and update Fanavaran audit documentation and regression coverage.
This commit is contained in:
@@ -10,7 +10,7 @@ function setup(accessories: unknown) {
|
||||
"vehicle-hull-dmg-cost-kinds": [
|
||||
{ Id: 8002, Caption: "مجموع لوازم", IsActive: 1 },
|
||||
],
|
||||
"car-components": [{ Id: 9 }, { Id: 13 }],
|
||||
"car-components": [{ Id: 9 }, { Id: 13 }, { Id: 112 }],
|
||||
})[name] ?? [],
|
||||
);
|
||||
service.fanavaranLookupService = {
|
||||
@@ -34,6 +34,7 @@ function setup(accessories: unknown) {
|
||||
priceDropTotal: 0,
|
||||
priceDropCarPrice: null,
|
||||
warnings: [],
|
||||
infoWarnings: [],
|
||||
});
|
||||
return { service, build };
|
||||
}
|
||||
@@ -76,16 +77,17 @@ describe("hull expertise policy accessory mapping", () => {
|
||||
AccessoryDesc: "کليه قطعات فابريک",
|
||||
},
|
||||
]);
|
||||
const { payload, warnings } = await build();
|
||||
const { payload, warnings, infoWarnings } = await build();
|
||||
expect(
|
||||
payload.DmgSections.map((row: any) => row.VehicleHullAccessoryId),
|
||||
).toEqual([3061139, 3061139]);
|
||||
expect(payload.DmgSections.map((row: any) => row.AccessoryKindId)).toEqual([
|
||||
9, 13,
|
||||
112, 112,
|
||||
]);
|
||||
expect(warnings).toEqual(
|
||||
expect(warnings).toEqual([]);
|
||||
expect(infoWarnings).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.stringContaining("using factory bundle VehicleHullAccessoryId=3061139"),
|
||||
expect.stringContaining("mapped to factory bundle VehicleHullAccessoryId=3061139 AccessoryKindId=112"),
|
||||
]),
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user