Skip to content

Fix spec violations in delete_rotation_modal_spec.js

What does this MR do and why?

  • get rid of mocking data()
  • use preferred way for mocking Apollo
  • unify createComponent and duplicated assertions
  • general refactor

Screenshots or screen recordings

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

Before After
Screenshot_2023-06-05_at_18.36.38 Screenshot_2023-06-05_at_18.33.37

How to set up and validate locally

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

  1. Checkout the branch locally and run: yarn jest ee/spec/frontend/oncall_schedule/rotations/components/delete_rotation_modal_spec.js

MR acceptance checklist

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

Related to #413319 (closed)

Edited by Paulina Sedlak-Jakubowska

Merge request reports