diff options
author | Felipe Artur <felipefac@gmail.com> | 2018-07-10 11:29:27 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2018-07-10 11:31:13 -0300 |
commit | dfa8b6a85234f127edc268ee2c7c94fea7dcfa53 (patch) | |
tree | 4d52fd46fb65f3d0573fb1e67a7c2d6f952763c7 | |
parent | d01e5a04ccee4659fdab8f381a12201daa1c8cb5 (diff) | |
download | gitlab-ce-issue_47709.tar.gz |
Allow to toggle notifications for issues due soonissue_47709
-rw-r--r-- | app/models/notification_setting.rb | 1 | ||||
-rw-r--r-- | changelogs/unreleased/issue_47709.yml | 5 | ||||
-rw-r--r-- | spec/features/projects/show/user_manages_notifications_spec.rb | 13 |
3 files changed, 19 insertions, 0 deletions
diff --git a/app/models/notification_setting.rb b/app/models/notification_setting.rb index 9195408551f..1933c46ee44 100644 --- a/app/models/notification_setting.rb +++ b/app/models/notification_setting.rb @@ -32,6 +32,7 @@ class NotificationSetting < ActiveRecord::Base :reopen_issue, :close_issue, :reassign_issue, + :issue_due, :new_merge_request, :push_to_merge_request, :reopen_merge_request, diff --git a/changelogs/unreleased/issue_47709.yml b/changelogs/unreleased/issue_47709.yml new file mode 100644 index 00000000000..c3ef55fd692 --- /dev/null +++ b/changelogs/unreleased/issue_47709.yml @@ -0,0 +1,5 @@ +--- +title: 'Allow to toggle notifications for issues due soon' +merge_request: +author: +type: fixed diff --git a/spec/features/projects/show/user_manages_notifications_spec.rb b/spec/features/projects/show/user_manages_notifications_spec.rb index 31b105229be..efe26bf63cb 100644 --- a/spec/features/projects/show/user_manages_notifications_spec.rb +++ b/spec/features/projects/show/user_manages_notifications_spec.rb @@ -16,4 +16,17 @@ describe 'Projects > Show > User manages notifications', :js do expect(page).to have_content 'On mention' end end + + context 'custom notification settings' do + it 'shows notification settings checkbox' do + first('.notifications-btn').click + page.find('a[data-notification-level="custom"]').click + + page.within('.custom-notifications-form') do + NotificationSetting::EMAIL_EVENTS.each do |event_name| + expect(page).to have_selector("input[name='notification_setting[#{event_name}]']") + end + end + end + end end |