fix(i18n): localize job email hub

This commit is contained in:
cesnimda
2026-08-29 22:10:53 +02:00
parent f89e37bb4f
commit e9f8653d19
4 changed files with 333 additions and 116 deletions
@@ -38,6 +38,7 @@ function renderPage() {
describe('CorrespondenceInboxPage', () => {
beforeEach(() => {
window.localStorage.clear();
Object.defineProperty(globalThis.crypto, 'randomUUID', { configurable: true, value: jest.fn(() => '00000000-0000-4000-8000-000000000123') });
mockedApi.get.mockImplementation((url: string) => {
if (url === '/email/providers') return Promise.resolve({ data: [
@@ -475,6 +476,17 @@ describe('CorrespondenceInboxPage', () => {
expect(screen.getByRole('button', { name: /linked messages/i })).toBeInTheDocument();
});
test('localizes inbox controls while preserving correspondence content', async () => {
window.localStorage.setItem('uiLanguage', 'nb');
renderPage();
expect(await screen.findByRole('heading', { name: 'Jobb-e-post' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Tilknyttede meldinger' })).toBeInTheDocument();
expect(screen.getByLabelText('Retning')).toBeInTheDocument();
expect(screen.getByText('Interview invite')).toBeInTheDocument();
expect(screen.getByText(/Gmail: owner@gmail\.test · Kun lesing/)).toBeInTheDocument();
});
test('legacy Gmail review route redirects into the consolidated hub filter', async () => {
render(
<ToastProvider>