Migrate test report widget to V2
What does this MR do and why?
For #419150 (closed)
Migrate test report widget to V2
Rewrite test report widget to use widget.vue instead of returning an object
Changelog: changed
Screenshots or screen recordings
Before | After |
---|---|
widget.js returns an object that gets converted into a widget extension, has the old widget styling |
widget.vue returns a vue component containing an <MrWidget /> component that gets rendered in the widget app, has the new widget styling |
How to set up and validate locally
- find/make a project with a pipeline that generates a unit test report
- you can clone the MR widgets demo project if you don't have one already
- run a pipeline for a merge request in that project and wait for it to finish
- the test summary widget should appear on the merge request
- while loading, it should display a loading state:
- with data, it should display a summary of all test suites on the first level, along with a link to the full report and the "copy failed tests" action
- when expanded, it should display:
- a summary of each suite at the second level
- at the third level, nested inside the suite summary, a scrollable list of tests from that suite that produced different results compared to when they ran for the base pipeline (tests that this MR has broken or fixed)
- clicking the "View details" action next to a test should open a modal with more details
- this is the same modal that's used in the Full report, and it should still open to show more details there too
- if the test report could not be parsed, the widget should be expandable to display the parsing error:
- if the test report could not be loaded, it should display a generic error state:
- if recent failures statistics are available, they should be shown at the summary levels (i.e. "3 out of 10 failed tests have failed in main in the last 14 days") and as a header on the test ("Failed 82 times in main in the last 14 days"):
- while loading, it should display a loading state:
to run tests
yarn install
yarn jest vue_merge_request_widget/extensions/test_report
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Miranda Fluharty