Build a 25 5 Clock - Please help me in passing all test cases

Tell us what’s happening:
The clock seems to be working correctly but I’m still not passing test cases related to timer.
Please show me the way.
Your code so far

Challenge: Front End Development Libraries Projects - Build a 25 + 5 Clock

Link to the challenge:

I didn’t really look at the code but if you look at the log output it shows 0-1:0-1 a few times.

thanks for pointing the bug out.
I have found a way around the bug, but the test cases are still not passing.
could you please check again for any mistakes?

1st failed error: " I can see a wrapper element with a corresponding id=“quote-box”.

First 5 errors are all looking for elements within the element with the id “quote-box”. I can’t find an element with the id “quote-box” in the code.

Are you able to read the errors? If you click the red button labelled “1/12 Passed” it shows a lot more detail.

i think you ran tests for the “random quote generator” project. You have to select “25+5 clock” from the drop-down menu and then run the suitable tests. There are 29 TCs for “25+5 clock”.

1 Like

My bad! Sorry about that.

Are you currently working on the code? It looks different now and line 182 has a comment with only 1 / so it’s broken, but the editor is pointing that out.

I found a similar topic here: https://forum.freecodecamp.org/t/25-5-clock-not-passing-most-timer-tests/594092/3

Maybe there’s a clue in that discussion.

I mainly looked into the reset timer, the first test that fails, but it looks ok. Might be some kind of timing issue, how/when does the test get the timer label? If I print formTime to console it shows “25:00” when I click reset, but the test disagrees. It makes me wonder where the test looks for that label and is there a small delay when you click reset?

Hola @ rishabh2002chauhan

El codigo contiene este par de lineas:

<div id="break-length">{this.state.break}</div>
<div id="session-length">{this.state.session}</div>

En las instrucciones solo dice que debes tener un elemento con id="break-length" y otro con id="session-length", sin embargo, para que me funcionara correctamente ambos elementos utilice la etiqueta <p></p>, revise tu codigo y tambien funciona si lo haces con <p></p>.

Entonces si cambias las lineas anteriores a:

<p id="break-length">{this.state.break}</p>
<p id="session-length">{this.state.session}</p>

Pasaras algunas pruebas mas.

Tambien note que tu elemento con id="timer-label" no cambia de valor cuando el temporizador llega a cero, este cambio se solicita en la prueba 22, te sugiero que corrijas ese detalle a ver en cuantas pruebasmas pasas.

saludos.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.