forked from Yara724/api
fix: recover saved photo uploads and lower car-body description minimum
Read saved document status from maps and plain objects, acknowledge verified document retries without replacing stored images, and preserve upload authorization and resend behavior. Lower the car-body narrative minimum to 30 characters with Persian errors and boundary regression coverage.
This commit is contained in:
@@ -23,3 +23,20 @@ describe("RequestManagementService CAR_BODY insurer client", () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
describe("CAR_BODY description minimum", () => {
|
||||
const service = Object.create(RequestManagementService.prototype) as any;
|
||||
|
||||
it.each([30, 31, 99, 100])("accepts %s trimmed characters", length => {
|
||||
expect(() => service.assertCarBodyDescriptionMinimum("CAR_BODY", ` ${"ش".repeat(length)} `)).not.toThrow();
|
||||
});
|
||||
|
||||
it.each([undefined, "", " ", "ش".repeat(29), ` ${"ش".repeat(29)} `])("rejects a short description with a Persian 30-character message", description => {
|
||||
expect(() => service.assertCarBodyDescriptionMinimum("CAR_BODY", description)).toThrow("شرح حادثه باید حداقل ۳۰ کاراکتر باشد.");
|
||||
});
|
||||
|
||||
it("preserves optional third-party descriptions", () => {
|
||||
expect(() => service.assertCarBodyDescriptionMinimum("THIRD_PARTY", "")).not.toThrow();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user