Some tests are failing despite that they should not to.
Tests:
Timer:
-
When I click the element with the id of “reset”, any running timer should be stopped, the value within id=“break-length” should return to 5, the value within id=“session-length” should return to 25, and the element with id=“time-left” should reset to it’s default state.
-
If the timer is paused and I click the element with id=“start_stop”, the countdown should resume running from the point at which it was paused.
-
When a session countdown reaches zero (NOTE: timer MUST reach 00:00), and a new countdown begins, the element with the id of “timer-label” should display a string indicating a break has begun.
-
When a session countdown reaches zero (NOTE: timer MUST reach 00:00), a new break countdown should begin, counting down from the value currently displayed in the id=“break-length” element.
-
When a break countdown reaches zero (NOTE: timer MUST reach 00:00), and a new countdown begins, the element with the id of “timer-label” should display a string indicating a session has begun.
-
When a break countdown reaches zero (NOTE: timer MUST reach 00:00), a new session countdown should begin, counting down from the value currently displayed in the id=“session-length” element.
Audio:
- When a countdown reaches zero (NOTE: timer MUST reach 00:00), a sound indicating that time is up should play. This should utilize an HTML5
I checked, it reaches “00:00”. I even used a
if(document.getElementById("time-left")){
console.log(document.getElementById("time-left").innerHTML);
}
just to see if it’s display “00:00”. And it does. I’m pullin’ my hair figuratively here. Any suggestioon will be appreciated.
You can check out my codepen.
Edit1:
And image of an error which might come out of testing suite:
Edit2:
As i recently discovered, even FCC’s pomodoro fails tests sometimes. Sometimes in different browsers, sometimes on sundays, sometimes etc. …
Long story short, i devised new code, that addresses issues in previous edits i made. Still, it suffers same problems as forementioned fcc’s pomodoro. I read somewhere, something about timing events, whose implementation and execution depends on browsers and in this case test suite itself uses to, as also is my pomodoro. So there should be “conflicts” of sorts … Resolving these inconsistencies and conflicts, so that in every browser, in every suit/test, looks insurmountable and i guess would … What i’m trying to ask, is it ok if i submit my pomodoro, concerning everything being said?
My improved pomodoro.
Image of fcc’s pomodoro test fail:
Edit3:
Added comments that explain functioning in the code so feel free to browse.
Image of my test fail:
On the upper left you can see 28/29 passed tests.
Notice: you can see updated code in codepen together with comments.