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
17dccc35
Commit
17dccc35
authored
Oct 05, 2017
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update feature specs for updated group lists
parent
082c28cc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
41 deletions
+48
-41
changelogs/unreleased/bvl-group-trees.yml
changelogs/unreleased/bvl-group-trees.yml
+5
-0
spec/features/dashboard/groups_list_spec.rb
spec/features/dashboard/groups_list_spec.rb
+37
-28
spec/features/explore/groups_list_spec.rb
spec/features/explore/groups_list_spec.rb
+0
-2
spec/features/groups_spec.rb
spec/features/groups_spec.rb
+6
-11
No files found.
changelogs/unreleased/bvl-group-trees.yml
0 → 100644
View file @
17dccc35
---
title
:
Show collapsible project lists
merge_request
:
14055
author
:
type
:
changed
spec/features/dashboard/groups_list_spec.rb
View file @
17dccc35
...
@@ -6,8 +6,11 @@ feature 'Dashboard Groups page', :js do
...
@@ -6,8 +6,11 @@ feature 'Dashboard Groups page', :js do
let!
(
:nested_group
)
{
create
(
:group
,
:nested
)
}
let!
(
:nested_group
)
{
create
(
:group
,
:nested
)
}
let!
(
:another_group
)
{
create
(
:group
)
}
let!
(
:another_group
)
{
create
(
:group
)
}
before
do
def
click_group_caret
(
group
)
pending
(
'Update for new group tree'
)
within
(
"#group-
#{
group
.
id
}
"
)
do
first
(
'.folder-caret'
).
click
end
wait_for_requests
end
end
it
'shows groups user is member of'
do
it
'shows groups user is member of'
do
...
@@ -18,9 +21,13 @@ feature 'Dashboard Groups page', :js do
...
@@ -18,9 +21,13 @@ feature 'Dashboard Groups page', :js do
visit
dashboard_groups_path
visit
dashboard_groups_path
wait_for_requests
wait_for_requests
expect
(
page
).
to
have_content
(
group
.
full_name
)
expect
(
page
).
to
have_content
(
group
.
name
)
expect
(
page
).
to
have_content
(
nested_group
.
full_name
)
expect
(
page
).
to
have_content
(
nested_group
.
parent
.
name
)
expect
(
page
).
not_to
have_content
(
another_group
.
full_name
)
click_group_caret
(
nested_group
.
parent
)
expect
(
page
).
to
have_content
(
nested_group
.
name
)
expect
(
page
).
not_to
have_content
(
another_group
.
name
)
end
end
describe
'when filtering groups'
do
describe
'when filtering groups'
do
...
@@ -33,13 +40,14 @@ feature 'Dashboard Groups page', :js do
...
@@ -33,13 +40,14 @@ feature 'Dashboard Groups page', :js do
visit
dashboard_groups_path
visit
dashboard_groups_path
end
end
it
'
filters
groups'
do
it
'
expands when filtering
groups'
do
fill_in
'filter'
,
with:
group
.
name
fill_in
'filter'
,
with:
nested_
group
.
name
wait_for_requests
wait_for_requests
expect
(
page
).
to
have_content
(
group
.
full_name
)
expect
(
page
).
not_to
have_content
(
group
.
name
)
expect
(
page
).
not_to
have_content
(
nested_group
.
full_name
)
expect
(
page
).
to
have_content
(
nested_group
.
parent
.
name
)
expect
(
page
).
not_to
have_content
(
another_group
.
full_name
)
expect
(
page
).
to
have_content
(
nested_group
.
name
)
expect
(
page
).
not_to
have_content
(
another_group
.
name
)
end
end
it
'resets search when user cleans the input'
do
it
'resets search when user cleans the input'
do
...
@@ -49,9 +57,9 @@ feature 'Dashboard Groups page', :js do
...
@@ -49,9 +57,9 @@ feature 'Dashboard Groups page', :js do
fill_in
'filter'
,
with:
''
fill_in
'filter'
,
with:
''
wait_for_requests
wait_for_requests
expect
(
page
).
to
have_content
(
group
.
full_
name
)
expect
(
page
).
to
have_content
(
group
.
name
)
expect
(
page
).
to
have_content
(
nested_group
.
full_
name
)
expect
(
page
).
to
have_content
(
nested_group
.
parent
.
name
)
expect
(
page
).
not_to
have_content
(
another_group
.
full_
name
)
expect
(
page
).
not_to
have_content
(
another_group
.
name
)
expect
(
page
.
all
(
'.js-groups-list-holder .content-list li'
).
length
).
to
eq
2
expect
(
page
.
all
(
'.js-groups-list-holder .content-list li'
).
length
).
to
eq
2
end
end
end
end
...
@@ -69,28 +77,29 @@ feature 'Dashboard Groups page', :js do
...
@@ -69,28 +77,29 @@ feature 'Dashboard Groups page', :js do
end
end
it
'shows subgroups inside of its parent group'
do
it
'shows subgroups inside of its parent group'
do
expect
(
page
).
to
have_selector
(
'.groups-list-tree-container .group-list-tree'
,
count:
2
)
expect
(
page
).
to
have_selector
(
"#group-
#{
group
.
id
}
"
)
expect
(
page
).
to
have_selector
(
".groups-list-tree-container #group-
#{
group
.
id
}
#group-
#{
subgroup
.
id
}
"
,
count:
1
)
click_group_caret
(
group
)
expect
(
page
).
to
have_selector
(
"#group-
#{
group
.
id
}
#group-
#{
subgroup
.
id
}
"
)
end
end
it
'can toggle parent group'
do
it
'can toggle parent group'
do
#
Expand
ed by default
#
Collaps
ed by default
expect
(
page
).
to
have_selector
(
"#group-
#{
group
.
id
}
.fa-caret-down"
,
count:
1
)
expect
(
page
).
not_
to
have_selector
(
"#group-
#{
group
.
id
}
.fa-caret-down"
,
count:
1
)
expect
(
page
).
not_
to
have_selector
(
"#group-
#{
group
.
id
}
.fa-caret-right"
)
expect
(
page
).
to
have_selector
(
"#group-
#{
group
.
id
}
.fa-caret-right"
)
#
Collapse
#
expand
find
(
"#group-
#{
group
.
id
}
"
).
trigger
(
'click'
)
click_group_caret
(
group
)
expect
(
page
).
not_
to
have_selector
(
"#group-
#{
group
.
id
}
.fa-caret-down"
)
expect
(
page
).
to
have_selector
(
"#group-
#{
group
.
id
}
.fa-caret-down"
)
expect
(
page
).
to
have_selector
(
"#group-
#{
group
.
id
}
.fa-caret-right"
,
count:
1
)
expect
(
page
).
not_
to
have_selector
(
"#group-
#{
group
.
id
}
.fa-caret-right"
,
count:
1
)
expect
(
page
).
not_
to
have_selector
(
"#group-
#{
group
.
id
}
#group-
#{
subgroup
.
id
}
"
)
expect
(
page
).
to
have_selector
(
"#group-
#{
group
.
id
}
#group-
#{
subgroup
.
id
}
"
)
#
Expand
#
collapse
find
(
"#group-
#{
group
.
id
}
"
).
trigger
(
'click'
)
click_group_caret
(
group
)
expect
(
page
).
to
have_selector
(
"#group-
#{
group
.
id
}
.fa-caret-down"
,
count:
1
)
expect
(
page
).
not_
to
have_selector
(
"#group-
#{
group
.
id
}
.fa-caret-down"
,
count:
1
)
expect
(
page
).
not_
to
have_selector
(
"#group-
#{
group
.
id
}
.fa-caret-right"
)
expect
(
page
).
to
have_selector
(
"#group-
#{
group
.
id
}
.fa-caret-right"
)
expect
(
page
).
to
have_selector
(
"#group-
#{
group
.
id
}
#group-
#{
subgroup
.
id
}
"
)
expect
(
page
).
not_
to
have_selector
(
"#group-
#{
group
.
id
}
#group-
#{
subgroup
.
id
}
"
)
end
end
end
end
...
...
spec/features/explore/groups_list_spec.rb
View file @
17dccc35
...
@@ -8,8 +8,6 @@ describe 'Explore Groups page', :js do
...
@@ -8,8 +8,6 @@ describe 'Explore Groups page', :js do
let!
(
:empty_project
)
{
create
(
:project
,
group:
public_group
)
}
let!
(
:empty_project
)
{
create
(
:project
,
group:
public_group
)
}
before
do
before
do
pending
(
'Update for new group tree'
)
group
.
add_owner
(
user
)
group
.
add_owner
(
user
)
sign_in
(
user
)
sign_in
(
user
)
...
...
spec/features/groups_spec.rb
View file @
17dccc35
...
@@ -90,11 +90,7 @@ feature 'Group' do
...
@@ -90,11 +90,7 @@ feature 'Group' do
context
'as admin'
do
context
'as admin'
do
before
do
before
do
visit
group_path
(
group
)
visit
new_group_path
(
group
,
parent_id:
group
.
id
)
pending
(
'use the new subgroup button'
)
click_link
'New Subgroup'
end
end
it
'creates a nested group'
do
it
'creates a nested group'
do
...
@@ -114,11 +110,8 @@ feature 'Group' do
...
@@ -114,11 +110,8 @@ feature 'Group' do
sign_out
(
:user
)
sign_out
(
:user
)
sign_in
(
user
)
sign_in
(
user
)
visit
group_path
(
group
)
visit
new_group_path
(
group
,
parent_id:
group
.
id
)
pending
(
'use the new subgroup button'
)
click_link
'New Subgroup'
fill_in
'Group path'
,
with:
'bar'
fill_in
'Group path'
,
with:
'bar'
click_button
'Create group'
click_button
'Create group'
...
@@ -206,13 +199,15 @@ feature 'Group' do
...
@@ -206,13 +199,15 @@ feature 'Group' do
describe
'group page with nested groups'
,
:nested_groups
,
js:
true
do
describe
'group page with nested groups'
,
:nested_groups
,
js:
true
do
let!
(
:group
)
{
create
(
:group
)
}
let!
(
:group
)
{
create
(
:group
)
}
let!
(
:nested_group
)
{
create
(
:group
,
parent:
group
)
}
let!
(
:nested_group
)
{
create
(
:group
,
parent:
group
)
}
let!
(
:project
)
{
create
(
:project
,
namespace:
group
)
}
let!
(
:path
)
{
group_path
(
group
)
}
let!
(
:path
)
{
group_path
(
group
)
}
it
'has nested groups tab with nested groups inside'
do
it
'it renders projects and groups on the page'
do
pending
(
'the child should be visible on the show page'
)
visit
path
visit
path
wait_for_requests
expect
(
page
).
to
have_content
(
nested_group
.
name
)
expect
(
page
).
to
have_content
(
nested_group
.
name
)
expect
(
page
).
to
have_content
(
project
.
name
)
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