diff options
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 | 22 |
1 files changed, 22 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 3e3778492d2..b4c125f4910 100644 --- a/spec/frontend/issuable_show/components/issuable_show_root_spec.js +++ b/spec/frontend/issuable_show/components/issuable_show_root_spec.js @@ -54,6 +54,7 @@ describe('IssuableShowRoot', () => { editFormVisible, descriptionPreviewPath, descriptionHelpPath, + taskCompletionStatus, } = mockIssuableShowProps; const { blocked, confidential, createdAt, author } = mockIssuable; @@ -72,6 +73,7 @@ describe('IssuableShowRoot', () => { confidential, createdAt, author, + taskCompletionStatus, }); expect(issuableHeader.find('.issuable-status-box').text()).toContain('Open'); expect(issuableHeader.find('.detail-page-header-actions button.js-close').exists()).toBe( @@ -111,6 +113,26 @@ describe('IssuableShowRoot', () => { expect(wrapper.emitted('edit-issuable')).toBeTruthy(); }); + it('component emits `task-list-update-success` event bubbled via issuable-body', () => { + const issuableBody = wrapper.find(IssuableBody); + const eventParam = { + foo: 'bar', + }; + + issuableBody.vm.$emit('task-list-update-success', eventParam); + + expect(wrapper.emitted('task-list-update-success')).toBeTruthy(); + expect(wrapper.emitted('task-list-update-success')[0]).toEqual([eventParam]); + }); + + it('component emits `task-list-update-failure` event bubbled via issuable-body', () => { + const issuableBody = wrapper.find(IssuableBody); + + issuableBody.vm.$emit('task-list-update-failure'); + + expect(wrapper.emitted('task-list-update-failure')).toBeTruthy(); + }); + it('component emits `sidebar-toggle` event bubbled via issuable-sidebar', () => { const issuableSidebar = wrapper.find(IssuableSidebar); |