BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
41 deletions
+48
-41
bvl-group-trees.yml
changelogs/unreleased/bvl-group-trees.yml
+5
-0
groups_list_spec.rb
spec/features/dashboard/groups_list_spec.rb
+37
-28
groups_list_spec.rb
spec/features/explore/groups_list_spec.rb
+0
-2
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
let!
(
:nested_group
)
{
create
(
:group
,
:nested
)
}
let!
(
:another_group
)
{
create
(
:group
)
}
before
do
pending
(
'Update for new group tree'
)
def
click_group_caret
(
group
)
within
(
"#group-
#{
group
.
id
}
"
)
do
first
(
'.folder-caret'
).
click
end
wait_for_requests
end
it
'shows groups user is member of'
do
...
...
@@ -18,9 +21,13 @@ feature 'Dashboard Groups page', :js do
visit
dashboard_groups_path
wait_for_requests
expect
(
page
).
to
have_content
(
group
.
full_name
)
expect
(
page
).
to
have_content
(
nested_group
.
full_name
)
expect
(
page
).
not_to
have_content
(
another_group
.
full_name
)
expect
(
page
).
to
have_content
(
group
.
name
)
expect
(
page
).
to
have_content
(
nested_group
.
parent
.
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
describe
'when filtering groups'
do
...
...
@@ -33,13 +40,14 @@ feature 'Dashboard Groups page', :js do
visit
dashboard_groups_path
end
it
'
filters
groups'
do
fill_in
'filter'
,
with:
group
.
name
it
'
expands when filtering
groups'
do
fill_in
'filter'
,
with:
nested_
group
.
name
wait_for_requests
expect
(
page
).
to
have_content
(
group
.
full_name
)
expect
(
page
).
not_to
have_content
(
nested_group
.
full_name
)
expect
(
page
).
not_to
have_content
(
another_group
.
full_name
)
expect
(
page
).
not_to
have_content
(
group
.
name
)
expect
(
page
).
to
have_content
(
nested_group
.
parent
.
name
)
expect
(
page
).
to
have_content
(
nested_group
.
name
)
expect
(
page
).
not_to
have_content
(
another_group
.
name
)
end
it
'resets search when user cleans the input'
do
...
...
@@ -49,9 +57,9 @@ feature 'Dashboard Groups page', :js do
fill_in
'filter'
,
with:
''
wait_for_requests
expect
(
page
).
to
have_content
(
group
.
full_
name
)
expect
(
page
).
to
have_content
(
nested_group
.
full_
name
)
expect
(
page
).
not_to
have_content
(
another_group
.
full_
name
)
expect
(
page
).
to
have_content
(
group
.
name
)
expect
(
page
).
to
have_content
(
nested_group
.
parent
.
name
)
expect
(
page
).
not_to
have_content
(
another_group
.
name
)
expect
(
page
.
all
(
'.js-groups-list-holder .content-list li'
).
length
).
to
eq
2
end
end
...
...
@@ -69,28 +77,29 @@ feature 'Dashboard Groups page', :js do
end
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
(
".groups-list-tree-container #group-
#{
group
.
id
}
#group-
#{
subgroup
.
id
}
"
,
count:
1
)
expect
(
page
).
to
have_selector
(
"#group-
#{
group
.
id
}
"
)
click_group_caret
(
group
)
expect
(
page
).
to
have_selector
(
"#group-
#{
group
.
id
}
#group-
#{
subgroup
.
id
}
"
)
end
it
'can toggle parent group'
do
#
Expand
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-right"
)
#
Collaps
ed by default
expect
(
page
).
not_
to
have_selector
(
"#group-
#{
group
.
id
}
.fa-caret-down"
,
count:
1
)
expect
(
page
).
to
have_selector
(
"#group-
#{
group
.
id
}
.fa-caret-right"
)
#
Collapse
find
(
"#group-
#{
group
.
id
}
"
).
trigger
(
'click'
)
#
expand
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-right"
,
count:
1
)
expect
(
page
).
not_
to
have_selector
(
"#group-
#{
group
.
id
}
#group-
#{
subgroup
.
id
}
"
)
expect
(
page
).
to
have_selector
(
"#group-
#{
group
.
id
}
.fa-caret-down"
)
expect
(
page
).
not_
to
have_selector
(
"#group-
#{
group
.
id
}
.fa-caret-right"
,
count:
1
)
expect
(
page
).
to
have_selector
(
"#group-
#{
group
.
id
}
#group-
#{
subgroup
.
id
}
"
)
#
Expand
find
(
"#group-
#{
group
.
id
}
"
).
trigger
(
'click'
)
#
collapse
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-right"
)
expect
(
page
).
to
have_selector
(
"#group-
#{
group
.
id
}
#group-
#{
subgroup
.
id
}
"
)
expect
(
page
).
not_
to
have_selector
(
"#group-
#{
group
.
id
}
.fa-caret-down"
,
count:
1
)
expect
(
page
).
to
have_selector
(
"#group-
#{
group
.
id
}
.fa-caret-right"
)
expect
(
page
).
not_
to
have_selector
(
"#group-
#{
group
.
id
}
#group-
#{
subgroup
.
id
}
"
)
end
end
...
...
spec/features/explore/groups_list_spec.rb
View file @
17dccc35
...
...
@@ -8,8 +8,6 @@ describe 'Explore Groups page', :js do
let!
(
:empty_project
)
{
create
(
:project
,
group:
public_group
)
}
before
do
pending
(
'Update for new group tree'
)
group
.
add_owner
(
user
)
sign_in
(
user
)
...
...
spec/features/groups_spec.rb
View file @
17dccc35
...
...
@@ -90,11 +90,7 @@ feature 'Group' do
context
'as admin'
do
before
do
visit
group_path
(
group
)
pending
(
'use the new subgroup button'
)
click_link
'New Subgroup'
visit
new_group_path
(
group
,
parent_id:
group
.
id
)
end
it
'creates a nested group'
do
...
...
@@ -114,11 +110,8 @@ feature 'Group' do
sign_out
(
:user
)
sign_in
(
user
)
visit
group_path
(
group
)
pending
(
'use the new subgroup button'
)
visit
new_group_path
(
group
,
parent_id:
group
.
id
)
click_link
'New Subgroup'
fill_in
'Group path'
,
with:
'bar'
click_button
'Create group'
...
...
@@ -206,13 +199,15 @@ feature 'Group' do
describe
'group page with nested groups'
,
:nested_groups
,
js:
true
do
let!
(
:group
)
{
create
(
:group
)
}
let!
(
:nested_group
)
{
create
(
:group
,
parent:
group
)
}
let!
(
:project
)
{
create
(
:project
,
namespace:
group
)
}
let!
(
:path
)
{
group_path
(
group
)
}
it
'has nested groups tab with nested groups inside'
do
pending
(
'the child should be visible on the show page'
)
it
'it renders projects and groups on the page'
do
visit
path
wait_for_requests
expect
(
page
).
to
have_content
(
nested_group
.
name
)
expect
(
page
).
to
have_content
(
project
.
name
)
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