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
- [-] Changelog entry This feature is behind the feature flag
:test_failure_history
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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