Skip to content
Snippets Groups Projects

Copy failed spec names to clipboard from MR widget

Merged Mireya Andres requested to merge copy-failed-spec-names into master
All threads resolved!

What does this MR do and why?

Adds an easy way to copy the path of all tests with failures so users can rerun them locally. The button can be found in the test results of the MR widget.

Also adds a copy-to-clipboard button for individual tests in the test case modal.

Screenshots or screen recordings

Copying test files:

Test Case Recording
Copy all failed specs Screen_Recording_2022-07-06_at_17.13.57
Copy individual spec files Screen_Recording_2022-07-06_at_17.14.17

Rendering Conditions:

Test Case Screenshot
Button should not show up when pipeline is successful no_errors
Button should not show up when data failed to load failed_to_load
Button should show up in the dropdown on smaller screens small_screens

How to set up and validate locally

Setup

  1. Enable the refactor_mr_widgets_extensions feature flag. (echo "Feature.disable(:refactor_mr_widgets_extensions)" | rails c)
  2. Set up your project to use unit test reports; or clone this project and set it up with GDK.
  3. Run a pipeline from the default branch.
  4. Edit files to make some tests fail then open a merge request.
  • If you cloned the above project, you can just create an MR from the failing-specs branch.
  1. Wait for the pipeline to finish.

Test Cases

  1. In the test reports of the MR page, click on the vertical ellipses next to the Full Report link. This should copy all the failing specs to your clipboard.
  2. Expand the tab and view an individual test case. In the modal, you should be able to copy the file path through the copy-to-clipboard button.

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 Mireya Andres

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Gina Doyle
  • Gina Doyle
  • Mireya Andres added 461 commits

    added 461 commits

    Compare with previous version

  • Mireya Andres changed the description

    changed the description

  • Gina Doyle approved this merge request

    approved this merge request

  • :wave: @gdoyle, thanks for approving this merge request.

    This is the first time the merge request is approved. To ensure full test coverage, a new pipeline has been started.

    For more info, please refer to the following links:

  • Gina Doyle removed review request for @gdoyle

    removed review request for @gdoyle

  • Mireya Andres added 202 commits

    added 202 commits

    Compare with previous version

  • Mireya Andres requested review from @mfluharty

    requested review from @mfluharty

  • Miranda Fluharty approved this merge request

    approved this merge request

  • Mireya Andres added 437 commits

    added 437 commits

    Compare with previous version

  • Mireya Andres requested review from @shampton and removed review request for @mfluharty

    requested review from @shampton and removed review request for @mfluharty

  • Scott Hampton approved this merge request

    approved this merge request

  • Scott Hampton resolved all threads

    resolved all threads

  • Scott Hampton enabled an automatic merge when the pipeline for 2bed3d20 succeeds

    enabled an automatic merge when the pipeline for 2bed3d20 succeeds

  • Mireya Andres aborted the automatic merge because source branch was updated

    aborted the automatic merge because source branch was updated

  • Mireya Andres added 185 commits

    added 185 commits

    Compare with previous version

  • Author Maintainer

    @shampton looks like I accidentally disabled MPWS when it tried to fix the pipeline through a rebase. Could you help get this merged again? :pray:

  • Scott Hampton enabled an automatic merge when the pipeline for 1ece510a succeeds

    enabled an automatic merge when the pipeline for 1ece510a succeeds

  • merged

  • Scott Hampton mentioned in commit 747a5284

    mentioned in commit 747a5284

  • added workflowstaging label and removed workflowcanary label

  • mentioned in issue #368825 (closed)

  • Mireya Andres mentioned in merge request !93299 (merged)

    mentioned in merge request !93299 (merged)

  • Marcel Amirault changed milestone to %15.2

    changed milestone to %15.2

  • Please register or sign in to reply
    Loading