Skip to content

Interpret recent_failures as object, not integer

What does this MR do?

For #241759 (closed), came up in this slack thread (internal link)

The frontend MR for this MVC was written to find a test case's recent failures count recent_failures as an integer, but to properly interface with the backend MR, it should've been looking for recent_failures as an object, with recent_failures.count being the count of recent failures for that test case and recent_failures.base_branch being the name of the branch where they were found.

This MR fixes the mismatch by updating the recentFailuresText function in test_issue_body.vue to generate the text off of the properties of the object, and by updating utils.js to count failures across suites/reports based off of recent_failures.count instead of recent_failures. This MR also updates the related specs and mock data to match the structure of the recent_failures object.

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Miranda Fluharty

Merge request reports