1
0
mirror of https://github.com/SomboChea/ui synced 2026-01-18 00:56:00 +07:00

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 { BrowserRouter as Router } from 'react-router-dom';
import { render, fireEvent } from '../../utils/test-react-testing-library';
import NotFound, { GO_TO_HOME_PAGE } from './NotFound';
import NotFound from './NotFound';
describe('<NotFound /> component', () => {
test('should load the component in default state', () => {
@@ -14,17 +14,17 @@ describe('<NotFound /> component', () => {
);
expect(container.firstChild).toMatchSnapshot();
});
test('go to Home Page button click', () => {
test('go to Home Page button click', async () => {
const spy = jest.spyOn(React, 'useCallback');
const { getByText } = render(
const { getByTestId } = render(
<Router>
<NotFound />
</Router>
);
const node = getByText(GO_TO_HOME_PAGE);
const node = getByTestId('not-found-go-to-home-button');
fireEvent.click(node);
expect(spy).toHaveBeenCalled();
});
});