Skip to content

Fix incorrect render in JUnit merge UI with null or blank name value

What does this MR do and why?

This MR fixes a UI bug in how some tests get rendered in a merge. Before if a JUnit test was created without a name, no link would appear. This MR changes the behavior so if there is an empty value or empty string as the 'name' value, it will be replaced with '(No name)', in order to render a clickable link.

Describe in detail what your merge request does and why.

Screenshots or screen recordings

before after
Screen_Shot_2021-10-06_at_11.02.41 Screen_Shot_2021-10-06_at_11.16.59
Screen_Shot_2021-10-06_at_11.57.10 Screen_Shot_2021-10-06_at_11.51.41

How to set up and validate locally

  1. set up unit test reports for a project OR clone this test project
  2. configure a unit test that has no name and make it pass in the main branch, create a new branch make the unit test fail in the new branch, and create an MR for the new branch OR in the test project, create an MR for feature-branch-with-blank-test-name
  3. ensure that pipelines ran for the main branch and the new branch to generate unit test report artifacts
  4. navigate to the merge request and expand the test summary widget (first set of screenshots)
  5. navigate to the pipeline and click on the Tests tab (second set of screenshots)

MR acceptance checklist

This is my first MR. Any feedback would be greatly appreciated! Thank you so much!

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Miranda Fluharty

Merge request reports