diff options
author | Johann Hubert Sonntagbauer <johann.sonntagbauer@gmail.com> | 2018-10-09 21:03:09 +0300 |
---|---|---|
committer | Johann Hubert Sonntagbauer <johann.sonntagbauer@gmail.com> | 2018-10-17 07:57:29 +0300 |
commit | 6f5723a169b5d400c136dbd844fc54c68e5f8563 (patch) | |
tree | e7bad2648366ed5943293655a0abe23367e869a6 /spec/javascripts/issue_show | |
parent | 28d412e5b2b8499fba22e8fabb1d44f44449228e (diff) |
enable jasmine/new-line-before-expect
Diffstat (limited to 'spec/javascripts/issue_show')
-rw-r--r-- | spec/javascripts/issue_show/components/app_spec.js | 4 | ||||
-rw-r--r-- | spec/javascripts/issue_show/components/edit_actions_spec.js | 1 | ||||
-rw-r--r-- | spec/javascripts/issue_show/components/title_spec.js | 3 |
3 files changed, 8 insertions, 0 deletions
diff --git a/spec/javascripts/issue_show/components/app_spec.js b/spec/javascripts/issue_show/components/app_spec.js index 36328382448..67d59d5cc5f 100644 --- a/spec/javascripts/issue_show/components/app_spec.js +++ b/spec/javascripts/issue_show/components/app_spec.js @@ -258,6 +258,7 @@ describe('Issuable output', () => { expect( eventHub.$emit, ).toHaveBeenCalledWith('close.form'); + expect( window.Flash, ).toHaveBeenCalledWith('Error updating issue'); @@ -276,6 +277,7 @@ describe('Issuable output', () => { expect( eventHub.$emit, ).toHaveBeenCalledWith('close.form'); + expect( window.Flash, ).toHaveBeenCalledWith('Error updating merge request'); @@ -383,6 +385,7 @@ describe('Issuable output', () => { expect( eventHub.$emit, ).toHaveBeenCalledWith('close.form'); + expect( window.Flash, ).toHaveBeenCalledWith('Error deleting issue'); @@ -422,6 +425,7 @@ describe('Issuable output', () => { it('should render if showInlineEditButton', () => { vm.showInlineEditButton = true; + expect(vm.$el.querySelector('.title-container .note-action-button')).toBeDefined(); }); }); diff --git a/spec/javascripts/issue_show/components/edit_actions_spec.js b/spec/javascripts/issue_show/components/edit_actions_spec.js index 004621f488a..4f4dae87efe 100644 --- a/spec/javascripts/issue_show/components/edit_actions_spec.js +++ b/spec/javascripts/issue_show/components/edit_actions_spec.js @@ -146,6 +146,7 @@ describe('Edit Actions components', () => { expect( eventHub.$emit, ).not.toHaveBeenCalledWith('delete.issuable'); + expect( vm.$el.querySelector('.btn-danger .fa'), ).toBeNull(); diff --git a/spec/javascripts/issue_show/components/title_spec.js b/spec/javascripts/issue_show/components/title_spec.js index 5370f4e1fea..9e6f236b687 100644 --- a/spec/javascripts/issue_show/components/title_spec.js +++ b/spec/javascripts/issue_show/components/title_spec.js @@ -86,12 +86,14 @@ describe('Title component', () => { it('should not show if canUpdate is false', () => { vm.showInlineEditButton = true; vm.canUpdate = false; + expect(vm.$el.querySelector('.btn-edit')).toBeNull(); }); it('should show if showInlineEditButton and canUpdate', () => { vm.showInlineEditButton = true; vm.canUpdate = true; + expect(vm.$el.querySelector('.btn-edit')).toBeDefined(); }); @@ -101,6 +103,7 @@ describe('Title component', () => { Vue.nextTick(() => { vm.$el.querySelector('.btn-edit').click(); + expect(eventHub.$emit).toHaveBeenCalledWith('open.form'); }); }); |