forked from Yara724/api
YARA-1257, YARA-1272, YARA-985
This commit is contained in:
25
src/expert-insurer/helper/timeline-fa-labels.spec.ts
Normal file
25
src/expert-insurer/helper/timeline-fa-labels.spec.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { getEventFaDescription, getEventFaLabel } from "./timeline-fa-labels";
|
||||
|
||||
describe("insurer timeline Persian labels", () => {
|
||||
it("localizes the user-submission detail shown to insurers", () => {
|
||||
const event = {
|
||||
type: "STEP_COMPLETED",
|
||||
metadata: {
|
||||
stepKey: "USER_SUBMISSION_COMPLETE",
|
||||
description:
|
||||
"User submission complete. Claim ready for damage expert review.",
|
||||
},
|
||||
};
|
||||
|
||||
expect(getEventFaLabel(event)).toBe("ارسال اطلاعات توسط کاربر");
|
||||
expect(getEventFaDescription(event)).toBe(
|
||||
"ثبت اطلاعات کاربر تکمیل شد و پرونده آماده بررسی کارشناس خسارت است.",
|
||||
);
|
||||
});
|
||||
|
||||
it("never returns an English event type as the description fallback", () => {
|
||||
expect(getEventFaDescription({ type: "UNRECOGNIZED_EVENT" })).toBe(
|
||||
"رویدادی در روند پرونده ثبت شد.",
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user