fix(i18n): localize generated labels without changing saved content
This commit is contained in:
@@ -46,6 +46,21 @@ function signal(actionKey: WorkflowSignal["actionKey"], workspaceTab: WorkflowSi
|
||||
};
|
||||
}
|
||||
|
||||
test("[P7-11 reminders] generated fixed and parameterized reasons follow locale while custom wording stays verbatim", async () => {
|
||||
mockedApi.get.mockResolvedValue({ data: [
|
||||
job(81, { workflowSignal: signal("package-work", "tailored-cv", "Tailored CV missing for this role.") }),
|
||||
job(82, { workflowSignal: null, followUpReason: "No reply after 14d" }),
|
||||
job(83, { workflowSignal: null, followUpReason: "No reply after 14d (my own note)" }),
|
||||
] } as any);
|
||||
renderPage();
|
||||
await screen.findByText("Tailored CV missing for this role.");
|
||||
changeLanguage("nb");
|
||||
expect(screen.getByText(copy("reminderReasonCv"))).toBeInTheDocument();
|
||||
expect(screen.getByText(copy("reminderReasonNoReplyDays", { days: 14 }))).toBeInTheDocument();
|
||||
expect(screen.getByText("No reply after 14d (my own note)")).toBeInTheDocument();
|
||||
expect(mockedApi.get).toHaveBeenCalledTimes(1); assertNoOtherWrites();
|
||||
});
|
||||
|
||||
function job(id: number, overrides: Partial<JobApplication> = {}): JobApplication {
|
||||
return {
|
||||
id, jobTitle: `Reminder role ${id}`, company: { id, name: `Company ${id}` }, status: "Waiting",
|
||||
|
||||
Reference in New Issue
Block a user