YARA-1257, YARA-1272, YARA-985

This commit is contained in:
SepehrYahyaee
2026-09-12 11:19:57 +03:30
parent ebe45646c1
commit 15342e16d8
18 changed files with 279 additions and 207 deletions

View File

@@ -52,6 +52,32 @@ describe("ExpertClaimService expert-reply pricing", () => {
]);
});
it("allows a deliver-damaged-part line without a branch", () => {
const service = createService() as any;
expect(
service.validateAndNormalizeDaghiForExpertReplyV2([
{
partId: 201,
typeOfDamage: TypeOfDamage.Change,
price: "100000",
salary: "100000",
totalPayment: "200000",
daghi: { option: DaghiOption.DELIVER_DAMAGED_PART },
},
]),
).toEqual([
{
partId: 201,
typeOfDamage: TypeOfDamage.Change,
price: "100000",
salary: "100000",
totalPayment: "200000",
daghi: { option: DaghiOption.DELIVER_DAMAGED_PART },
},
]);
});
it("rejects a blank pricing line on the legacy submit endpoint before changing status", async () => {
const service = createService() as any;
const findAndUpdate = jest.fn();