fix(i18n): preserve safe interview and attachment purpose fallbacks
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user