From 433e259649de4c2d4cc75b9a5cd4da347260058f Mon Sep 17 00:00:00 2001 From: CANCI0 Date: Sat, 27 Apr 2024 11:02:33 +0200 Subject: [PATCH] Error en un test arreglado --- users/userservice/user-service.test.js | 2 +- webapp/src/components/Login/Login.js | 2 -- webapp/src/pages/Bateria/Bateria.js | 1 - webapp/src/pages/Calculadora/Calculadora.js | 2 -- webapp/src/pages/Clasico/Clasico.js | 2 -- webapp/src/pages/Config/Config.test.js | 1 - webapp/src/pages/History/History.js | 1 - webapp/src/pages/Social/GroupDetails.test.js | 1 - 8 files changed, 1 insertion(+), 11 deletions(-) diff --git a/users/userservice/user-service.test.js b/users/userservice/user-service.test.js index 87cb723e..e3f9beb0 100644 --- a/users/userservice/user-service.test.js +++ b/users/userservice/user-service.test.js @@ -291,7 +291,7 @@ describe("User Service", () => { }; const response = await request(app).post("/group/add").send(group); - expect(response.status).toBe(400); + expect(response.status).toBe(500); expect(response.body).toEqual({ error: "Missing required field: username" }); }); diff --git a/webapp/src/components/Login/Login.js b/webapp/src/components/Login/Login.js index de509c01..cadbdf7d 100644 --- a/webapp/src/components/Login/Login.js +++ b/webapp/src/components/Login/Login.js @@ -32,7 +32,6 @@ const Login = () => { const apiEndpoint = process.env.REACT_APP_API_ENDPOINT || "http://localhost:8000"; - console.log(process.env.REACT_APP_API_ENDPOINT); const loginUser = () => { axios @@ -50,7 +49,6 @@ const Login = () => { navigate("/home"); }) .catch((err) => { - console.log(err); setError(err.response.data.error); }); }; diff --git a/webapp/src/pages/Bateria/Bateria.js b/webapp/src/pages/Bateria/Bateria.js index babd88ec..7c2bf93b 100644 --- a/webapp/src/pages/Bateria/Bateria.js +++ b/webapp/src/pages/Bateria/Bateria.js @@ -133,7 +133,6 @@ const JuegoPreguntas = () => { const saveGame = async (endpoint, newGame) => { try { const response = await axios.post(URL + endpoint, newGame); - console.log("Solicitud exitosa:", response.data); } catch (error) { console.error("Error al guardar el juego:", error); } diff --git a/webapp/src/pages/Calculadora/Calculadora.js b/webapp/src/pages/Calculadora/Calculadora.js index a196ebb4..6a030e8d 100644 --- a/webapp/src/pages/Calculadora/Calculadora.js +++ b/webapp/src/pages/Calculadora/Calculadora.js @@ -101,14 +101,12 @@ const CalculadoraHumana = () => { }; try { const response = await axios.post(URL + '/saveGame', newGame); - console.log("Solicitud exitosa:", response.data); } catch (error) { console.error('Error al guardar el juego:', error); } try { const response = await axios.post(URL + "/saveGameList", newGame); - console.log("Solicitud exitosa:", response.data); } catch (error) { console.error("Error al guardar el juego:", error); } diff --git a/webapp/src/pages/Clasico/Clasico.js b/webapp/src/pages/Clasico/Clasico.js index f1aac13b..d5de8280 100644 --- a/webapp/src/pages/Clasico/Clasico.js +++ b/webapp/src/pages/Clasico/Clasico.js @@ -196,7 +196,6 @@ const JuegoPreguntas = () => { try { const response = await axios.post(URL + "/saveGameList", newGame); - console.log("Solicitud exitosa:", response.data); } catch (error) { console.error( "Error al guardar el juego en la lista de partidas:", @@ -205,7 +204,6 @@ const JuegoPreguntas = () => { } try { const response = await axios.post(URL + "/saveGame", newGame); - console.log("Solicitud exitosa:", response.data); } catch (error) { console.error("Error al guardar el juego:", error); } diff --git a/webapp/src/pages/Config/Config.test.js b/webapp/src/pages/Config/Config.test.js index d7d29d70..c265528f 100644 --- a/webapp/src/pages/Config/Config.test.js +++ b/webapp/src/pages/Config/Config.test.js @@ -38,7 +38,6 @@ describe("Config Component", () => { button.click(); const checks = screen.getAllByRole("checkbox"); - console.log(checks) checks[0].checked = true; button.click(); }); diff --git a/webapp/src/pages/History/History.js b/webapp/src/pages/History/History.js index 01c0fe83..0a8845a8 100644 --- a/webapp/src/pages/History/History.js +++ b/webapp/src/pages/History/History.js @@ -33,7 +33,6 @@ const History = () => { .then((response) => response.json()) .then((data) => { setUserData(data); - console.log(data); setLoading(false); }) .catch((error) => { diff --git a/webapp/src/pages/Social/GroupDetails.test.js b/webapp/src/pages/Social/GroupDetails.test.js index 171aa3b1..1a054bcc 100644 --- a/webapp/src/pages/Social/GroupDetails.test.js +++ b/webapp/src/pages/Social/GroupDetails.test.js @@ -98,7 +98,6 @@ describe('GroupDetails', () => { await checks(); const viewProfileButtons = screen.getByTestId('view-profile-button-user1'); - console.log(viewProfileButtons); fireEvent.click(viewProfileButtons); });