Skip to content
Snippets Groups Projects

Sort code coverage graph by dates

Merged Frédéric Caplette requested to merge sort-code-coverage-graph-by-dates into master
All threads resolved!

What does this MR do?

Follow up to #33743 (closed) because we discovered that the graph was rendering in reverse order. The API passed the data in the order on purpose, so we adjust them in the FE.

It's a fairly straightforward change: we add a computed property that sorts the array. We could have opted for using something like reverse since we know it's in descending order, but it feels more robust to do a full on date comparison.

I also added a simple test that check that the mock data, which is now in descending order, gets reverse to the correct order.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Payton Burdette
  • Payton Burdette approved this merge request

    approved this merge request

  • added 1 commit

    Compare with previous version

  • @afontaine Could you be the maintainer for this tiny MR? It simply adds a sorting method in a component to make sure the data is sorted by ascending dates. The danger review job failing seems to be a widespread problem on every build at the moment, so not related to this MR. Thanks!

    Edited by Frédéric Caplette
  • Frédéric Caplette resolved all threads

    resolved all threads

  • Andrew Fontaine approved this merge request

    approved this merge request

    • Resolved by Andrew Fontaine

      @f_caplette I think this looks ok to me.

      I am generally a little bit wary of tests that examine values on the vm object, but it seems those are pretty widespread in this file so I will assume those are there for a good reason :wink:

      I think I just merged a fix for danger so the next pipeline should be fixed :tada:

  • Andrew Fontaine enabled an automatic merge when the pipeline for f0803e66 succeeds

    enabled an automatic merge when the pipeline for f0803e66 succeeds

  • Andrew Fontaine resolved all threads

    resolved all threads

  • Andrew Fontaine mentioned in commit 0ad4044f

    mentioned in commit 0ad4044f

  • added workflowcanary label and removed workflowstaging label

  • added workflowproduction label and removed workflowcanary label

  • Please register or sign in to reply
    Loading