fix(i18n): preserve safe interview and attachment purpose fallbacks

This commit is contained in:
cesnimda
2026-11-02 23:01:23 +01:00
parent fb48563557
commit 80d3849125
6 changed files with 66 additions and 15 deletions
@@ -62,6 +62,16 @@ beforeEach(() => {
window.localStorage.setItem("uiLanguage", "en");
});
describe.each(['en', 'nb'])('%s unknown interview categories', language => {
test.each(['constructor', 'toString', '__proto__'])('preserves %s as a category label', async category => {
window.localStorage.setItem('uiLanguage', language);
routeGet({ board: { ...board, groups: [{ ...board.groups[0], category }] } });
render(<ApplicationInterviewPrep jobId={7} />);
expect(await screen.findByText(category)).toBeInTheDocument();
expect(screen.getByText('Funding history')).toBeInTheDocument();
});
});
test("localizes interview categories while preserving user-authored preparation", async () => {
window.localStorage.setItem("uiLanguage", "nb");
routeGet();