Skip to content

Refactor mocks before adding more for deploy keys

What does this MR do and why?

I've started adding deploy keys to the Branch rule edit page and unit tests exploded (!162729 (merged)). Our mocks got out of hand, they were inaccurate, badly organised and mixed. This MR aims to:

  • organize the file a bit better - separate predefined props for components from mocked GraphQl responses
  • remove a duplicate mock
  • have correct GraphQl fragments defined for the mock responses

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Context Before After
CE Screenshot_2024-08-21_at_14.20.01 Screenshot_2024-08-21_at_17.02.52
EE Screenshot_2024-08-21_at_14.19.52 Screenshot_2024-08-21_at_17.02.33

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Make sure spec/frontend/projects/settings/branch_rules/ tests pass.
  2. I recommend reviewing commit by commnit.

Related to #474084 (closed)

Edited by Paulina Sedlak-Jakubowska

Merge request reports

Loading