-
Notifications
You must be signed in to change notification settings - Fork 35
WIP Results progress bar #226
base: development
Are you sure you want to change the base?
Conversation
lib/app/endpoint/home.rb
Outdated
count += 1 | ||
out << js_update_result(sequence, test_set, result, count, sequence.test_count, count, total_tests) | ||
test_count += 1 | ||
out << js_update_result(sequence, test_set, result, count, sequence.test_count, test_count, total_tests, rerun) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of altering the js_update_result method to optionally print out previous test score, could you just loop through the previous tests and call js_update_result (the old version) on each here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it could, but then the other information passed into js_update_result
like sequence, _test_set, result, set_count, set_total, count
would technically be incorrect (referring to the wrong test) and the console.log
would get repeated for the "rerun" tests. As long as that's okay, do you still want me to update it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I guess my mental model was that it would just replay what already happened, so the user would be flashed very briefly everything that already run, and it would make it so you had one less special case in the code. But perhaps your method just makes more sense. I think you can just leave it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense too and it's an easy fix if you want to, I had just originally done it like that because js_update_result
wouldn't know that some of the parameters were inaccurate but it wouldn't actually change anything for the user (only the console log).
cf930f9
to
25b5181
Compare
35a9f39
to
10a3c50
Compare
10a3c50
to
20fd4c5
Compare
Progress bar updates in real time with results corresponding to the results icon colors.