Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
ef129737
Commit
ef129737
authored
Jul 10, 2018
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow to toggle notifications for issues due soon
parent
d01e5a04
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
0 deletions
+44
-0
app/models/notification_setting.rb
app/models/notification_setting.rb
+1
-0
changelogs/unreleased/issue_47709.yml
changelogs/unreleased/issue_47709.yml
+5
-0
spec/features/projects/show/user_manages_notifications_spec.rb
...features/projects/show/user_manages_notifications_spec.rb
+32
-0
spec/models/notification_setting_spec.rb
spec/models/notification_setting_spec.rb
+6
-0
No files found.
app/models/notification_setting.rb
View file @
ef129737
...
@@ -32,6 +32,7 @@ class NotificationSetting < ActiveRecord::Base
...
@@ -32,6 +32,7 @@ class NotificationSetting < ActiveRecord::Base
:reopen_issue
,
:reopen_issue
,
:close_issue
,
:close_issue
,
:reassign_issue
,
:reassign_issue
,
:issue_due
,
:new_merge_request
,
:new_merge_request
,
:push_to_merge_request
,
:push_to_merge_request
,
:reopen_merge_request
,
:reopen_merge_request
,
...
...
changelogs/unreleased/issue_47709.yml
0 → 100644
View file @
ef129737
---
title
:
'
Allow
to
toggle
notifications
for
issues
due
soon'
merge_request
:
author
:
type
:
fixed
spec/features/projects/show/user_manages_notifications_spec.rb
View file @
ef129737
...
@@ -16,4 +16,36 @@ describe 'Projects > Show > User manages notifications', :js do
...
@@ -16,4 +16,36 @@ describe 'Projects > Show > User manages notifications', :js do
expect
(
page
).
to
have_content
'On mention'
expect
(
page
).
to
have_content
'On mention'
end
end
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
end
spec/models/notification_setting_spec.rb
View file @
ef129737
...
@@ -93,4 +93,10 @@ RSpec.describe NotificationSetting do
...
@@ -93,4 +93,10 @@ RSpec.describe NotificationSetting do
end
end
end
end
end
end
context
'email events'
do
it
'includes EXCLUDED_WATCHER_EVENTS in EMAIL_EVENTS'
do
expect
(
described_class
::
EMAIL_EVENTS
).
to
include
(
*
described_class
::
EXCLUDED_WATCHER_EVENTS
)
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment