25+5 Clock - Tests don't update my Values

Hi All

I am currently working on the Front End Challenge 25+5 Clock.

My solution can be found here, it is still a work in progress and I have applied only the minimum of formatting so please bear with me on that one.

Functionally everything appears to be fine when I run it manually and all the user stories look like they work as expected. When I run the test script however I am only passing 12 of of 29 tests. When I run the test script I notice that neither the timer nor the break and session length values change at any point during test execution. Conversely if I run the tests for the example solution I can see these values being modified automatically on screen as the test script executes, I also tried running another solution that I found via the FCC forum (that of @Sophieihpos) and again I could see the values being updated automatically.

If I look at the error messages themselves that are almost all equivalence failures, i.e. expected '5' to equal '1'. All of this gives me the impression that when the test script executes the values in my code are not being updated by the test script as expected.

I’ve been wracking my brains all day on this one to no avail, if anyone can help or has had a similar experience they can share it would be much appreciated.

Many thanks,
Craig.

Just to heads, I have managed to resolve this issue.

It turns out I was not wrapping the Fontawesome icons in <button> tags, I didn’t do this originally as the FontawesomeIcon class is clickable in the UI and accepts the onClick event handler.

By wrapping the icons in the tags, and moving the id and onClick attributes to <button> the values now update as expected. It still fails a few tests, but it is now passing 24 instead of 12 out of 29 so definitely progress.

1 Like

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