fix(i18n): localize job email workflows

This commit is contained in:
cesnimda
2026-08-29 22:45:49 +02:00
parent ee8eacf0de
commit 3c9b22c97e
8 changed files with 469 additions and 144 deletions
+10
View File
@@ -40,6 +40,7 @@ function renderModal(initialUrl?: string) {
}
beforeEach(() => {
window.localStorage.clear();
mockedApi.get.mockResolvedValue({ data: [] } as any);
mockedApi.post.mockImplementation((url: string) => {
if (url === '/jobimport/preview') {
@@ -69,6 +70,15 @@ test('does not auto-import when no initialUrl is given', async () => {
expect(mockedApi.post).not.toHaveBeenCalledWith('/jobimport/preview', expect.anything());
});
test('localizes the job creation workflow in Norwegian Bokmål', async () => {
window.localStorage.setItem('uiLanguage', 'nb');
renderModal();
expect(await screen.findByText('Start med jobbannonsen')).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Skriv inn detaljer manuelt' })).toBeInTheDocument();
expect(screen.getByText('Trinn 1 av 6: Legg til jobb')).toBeInTheDocument();
});
test('can generate a tailored CV after creating a job', async () => {
mockedApi.post.mockImplementation((url: string) => {