Skip to content

Remove refactored test summary widget feature flag

What does this MR do and why?

This MR removes the refactor_mr_widget_test_summary feature flag and removes the now-defunct code that made up the old widget we replaced. This feature flag has been enabled for all projects for a few months now, so it should be safe to remove it.

The count of lines of code changed for this makes it look big and scary, but 90% of those lines are due to deleting these directories:

  • app/assets/javascripts/grouped_test_report
  • spec/frontend/reports/grouped_test_report

Screenshots or screen recordings

No visual changes are expected

Screen_Shot_2022-10-20_at_12.06.20

How to set up and validate locally

test that the new widget works with the feature flag and old code removed

  1. git checkout remove_refactor_mr_widget_test_summary_feature_flag
  2. within your GDK, find/import a project with a pipeline that generates unit test reports (test project here if you need it)
  3. open a merge request in the project
  4. ensure that pipelines ran for the base commit and the head commit of the merge request's branch
  5. navigate to the merge request page
  6. make sure the Test summary: widget behaves as expected:
    • it shows a loading state while loading (and an error if it fails to load)
    • it shows the number of tests that passed, failed, errored, and ran
    • it expands to show the suites that ran and any test results that differ between the base and head commits
    • clicking on a test opens a modal with more details about it

test a related component to make sure we didn't remove anything it needed (optional)

  1. click the Full report link in the test summary widget to go to the full test report for the head pipeline
  2. make sure that everything is working as expected, and nothing that was removed affected it:
    • it shows the number of tests that passed, failed, errored, and ran
    • it shows a table of test suites
    • clicking a suite row drills down to that suite and shows a table of all the tests that ran
    • clicking the View details button next to a test opens a modal with more details about the test result (this modal is now the same modal in both places)

note: if you use the test-junit-xml project, links to spec files will not work because the project just passes in a test report to populate the results without actually running any tests

MR acceptance checklist

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