Skip to content

Commit

Permalink
Merge pull request #102 from zstenger93/ci/cd_tests
Browse files Browse the repository at this point in the history
3rd test fix try to init root at start
  • Loading branch information
zstenger93 authored Dec 25, 2023
2 parents 1700f65 + b0ecbca commit ca65ebc
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions frontend/src/App.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,22 @@ test('async test for page data', async () => {
await waitFor(() => screen.getByText('Welcome To'));
});

test('async test for language change', async () => {
const { container } = render(<App />);

jest.mock('react-i18next', () => ({
useTranslation: () => ({ t: key => key })
}));

test('async test for page data', async () => {
render(
<MemoryRouter initialEntries={['/']}>
<App />
</MemoryRouter>
);

const signInButton = screen.getByText('Sign In via 42');
userEvent.click(signInButton);

await waitFor(() => screen.getByText('Logout'));
await waitFor(() => screen.getByText('Welcome To'));

const languageLink = screen.getByText('Language');
fireEvent.click(languageLink);

const huOption = screen.getByText('HU');
fireEvent.click(huOption);

await waitFor(() => screen.getByText('Üdvözlünk a'));
});

// test('renders chat page', () => {
Expand Down

0 comments on commit ca65ebc

Please sign in to comment.