Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2018-07-10 17:29:27 +0300
committerFelipe Artur <felipefac@gmail.com>2018-07-12 18:03:29 +0300
commitef129737235832908e81f58da9133bbd8e9e7963 (patch)
treec609dda7572bad0c94eb8808f8324d036319b695 /spec/features/projects/show
parentd01e5a04ccee4659fdab8f381a12201daa1c8cb5 (diff)
Allow to toggle notifications for issues due soon
Diffstat (limited to 'spec/features/projects/show')
-rw-r--r--spec/features/projects/show/user_manages_notifications_spec.rb32
1 files changed, 32 insertions, 0 deletions
diff --git a/spec/features/projects/show/user_manages_notifications_spec.rb b/spec/features/projects/show/user_manages_notifications_spec.rb
index 31b105229be..546619e88ec 100644
--- a/spec/features/projects/show/user_manages_notifications_spec.rb
+++ b/spec/features/projects/show/user_manages_notifications_spec.rb
@@ -16,4 +16,36 @@ describe 'Projects > Show > User manages notifications', :js do
expect(page).to have_content 'On mention'
end
end
+
+ context 'custom notification settings' do
+ let(:email_events) do
+ [
+ :new_note,
+ :new_issue,
+ :reopen_issue,
+ :close_issue,
+ :reassign_issue,
+ :issue_due,
+ :new_merge_request,
+ :push_to_merge_request,
+ :reopen_merge_request,
+ :close_merge_request,
+ :reassign_merge_request,
+ :merge_merge_request,
+ :failed_pipeline,
+ :success_pipeline
+ ]
+ end
+
+ it 'shows notification settings checkbox' do
+ first('.notifications-btn').click
+ page.find('a[data-notification-level="custom"]').click
+
+ page.within('.custom-notifications-form') do
+ email_events.each do |event_name|
+ expect(page).to have_selector("input[name='notification_setting[#{event_name}]']")
+ end
+ end
+ end
+ end
end