diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-03-07 12:24:11 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-03-07 12:24:11 +0100 |
commit | 64ae4689fc8447d6f19f84f45a1bd73dd16bb13c (patch) | |
tree | fd87e19aea4d1ca71902579100980485f1701bcb /spec/features/merge_requests/widget_spec.rb | |
parent | 152c2b5b703b4496c4034e4d65023dd95669c8ac (diff) | |
download | gitlab-ce-64ae4689fc8447d6f19f84f45a1bd73dd16bb13c.tar.gz |
Add feature specs for new MR widget blocked statefeature/gb/add-blocked-pipeline-mr-widget-state
Diffstat (limited to 'spec/features/merge_requests/widget_spec.rb')
-rw-r--r-- | spec/features/merge_requests/widget_spec.rb | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/spec/features/merge_requests/widget_spec.rb b/spec/features/merge_requests/widget_spec.rb index b575aeff0d8..c2db7d8da3c 100644 --- a/spec/features/merge_requests/widget_spec.rb +++ b/spec/features/merge_requests/widget_spec.rb @@ -37,7 +37,12 @@ describe 'Merge request', :feature, :js do context 'view merge request' do let!(:environment) { create(:environment, project: project) } - let!(:deployment) { create(:deployment, environment: environment, ref: 'feature', sha: merge_request.diff_head_sha) } + + let!(:deployment) do + create(:deployment, environment: environment, + ref: 'feature', + sha: merge_request.diff_head_sha) + end before do visit namespace_project_merge_request_path(project.namespace, project, merge_request) @@ -96,6 +101,26 @@ describe 'Merge request', :feature, :js do end end + context 'when merge request is in the blocked pipeline state' do + before do + create(:ci_pipeline, project: project, + sha: merge_request.diff_head_sha, + ref: merge_request.source_branch, + status: :manual) + + visit namespace_project_merge_request_path(project.namespace, + project, + merge_request) + end + + it 'shows information about blocked pipeline' do + expect(page).to have_content("Pipeline blocked") + expect(page).to have_content( + "The pipeline for this merge request requires a manual action") + expect(page).to have_css('.ci-status-icon-manual') + end + end + context 'view merge request with MWBS button' do before do commit_status = create(:commit_status, project: project, status: 'pending') |