diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
commit | 8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca (patch) | |
tree | 544930fb309b30317ae9797a9683768705d664c4 /spec/frontend/issuable_show/components/issuable_show_root_spec.js | |
parent | 4b1de649d0168371549608993deac953eb692019 (diff) |
Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42
Diffstat (limited to 'spec/frontend/issuable_show/components/issuable_show_root_spec.js')
-rw-r--r-- | spec/frontend/issuable_show/components/issuable_show_root_spec.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/frontend/issuable_show/components/issuable_show_root_spec.js b/spec/frontend/issuable_show/components/issuable_show_root_spec.js index 112e4ccd340..ca0aefc1083 100644 --- a/spec/frontend/issuable_show/components/issuable_show_root_spec.js +++ b/spec/frontend/issuable_show/components/issuable_show_root_spec.js @@ -118,6 +118,27 @@ describe('IssuableShowRoot', () => { expect(wrapper.emitted('sidebar-toggle')).toBeTruthy(); }); + + it.each(['keydown-title', 'keydown-description'])( + 'component emits `%s` event with event object and issuableMeta params via issuable-body', + eventName => { + const eventObj = { + preventDefault: jest.fn(), + stopPropagation: jest.fn(), + }; + const issuableMeta = { + issuableTitle: 'foo', + issuableDescription: 'foobar', + }; + + const issuableBody = wrapper.find(IssuableBody); + + issuableBody.vm.$emit(eventName, eventObj, issuableMeta); + + expect(wrapper.emitted(eventName)).toBeTruthy(); + expect(wrapper.emitted(eventName)[0]).toMatchObject([eventObj, issuableMeta]); + }, + ); }); }); }); |