forked from Yara724/api
badane bugs continues
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { PartyRole } from "src/request-management/entities/schema/partyRole.enum";
|
||||
import {
|
||||
hullExpertiseAssertFields,
|
||||
collectFanavaranExpertiseReadinessWarnings,
|
||||
pickHullVehicleIdentity,
|
||||
toFanavaranHullExpertiseDmgSection,
|
||||
toFanavaranHullExpertisePayload,
|
||||
@@ -95,4 +97,60 @@ describe("fanavaran hull expertise", () => {
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("does not require ثالث expertise fields on a GEN.06 hull payload", () => {
|
||||
const payload = toFanavaranHullExpertisePayload({
|
||||
claimExpertId: 29,
|
||||
dmgAssessmentDate: "1405/06/24",
|
||||
inspectionTime: "10:41",
|
||||
wage: 6000000,
|
||||
componentReplacementCost: 10000000,
|
||||
wasteValue: 0,
|
||||
dropAmount: 10000,
|
||||
vehicleCurrentValue: null,
|
||||
vehicle: {
|
||||
motorNo: "13389030167",
|
||||
chassisNo: "NAAP41FD5BJ301065",
|
||||
vin: "IRFC891V7D2301065",
|
||||
plaqueNo: "56د394",
|
||||
plaqueSerial: "66",
|
||||
builtYear: 1389,
|
||||
},
|
||||
dmgSections: [
|
||||
toFanavaranHullExpertiseDmgSection({
|
||||
partId: 9,
|
||||
desc: "سپر جلو",
|
||||
wasteValue: 0,
|
||||
amount: 11000000,
|
||||
}),
|
||||
toFanavaranHullExpertiseDmgSection({
|
||||
partId: 11,
|
||||
desc: "آينه سمت راننده",
|
||||
wasteValue: 0,
|
||||
amount: 5000000,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
expect(
|
||||
collectFanavaranExpertiseReadinessWarnings(
|
||||
payload,
|
||||
hullExpertiseAssertFields("car-body"),
|
||||
),
|
||||
).toEqual([]);
|
||||
expect(
|
||||
collectFanavaranExpertiseReadinessWarnings(
|
||||
payload,
|
||||
hullExpertiseAssertFields("third-party"),
|
||||
),
|
||||
).toEqual([
|
||||
"DmgCaseId is required.",
|
||||
"InspectionPlaceId is required.",
|
||||
"DropAmountStatus is required.",
|
||||
"DmgSections[0].DmgSectionId is required.",
|
||||
"DmgSections[0].AccidentLevel is required.",
|
||||
"DmgSections[1].DmgSectionId is required.",
|
||||
"DmgSections[1].AccidentLevel is required.",
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user