fix: align inquiry errors and expert review rules

This commit is contained in:
SepehrYahyaee
2026-09-19 12:11:43 +03:30
parent 45e0ad883a
commit 406b139b3d
21 changed files with 457 additions and 55 deletions

View File

@@ -0,0 +1,25 @@
import { CreationMethod } from "src/request-management/entities/schema/request-management.schema";
import { claimPriceCapAppliesToBlame } from "./claim-price-cap";
describe("claimPriceCapAppliesToBlame", () => {
it.each([
[{ creationMethod: CreationMethod.NORMAL }],
[{}],
])("applies to V1 user-created files (%p)", (blame) => {
expect(claimPriceCapAppliesToBlame(blame)).toBe(true);
});
it.each([
[{ creationMethod: CreationMethod.LINK, expertInitiated: true }],
[{ creationMethod: CreationMethod.IN_PERSON, expertInitiated: true }],
[{ creationMethod: CreationMethod.IN_PERSON, registrarInitiated: true }],
[{ creationMethod: CreationMethod.LINK, callCenterInitiated: true }],
[{ creationMethod: CreationMethod.NORMAL, initiatedByCallCenterId: "agent" }],
])("does not apply to non-V1 files (%p)", (blame) => {
expect(claimPriceCapAppliesToBlame(blame)).toBe(false);
});
it("does not apply when the linked blame origin is unavailable", () => {
expect(claimPriceCapAppliesToBlame(null)).toBe(false);
});
});