diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /spec/frontend/design_management/components/design_notes/design_reply_form_spec.js | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'spec/frontend/design_management/components/design_notes/design_reply_form_spec.js')
-rw-r--r-- | spec/frontend/design_management/components/design_notes/design_reply_form_spec.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/frontend/design_management/components/design_notes/design_reply_form_spec.js b/spec/frontend/design_management/components/design_notes/design_reply_form_spec.js index 34b8f1f9fa8..16b34f150b8 100644 --- a/spec/frontend/design_management/components/design_notes/design_reply_form_spec.js +++ b/spec/frontend/design_management/components/design_notes/design_reply_form_spec.js @@ -18,7 +18,7 @@ describe('Design reply form component', () => { const findCancelButton = () => wrapper.find({ ref: 'cancelButton' }); const findModal = () => wrapper.find({ ref: 'cancelCommentModal' }); - function createComponent(props = {}) { + function createComponent(props = {}, mountOptions = {}) { wrapper = mount(DesignReplyForm, { propsData: { value: '', @@ -26,6 +26,7 @@ describe('Design reply form component', () => { ...props, }, stubs: { GlModal }, + ...mountOptions, }); } @@ -34,7 +35,8 @@ describe('Design reply form component', () => { }); it('textarea has focus after component mount', () => { - createComponent(); + // We need to attach to document, so that `document.activeElement` is properly set in jsdom + createComponent({}, { attachToDocument: true }); expect(findTextarea().element).toEqual(document.activeElement); }); |