Skip to content

Commit

Permalink
Trying to solve some tests errors2
Browse files Browse the repository at this point in the history
  • Loading branch information
baraganio committed Mar 18, 2024
1 parent 973dfd8 commit 103a2f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion webapp/src/App.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import { render, screen } from '@testing-library/react';
import {BrowserRouter as Router} from "react-router-dom";
import App from './App';

test('renders learn react link', () => {
Expand Down
6 changes: 3 additions & 3 deletions webapp/src/components/Login.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import { render, fireEvent, screen, waitFor, act } from '@testing-library/react';
import axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
import {BrowserRouter as Router} from "react-router-dom";
import Login from './Login';

const mockAxios = new MockAdapter(axios);
Expand All @@ -12,11 +13,10 @@ describe('Login component', () => {
});

it('should log in successfully', async () => {
render(<UserProvider>
render(
<Router>
<Login />
</Router>
</UserProvider>);
</Router>);

const usernameInput = screen.getByLabelText(/Username/i);
const passwordInput = screen.getByLabelText(/Password/i);
Expand Down

0 comments on commit 103a2f7

Please sign in to comment.