Skip to content

Commit

Permalink
✨ Arreglados problemas de tests
Browse files Browse the repository at this point in the history
  • Loading branch information
coral2742 committed May 8, 2024
1 parent 3fbdeb0 commit 4e08e21
Show file tree
Hide file tree
Showing 15 changed files with 3,650 additions and 15,711 deletions.
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
teamname="wiq_es2b"
teamname="wiq_es2b"
SKIP_PREFLIGHT_CHECK=true
13,681 changes: 3,624 additions & 10,057 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
"express": "^4.19.2",
"express-prom-bundle": "^7.0.0",
"history": "^5.3.0",
"jest": "^29.7.0",
"jsonwebtoken": "^9.0.2",
"mongoose": "^8.3.4",
"supertest": "^6.3.4",
"swagger-ui-express": "^5.0.0"
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11"
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"mutationobserver-shim": "^0.3.7"
}
}
5,487 changes: 0 additions & 5,487 deletions users/authservice/package-lock.json

This file was deleted.

3 changes: 2 additions & 1 deletion webapp/.env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
REACT_APP_API_ENDPOINT=http://localhost:8000
REACT_APP_API_ENDPOINT=http://localhost:8000
SKIP_PREFLIGHT_CHECK=true
163 changes: 3 additions & 160 deletions webapp/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"@babel/plugin-transform-private-property-in-object": "^7.23.4",
"axios-mock-adapter": "^1.22.0",
"expect-puppeteer": "^9.0.2",
"jest": "^29.3.1",
"jest-cucumber": "^3.0.1",
"jest-environment-node": "^29.7.0",
"mongodb-memory-server": "^9.1.4",
Expand Down
1 change: 1 addition & 0 deletions webapp/src/App.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import {BrowserRouter as Router} from "react-router-dom";
import App from './App';
Expand Down
4 changes: 3 additions & 1 deletion webapp/src/components/AddUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ const AddUser = ({ onCloseSnackbar }) => {
setOpenSnackbar(true);

// Redirige a la página de juego después de 3 segundos
navigate("/mainPage");
setTimeout(() => {
navigate("/mainPage");
}, 3000);
} catch (error) {
setError("Error al crear usuario");
setOpenSnackbar(true); // Abre el Snackbar en caso de error
Expand Down
2 changes: 2 additions & 0 deletions webapp/src/components/HistoricalData.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
import HistoricalData from './HistoricalData';
import { BrowserRouter as Router } from 'react-router-dom';
import 'mutationobserver-shim';


const mockAxios = new MockAdapter(axios);
describe('HistoricalData component', () => {
Expand Down
2 changes: 2 additions & 0 deletions webapp/src/components/HistoricalUserData.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
import HistoricalUserData from './HistoricalUserData';
import { BrowserRouter as Router } from 'react-router-dom';
import 'mutationobserver-shim';


const mockAxios = new MockAdapter(axios);

Expand Down
4 changes: 3 additions & 1 deletion webapp/src/components/Login.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import MockAdapter from 'axios-mock-adapter';
import { BrowserRouter as Router } from "react-router-dom";
import Login from './Login';
import { createMemoryHistory } from 'history';
import 'mutationobserver-shim';


const mockAxios = new MockAdapter(axios);

Expand Down Expand Up @@ -83,7 +85,7 @@ describe('Login component', () => {
expect(screen.getByText(/Inicio de sesión exitoso/i)).toBeInTheDocument();
});

expect(history.location.pathname).toBe('/');
await expect(history.location.pathname).toBe('/');
});

});
2 changes: 2 additions & 0 deletions webapp/src/components/MainPage.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
import MainPage from './MainPage';
import { BrowserRouter as Router } from 'react-router-dom';
import 'mutationobserver-shim';


const mockAxios = new MockAdapter(axios);

Expand Down
2 changes: 2 additions & 0 deletions webapp/src/components/RegisteredUsers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
import {BrowserRouter as Router} from "react-router-dom";
import RegisteredUsers from './RegisteredUsers';
import 'mutationobserver-shim';


const mockAxios = new MockAdapter(axios);

Expand Down
2 changes: 2 additions & 0 deletions webapp/src/components/ScoreBoard.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { render, screen, waitFor, fireEvent } from '@testing-library/react';
import axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
import ScoreBoard from './ScoreBoard';
import 'mutationobserver-shim';


const mockAxios = new MockAdapter(axios);

Expand Down

0 comments on commit 4e08e21

Please sign in to comment.