This is the error message I’m getting for both about not starting with the correct value :
" Timer has switched to Break time, but it didn’t start with the correct value.: expected 0 to equal 5
AssertionError: Timer has switched to Break time, but it didn’t start with the correct value.: expected 0 to equal 5 "
Run the timer manually with break and session set to 1 minute. At the change it should go from “00:01” to “00:00” to “01:00” but goes to “00:59” instead, hence the error about not starting from the currently displayed break time (“01:00”). Both test failures are likely the same thing.
You’ll need to determine what exactly is causing the problem, but it’s likely in how you format the time string or how you are updating the remaining time in the current session/break.
Yeah, I’ve noticed that, that was the issue, but it seems that when I update the state that has the “time-left” string, it refuses to update even though I’m updating the “timer-label” string in the same line and in the same way and it is updating just fine.
I’m wondering if maybe, someone could help me understand why my method is not updating that particular state?
You’ll have to log the state controlling that (timeLeftSessionClock) everywhere you change it (several places). It should go to zero and then the equivalent of the new session time. You’ve got a lot of conditionals in those places and it’s possible you’ve accidentally not handled the zero to new session correctly.