diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-04-20 10:45:40 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-04-20 10:45:40 +0000 |
commit | f96e1bf12432b0f4eff4a900caa46a0c4790123f (patch) | |
tree | 6d0428ed0a51f82b0d62323a0f36c612d7ae4a0f /spec/features | |
parent | b99853f509cca1c6ae1892513658add575230692 (diff) | |
parent | e4543f1a551dab352dfe91a09e596ed96a49f5f1 (diff) | |
download | gitlab-ce-f96e1bf12432b0f4eff4a900caa46a0c4790123f.tar.gz |
Merge branch 'fix/29125' into 'master'
Port of fix/29125-ee to CE
Closes #29125
See merge request !10796
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/merge_requests/widget_spec.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/features/merge_requests/widget_spec.rb b/spec/features/merge_requests/widget_spec.rb index a62c5435748..4e128cd4a7d 100644 --- a/spec/features/merge_requests/widget_spec.rb +++ b/spec/features/merge_requests/widget_spec.rb @@ -141,6 +141,27 @@ describe 'Merge request', :feature, :js do end end + context 'view merge request with MWPS enabled but automatically merge fails' do + before do + merge_request.update( + merge_when_pipeline_succeeds: true, + merge_user: merge_request.author, + merge_error: 'Something went wrong' + ) + + visit namespace_project_merge_request_path(project.namespace, project, merge_request) + end + + it 'shows information about the merge error' do + # Wait for the `ci_status` and `merge_check` requests + wait_for_ajax + + page.within('.mr-widget-body') do + expect(page).to have_content('Something went wrong') + end + end + end + context 'merge error' do before do allow_any_instance_of(Repository).to receive(:merge).and_return(false) |