diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-17 09:09:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-17 09:09:21 +0300 |
commit | c8df22c555ab707a705e57c4257fd3ed1ce7c3b0 (patch) | |
tree | 009fb7c1ff12a6192921212cae404b790fd7d66b /spec/features/projects/show | |
parent | 9345f69894862e02f3491ea3136c3ed2b23fd5b8 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/projects/show')
-rw-r--r-- | spec/features/projects/show/user_manages_notifications_spec.rb | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/spec/features/projects/show/user_manages_notifications_spec.rb b/spec/features/projects/show/user_manages_notifications_spec.rb index 851a09cf28a..0cd6743304e 100644 --- a/spec/features/projects/show/user_manages_notifications_spec.rb +++ b/spec/features/projects/show/user_manages_notifications_spec.rb @@ -7,7 +7,6 @@ describe 'Projects > Show > User manages notifications', :js do before do sign_in(project.owner) - visit project_path(project) end def click_notifications_button @@ -15,6 +14,7 @@ describe 'Projects > Show > User manages notifications', :js do end it 'changes the notification setting' do + visit project_path(project) click_notifications_button click_link 'On mention' @@ -26,6 +26,7 @@ describe 'Projects > Show > User manages notifications', :js do end it 'changes the notification setting to disabled' do + visit project_path(project) click_notifications_button click_link 'Disabled' @@ -50,11 +51,13 @@ describe 'Projects > Show > User manages notifications', :js do :reassign_merge_request, :merge_merge_request, :failed_pipeline, + :fixed_pipeline, :success_pipeline ] end it 'shows notification settings checkbox' do + visit project_path(project) click_notifications_button page.find('a[data-notification-level="custom"]').click @@ -64,12 +67,27 @@ describe 'Projects > Show > User manages notifications', :js do end end end + + context 'when ci_pipeline_fixed_notifications is disabled' do + before do + stub_feature_flags(ci_pipeline_fixed_notifications: false) + end + + it 'hides fixed_pipeline checkbox' do + visit project_path(project) + click_notifications_button + page.find('a[data-notification-level="custom"]').click + + expect(page).not_to have_selector("input[name='notification_setting[fixed_pipeline]']") + end + end end context 'when project emails are disabled' do let(:project) { create(:project, :public, :repository, emails_disabled: true) } it 'is disabled' do + visit project_path(project) expect(page).to have_selector('.notifications-btn.disabled', visible: true) end end |