Skip to content

Commit

Permalink
Error en un test arreglado
Browse files Browse the repository at this point in the history
  • Loading branch information
CANCI0 committed Apr 27, 2024
1 parent 660c7d8 commit 433e259
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 11 deletions.
2 changes: 1 addition & 1 deletion users/userservice/user-service.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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" });
});

Expand Down
2 changes: 0 additions & 2 deletions webapp/src/components/Login/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -50,7 +49,6 @@ const Login = () => {
navigate("/home");
})
.catch((err) => {
console.log(err);
setError(err.response.data.error);
});
};
Expand Down
1 change: 0 additions & 1 deletion webapp/src/pages/Bateria/Bateria.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 0 additions & 2 deletions webapp/src/pages/Calculadora/Calculadora.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 0 additions & 2 deletions webapp/src/pages/Clasico/Clasico.js
Original file line number Diff line number Diff line change
Expand Up @@ -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:",
Expand All @@ -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);
}
Expand Down
1 change: 0 additions & 1 deletion webapp/src/pages/Config/Config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ describe("Config Component", () => {
button.click();

const checks = screen.getAllByRole("checkbox");
console.log(checks)
checks[0].checked = true;
button.click();
});
Expand Down
1 change: 0 additions & 1 deletion webapp/src/pages/History/History.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const History = () => {
.then((response) => response.json())
.then((data) => {
setUserData(data);
console.log(data);
setLoading(false);
})
.catch((error) => {
Expand Down
1 change: 0 additions & 1 deletion webapp/src/pages/Social/GroupDetails.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ describe('GroupDetails', () => {
await checks();

const viewProfileButtons = screen.getByTestId('view-profile-button-user1');
console.log(viewProfileButtons);

fireEvent.click(viewProfileButtons);
});
Expand Down

0 comments on commit 433e259

Please sign in to comment.