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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
fcdf3931
Commit
fcdf3931
authored
May 28, 2018
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests after group settings page redesign
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
ba6384e7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
22 deletions
+44
-22
app/views/groups/edit.html.haml
app/views/groups/edit.html.haml
+3
-3
app/views/groups/settings/_advanced.html.haml
app/views/groups/settings/_advanced.html.haml
+1
-1
spec/features/groups/group_settings_spec.rb
spec/features/groups/group_settings_spec.rb
+15
-6
spec/features/groups/share_lock_spec.rb
spec/features/groups/share_lock_spec.rb
+21
-10
spec/features/groups_spec.rb
spec/features/groups_spec.rb
+1
-1
spec/features/uploads/user_uploads_avatar_to_group_spec.rb
spec/features/uploads/user_uploads_avatar_to_group_spec.rb
+3
-1
No files found.
app/views/groups/edit.html.haml
View file @
fcdf3931
...
...
@@ -3,7 +3,7 @@
-
expanded
=
Rails
.
env
.
test?
%section
.settings.
a
s-general.no-animate
#js-general-settings
{
class:
(
'expanded'
if
expanded
)
}
%section
.settings.
g
s-general.no-animate
#js-general-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'General group settings'
)
...
...
@@ -14,7 +14,7 @@
.settings-content
=
render
'groups/settings/general'
%section
.settings.
a
s-permissions.no-animate
#js-permissions-settings
{
class:
(
'expanded'
if
expanded
)
}
%section
.settings.
g
s-permissions.no-animate
#js-permissions-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Permissions'
)
...
...
@@ -25,7 +25,7 @@
.settings-content
=
render
'groups/settings/permissions'
%section
.settings.
as-advanced-settings
.no-animate
#js-advanced-settings
{
class:
(
'expanded'
if
expanded
)
}
%section
.settings.
gs-advanced
.no-animate
#js-advanced-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Advanced settings'
)
...
...
app/views/groups/settings/_advanced.html.haml
View file @
fcdf3931
...
...
@@ -9,7 +9,7 @@
=
link_to
'Learn more'
,
help_page_path
(
'user/group/index'
,
anchor:
'changing-a-groups-path'
),
target:
'_blank'
.input-group.gl-field-error-anchor
.group-root-path.input-group-prepend.has-tooltip
{
title:
group_path
,
:'data-placement'
=>
'bottom'
}
.group-root-path.input-group-prepend.has-tooltip
{
title:
group_path
(
@group
)
,
:'data-placement'
=>
'bottom'
}
.input-group-text
%span
>=
root_url
-
if
parent
...
...
spec/features/groups/group_settings_spec.rb
View file @
fcdf3931
...
...
@@ -83,7 +83,7 @@ feature 'Edit group settings' do
attach_file
(
:group_avatar
,
Rails
.
root
.
join
(
'spec'
,
'fixtures'
,
'banana_sample.gif'
))
expect
{
click_button
'Save group'
}.
to
change
{
group
.
reload
.
avatar?
}.
to
(
true
)
expect
{
save_group
}.
to
change
{
group
.
reload
.
avatar?
}.
to
(
true
)
end
it
'uploads new group avatar'
do
...
...
@@ -97,10 +97,19 @@ feature 'Edit group settings' do
expect
(
page
).
not_to
have_link
(
'Remove avatar'
)
end
end
end
def
update_path
(
new_group_path
)
visit
edit_group_path
(
group
)
fill_in
'group_path'
,
with:
new_group_path
click_button
'Save group'
def
update_path
(
new_group_path
)
visit
edit_group_path
(
group
)
page
.
within
(
'.gs-advanced'
)
do
fill_in
'group_path'
,
with:
new_group_path
click_button
'Change group path'
end
end
def
save_group
page
.
within
(
'.gs-general'
)
do
click_button
'Save group'
end
end
end
spec/features/groups/share_lock_spec.rb
View file @
fcdf3931
...
...
@@ -15,9 +15,8 @@ feature 'Group share with group lock' do
context
'when enabling the parent group share with group lock'
do
scenario
'the subgroup share with group lock becomes enabled'
do
visit
edit_group_path
(
root_group
)
check
'group_share_with_group_lock'
click_on
'Save group'
enable_group_lock
expect
(
subgroup
.
reload
.
share_with_group_lock?
).
to
be_truthy
end
...
...
@@ -26,16 +25,15 @@ feature 'Group share with group lock' do
context
'when disabling the parent group share with group lock (which was already enabled)'
do
background
do
visit
edit_group_path
(
root_group
)
check
'group_share_with_group_lock'
click_on
'Save group'
enable_group_lock
end
context
'and the subgroup share with group lock is enabled'
do
scenario
'the subgroup share with group lock does not change'
do
visit
edit_group_path
(
root_group
)
uncheck
'group_share_with_group_lock'
click_on
'Save group'
disable_group_lock
expect
(
subgroup
.
reload
.
share_with_group_lock?
).
to
be_truthy
end
...
...
@@ -44,19 +42,32 @@ feature 'Group share with group lock' do
context
'but the subgroup share with group lock is disabled'
do
background
do
visit
edit_group_path
(
subgroup
)
uncheck
'group_share_with_group_lock'
click_on
'Save group'
disable_group_lock
end
scenario
'the subgroup share with group lock does not change'
do
visit
edit_group_path
(
root_group
)
uncheck
'group_share_with_group_lock'
click_on
'Save group'
disable_group_lock
expect
(
subgroup
.
reload
.
share_with_group_lock?
).
to
be_falsey
end
end
end
end
def
enable_group_lock
page
.
within
(
'.gs-permissions'
)
do
check
'group_share_with_group_lock'
click_on
'Save group'
end
end
def
disable_group_lock
page
.
within
(
'.gs-permissions'
)
do
uncheck
'group_share_with_group_lock'
click_on
'Save group'
end
end
end
spec/features/groups_spec.rb
View file @
fcdf3931
...
...
@@ -141,7 +141,7 @@ feature 'Group' do
end
it
'saves new settings'
do
page
.
within
(
'.
a
s-general'
)
do
page
.
within
(
'.
g
s-general'
)
do
fill_in
'group_name'
,
with:
new_name
click_button
'Save group'
end
...
...
spec/features/uploads/user_uploads_avatar_to_group_spec.rb
View file @
fcdf3931
...
...
@@ -14,7 +14,9 @@ feature 'User uploads avatar to group' do
visible:
false
)
click_button
'Save group'
page
.
within
(
'.gs-general'
)
do
click_button
'Save group'
end
visit
group_path
(
group
)
...
...
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