diff options
author | Phil Hughes <me@iamphill.com> | 2019-06-20 18:59:02 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-06-24 10:50:08 +0100 |
commit | d9242f206be0f7d9b62d754b42576f89f78990b0 (patch) | |
tree | c27cf08d6ecb00a6d8b00136a75832240514a42f /spec/features/issues | |
parent | 733f384ba8e9ecb2748bcd8c0cd91d8e370f8cc7 (diff) | |
download | gitlab-ce-d9242f206be0f7d9b62d754b42576f89f78990b0.tar.gz |
Show create merge request button on confidential issues
https://gitlab.com/gitlab-org/gitlab-ce/issues/58583
Diffstat (limited to 'spec/features/issues')
-rw-r--r-- | spec/features/issues/user_creates_branch_and_merge_request_spec.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/features/issues/user_creates_branch_and_merge_request_spec.rb b/spec/features/issues/user_creates_branch_and_merge_request_spec.rb index b69fba0db00..f9103d83ba0 100644 --- a/spec/features/issues/user_creates_branch_and_merge_request_spec.rb +++ b/spec/features/issues/user_creates_branch_and_merge_request_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' describe 'User creates branch and merge request on issue page', :js do let(:membership_level) { :developer } let(:user) { create(:user) } - let!(:project) { create(:project, :repository) } + let!(:project) { create(:project, :repository, :public) } let(:issue) { create(:issue, project: project, title: 'Cherry-Coloured Funk') } context 'when signed out' do @@ -163,10 +163,21 @@ describe 'User creates branch and merge request on issue page', :js do let(:issue) { create(:issue, :confidential, project: project) } it 'disables the create branch button' do + stub_feature_flags(create_confidential_merge_request: false) + visit project_issue_path(project, issue) expect(page).not_to have_css('.create-mr-dropdown-wrap') end + + it 'enables the create branch button when feature flag is enabled' do + stub_feature_flags(create_confidential_merge_request: true) + + visit project_issue_path(project, issue) + + expect(page).to have_css('.create-mr-dropdown-wrap') + expect(page).to have_button('Create confidential merge request') + end end context 'when related branch exists' do |