forked from Yara724/api
feat: complete in-person claims without final sign
This commit is contained in:
37
src/helpers/claim-v2-expert-reply-workflow.spec.ts
Normal file
37
src/helpers/claim-v2-expert-reply-workflow.spec.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import { ClaimCaseStatus } from "src/Types&Enums/claim-request-management/claim-case-status.enum";
|
||||
import { claimCaseStatusAfterExpertReplyV2 } from "./claim-v2-expert-reply-workflow";
|
||||
|
||||
describe("claimCaseStatusAfterExpertReplyV2", () => {
|
||||
it("keeps V1 priced-only claims in their final owner-signature state", () => {
|
||||
expect(
|
||||
claimCaseStatusAfterExpertReplyV2([
|
||||
{ factorNeeded: false },
|
||||
{ factorNeeded: false },
|
||||
]),
|
||||
).toBe(ClaimCaseStatus.INSURER_REVIEW_AWAITING_OWNER_SIGN);
|
||||
});
|
||||
|
||||
it("completes a V2–V5 priced-only claim without a final owner signature", () => {
|
||||
expect(
|
||||
claimCaseStatusAfterExpertReplyV2(
|
||||
[{ factorNeeded: false }, { factorNeeded: false }],
|
||||
true,
|
||||
),
|
||||
).toBe(ClaimCaseStatus.COMPLETED);
|
||||
});
|
||||
|
||||
it("keeps factor-required claims in their factor collection workflow", () => {
|
||||
expect(
|
||||
claimCaseStatusAfterExpertReplyV2([{ factorNeeded: true }]),
|
||||
).toBe(ClaimCaseStatus.OWNER_REPAIR_FACTOR_UPLOAD_PENDING);
|
||||
});
|
||||
|
||||
it("keeps the priced-line acceptance gate for mixed factor claims", () => {
|
||||
expect(
|
||||
claimCaseStatusAfterExpertReplyV2([
|
||||
{ factorNeeded: false },
|
||||
{ factorNeeded: true },
|
||||
]),
|
||||
).toBe(ClaimCaseStatus.INSURER_REVIEW_MIXED_FACTORS_PENDING);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user