Do not spyOn form submit method through wrapper.vm.$refs
What does this MR do and why?
Resolves Fix spec violations in spec/frontend/branches/c... (#413385 - closed) as part of Improve quality of Vue-related frontend testing... (&5102).
This MR removes jest.spyOn(wrapper.vm.$refs...)
violation in spec/frontend/branches/components/delete_merged_branches_spec.js
.
Before | After |
---|---|
const submitFormSpy = () => jest.spyOn(wrapper.vm.$refs.form, 'submit'); |
const submitFormSpy = () => jest.spyOn(findForm().element, 'submit'); |
How to set up and validate locally
- Check that there are no failing frontend test pipeline jobs.
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 Eugie Limpin