Открыть боковую панель
nt_test133
nt_project_uxpg8lvcuq8w
Коммиты
0566aa51
Коммит
0566aa51
создал
Дек 04, 2015
по автору
Valery Sizov
Просмотр файлов
spinach fixes
владелец
61e5f27f
Изменения
4
Скрыть пробелы
Построчно
Рядом
app/controllers/unsubscribes_controller.rb
Просмотр файла @
0566aa51
...
@@ -11,7 +11,7 @@ def create
...
@@ -11,7 +11,7 @@ def create
@user
=
get_user
@user
=
get_user
if
@user
if
@user
@user
.
admin_unsubscribe!
@user
.
admin_unsubscribe!
Notify
.
send_unsubscribed_notification
(
@user
).
deliver_later
Notify
.
send_unsubscribed_notification
(
@user
.
id
).
deliver_later
end
end
redirect_to
new_user_session_path
,
notice:
'You have been unsubscribed'
redirect_to
new_user_session_path
,
notice:
'You have been unsubscribed'
end
end
...
...
app/views/groups/group_members/index.html.haml
Просмотр файла @
0566aa51
...
@@ -3,6 +3,17 @@
...
@@ -3,6 +3,17 @@
-
@blank_container
=
true
-
@blank_container
=
true
.group-members-page
.group-members-page
-
if
current_user
&&
current_user
.
can?
(
:admin_group_member
,
@group
)
.panel.panel-default
.panel-heading
Add new user to group
.panel-body
-
if
should_user_see_group_roles?
(
current_user
,
@group
)
%p
.light
Members of group have access to all group projects.
.new-group-member-holder
=
render
"new_group_member"
-
if
@group
.
ldap_synced?
-
if
@group
.
ldap_synced?
.bs-callout.bs-callout-info
.bs-callout.bs-callout-info
The members of this group are managed using LDAP and cannot be added, changed or removed here.
The members of this group are managed using LDAP and cannot be added, changed or removed here.
...
@@ -21,7 +32,7 @@
...
@@ -21,7 +32,7 @@
data:
{
"confirm-danger-message"
=>
clear_ldap_permission_cache_message
,
data:
{
"confirm-danger-message"
=>
clear_ldap_permission_cache_message
,
'warning-message'
=>
'If you made manual permission tweaks for some group members they will be lost.'
}
'warning-message'
=>
'If you made manual permission tweaks for some group members they will be lost.'
}
.panel.panel-default
.panel.panel-default
.panel-heading
.panel-heading
%strong
#{
@group
.
name
}
%strong
#{
@group
.
name
}
...
...
features/steps/admin/email.rb
Просмотр файла @
0566aa51
...
@@ -4,28 +4,30 @@ class Spinach::Features::AdminEmail < Spinach::FeatureSteps
...
@@ -4,28 +4,30 @@ class Spinach::Features::AdminEmail < Spinach::FeatureSteps
include
SharedAdmin
include
SharedAdmin
step
'I submit form with email notification info'
do
step
'I submit form with email notification info'
do
ActionMailer
::
Base
.
deliveries
=
[]
perform_enqueued_jobs
do
@email_text
=
"Your project has been moved."
ActionMailer
::
Base
.
deliveries
=
[]
@selected_group
=
Group
.
last
@email_text
=
"Your project has been moved."
# ensure there are ppl to be emailed
@selected_group
=
Group
.
last
2
.
times
do
# ensure there are ppl to be emailed
@selected_group
.
add_user
(
create
(
:user
),
Gitlab
::
Access
::
DEVELOPER
)
2
.
times
do
end
@selected_group
.
add_user
(
create
(
:user
),
Gitlab
::
Access
::
DEVELOPER
)
end
page
.
within
(
'form#new-admin-email'
)
do
page
.
within
(
'form#new-admin-email'
)
do
fill_in
:subject
,
with:
'my subject'
fill_in
:subject
,
with:
'my subject'
fill_in
:body
,
with:
@email_text
fill_in
:body
,
with:
@email_text
# Note: Unable to use select2 helper because
# Note: Unable to use select2 helper because
# the helper uses select2 method "val" to select the group from the dropdown
# the helper uses select2 method "val" to select the group from the dropdown
# and the method "val" requires "initSelection" to be used in the select2 call
# and the method "val" requires "initSelection" to be used in the select2 call
select2_container
=
first
(
"#s2id_recipients"
)
select2_container
=
first
(
"#s2id_recipients"
)
select2_container
.
find
(
".select2-choice"
).
click
select2_container
.
find
(
".select2-choice"
).
click
find
(
:xpath
,
"//body"
).
find
(
"input.select2-input"
).
set
(
@selected_group
.
name
)
find
(
:xpath
,
"//body"
).
find
(
"input.select2-input"
).
set
(
@selected_group
.
name
)
page
.
execute_script
(
%|$("input.select2-input:visible").keyup();|
)
page
.
execute_script
(
%|$("input.select2-input:visible").keyup();|
)
find
(
:xpath
,
"//body"
).
find
(
".group-name"
,
text:
@selected_group
.
name
).
click
find
(
:xpath
,
"//body"
).
find
(
".group-name"
,
text:
@selected_group
.
name
).
click
find
(
'.btn-create'
).
click
find
(
'.btn-create'
).
click
end
end
end
end
end
...
@@ -46,7 +48,9 @@ class Spinach::Features::AdminEmail < Spinach::FeatureSteps
...
@@ -46,7 +48,9 @@ class Spinach::Features::AdminEmail < Spinach::FeatureSteps
end
end
step
'I click unsubscribe'
do
step
'I click unsubscribe'
do
click_button
'Unsubscribe'
perform_enqueued_jobs
do
click_button
'Unsubscribe'
end
end
end
step
'I get redirected to the sign in path'
do
step
'I get redirected to the sign in path'
do
...
...
features/support/env.rb
Просмотр файла @
0566aa51
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
Spinach
.
hooks
.
before_run
do
Spinach
.
hooks
.
before_run
do
include
RSpec
::
Mocks
::
ExampleMethods
include
RSpec
::
Mocks
::
ExampleMethods
include
ActiveJob
::
TestHelper
RSpec
::
Mocks
.
setup
RSpec
::
Mocks
.
setup
TestEnv
.
init
(
mailer:
false
)
TestEnv
.
init
(
mailer:
false
)
TestLicense
.
init
TestLicense
.
init
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать