feat(i18n): added i18next for user interface translations (#432)

This commit is contained in:
Priscila Oliveira
2020-03-08 16:45:07 +01:00
committed by GitHub
parent 8d4b3cee7e
commit 7428384b55
76 changed files with 1114 additions and 720 deletions

View File

@@ -3,7 +3,7 @@ import { MemoryRouter } from 'react-router';
import { waitForElement } from '@testing-library/dom';
import { render } from '../../utils/test-react-testing-library';
import { NOT_FOUND_TEXT } from '../../components/NotFound';
import translationEN from '../../../i18n/translations/en-US.json';
import Version from './Version';
import { DetailContext } from './context';
@@ -51,7 +51,9 @@ describe('test Version page', () => {
</MemoryRouter>
);
// we wait fetch response (mocked above)
const notFoundElement = await waitForElement(() => getByText(NOT_FOUND_TEXT));
const notFoundElement = await waitForElement(() =>
getByText(translationEN.error['404']['sorry-we-could-not-find-it'])
);
expect(notFoundElement).toBeTruthy();
});