Skip to content

Commit

Permalink
Arreglo test para despliegue
Browse files Browse the repository at this point in the history
  • Loading branch information
Verzidee committed Mar 25, 2024
1 parent d061806 commit 8a80d8e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion webapp/e2e/steps/register-form.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ defineFeature(feature, test => {
let password;

given('An unregistered user', async () => {
username = "pablo"
username = "ProbandoV1"
password = "pabloasw"
await expect(page).toClick("a", { text: "Don't have an account? Register here." });
});
Expand Down
29 changes: 15 additions & 14 deletions webapp/src/components/pages/Jugar.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,26 @@ function Jugar() {
]
}]);

const getQuestions = async() => {
try {
console.log("Requesting random questions to " + apiEndpoint);
const response = await axios.get(`${apiEndpoint}/getquestions`);
console.log(response);
setQuestions(response.data);
setQuestionsLoaded(true);
} catch (error) {
console.error('Error getting questions', error);
}
}

useEffect(() => {
const getQuestions = async() => {
try {
console.log("Requesting random questions to " + apiEndpoint);
const response = await axios.get(`${apiEndpoint}/getquestions`);
console.log(response);
setQuestions(response.data);
setQuestionsLoaded(true);
} catch (error) {
console.error('Error getting questions', error);
}
};

if (!isLoggedIn) {
navigate('/login');
} else {
getQuestions();
getQuestions().then(r =>{});
}
}, [isLoggedIn, navigate, getQuestions]);
}, [isLoggedIn, navigate]);

const handleNextQuestion = (timeExpired = false) => {
setTimer(INITIAL_TIMER);
if (selectedAnswerIndex !== null || timeExpired) {
Expand Down

0 comments on commit 8a80d8e

Please sign in to comment.