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

@@ -1,8 +1,9 @@
import React from 'react';
import { render, waitForElement, fireEvent, waitForElementToBeRemoved } from '../../utils/test-react-testing-library';
import { render, waitForElement, fireEvent } from '../../utils/test-react-testing-library';
import AppContext, { AppContextProps } from '../../App/AppContext';
import api from '../../utils/api';
import translationEN from '../../../i18n/translations/en-US.json';
import LoginDialog from './LoginDialog';
@@ -35,13 +36,13 @@ describe('<LoginDialog /> component', () => {
onClose: jest.fn(),
};
const { getByText } = render(
const { getByTestId } = render(
<AppContext.Provider value={appContextValue}>
<LoginDialog onClose={props.onClose} open={props.open} />
</AppContext.Provider>
);
const loginDialogHeading = await waitForElement(() => getByText('Sign in'));
const loginDialogHeading = await waitForElement(() => getByTestId('login-dialog-form-login-button'));
expect(loginDialogHeading).toBeTruthy();
});