Preserved FE contact

This commit is contained in:
SepehrYahyaee
2026-09-12 12:20:03 +03:30
parent 0bab93e983
commit 9e51fdcdaf
2 changed files with 13 additions and 191 deletions

View File

@@ -43,18 +43,18 @@ describe("insurer timeline Persian labels", () => {
);
});
it("localizes human-readable assignment metadata", () => {
it("preserves human-readable assignment metadata exactly", () => {
expect(
localizeTimelineMetadata({
type: "CLAIM_ASSIGNED",
metadata: { note: "Expert assigned via review assign endpoint" },
}),
).toEqual({
note: "پرونده از طریق فرایند بررسی به کارشناس تخصیص داده شد.",
note: "Expert assigned via review assign endpoint",
});
});
it("localizes Fanavaran errors while retaining machine-facing metadata", () => {
it("preserves Fanavaran metadata keys and values exactly", () => {
expect(
localizeTimelineMetadata({
type: "FANAVARAN_EXPERTISE_AUTO_SUBMIT_FAILED",
@@ -65,12 +65,11 @@ describe("insurer timeline Persian labels", () => {
}),
).toEqual({
clientKey: "parsian",
clientFaLabel: "پارسیان",
error: "اطلاعات کارشناسی برای ارسال به فناوران آماده نیست.",
error: "Fanavaran expertise payload is not ready.",
});
});
it("adds Persian labels for displayable metadata enums", () => {
it("does not add fields to existing metadata", () => {
expect(
localizeTimelineMetadata({
type: "STEP_COMPLETED",
@@ -84,15 +83,10 @@ describe("insurer timeline Persian labels", () => {
}),
).toEqual({
role: "FIRST",
roleFaLabel: "طرف اول",
stepKey: "USER_SUBMISSION_COMPLETE",
stepFaLabel: "ارسال اطلاعات توسط کاربر",
carType: "sedan",
carTypeFaLabel: "سواری",
captureType: "angle",
captureTypeFaLabel: "زاویه خودرو",
captureKey: "front",
captureKeyFaLabel: "نمای جلو",
});
});
});