Update rounding logic for results page #4142
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #4107
The test results page was handling score rounding slightly differently than the interop dashboard (rounding to the nearest whole percent rather than nearest tenth of a percent). In order to avoid rounding up to 100% in cases where there were still some tests/subtests failing, some logic was added to instead display the score as 99.9% in those cases. This created a situation in which the interop dashboard and the results page looked close enough to each other (99.7% vs. 99.9%) that it seemed as if there was a calculation error on one of the pages. I hadn't looked at this logic in some time and also assumed this was some calculation error. 😅
This very simple change makes it so the results page rounds the score in the same way as the interop dashboard, so this confusion will not come up again.
Before
After