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
7507a711
Commit
7507a711
authored
Apr 05, 2018
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add EE feature spec
parent
b27ac785
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
84 additions
and
0 deletions
+84
-0
ee/spec/features/labels_hierarchy.rb
ee/spec/features/labels_hierarchy.rb
+84
-0
No files found.
ee/spec/features/labels_hierarchy.rb
0 → 100644
View file @
7507a711
require
'spec_helper'
feature
'Labels Hierarchy'
,
:js
,
:nested_groups
do
let!
(
:user
)
{
create
(
:user
)
}
let!
(
:grandparent
)
{
create
(
:group
)
}
let!
(
:parent
)
{
create
(
:group
,
parent:
grandparent
)
}
let!
(
:child
)
{
create
(
:group
,
parent:
parent
)
}
let!
(
:project_1
)
{
create
(
:project
,
namespace:
child
)
}
let!
(
:grandparent_group_label
)
{
create
(
:group_label
,
group:
grandparent
,
title:
'Label_1'
)
}
let!
(
:parent_group_label
)
{
create
(
:group_label
,
group:
parent
,
title:
'Label_2'
)
}
let!
(
:child_group_label
)
{
create
(
:group_label
,
group:
child
,
title:
'Label_3'
)
}
let!
(
:project_label_1
)
{
create
(
:label
,
project:
project_1
,
title:
'Label_4'
)
}
let!
(
:labeled_issue_1
)
{
create
(
:labeled_issue
,
project:
project_1
,
labels:
[
grandparent_group_label
,
parent_group_label
,
child_group_label
])
}
let!
(
:labeled_issue_2
)
{
create
(
:labeled_issue
,
project:
project_1
,
labels:
[
grandparent_group_label
,
parent_group_label
])
}
let!
(
:labeled_issue_3
)
{
create
(
:labeled_issue
,
project:
project_1
,
labels:
[
grandparent_group_label
,
parent_group_label
,
child_group_label
,
project_label_1
])
}
let!
(
:not_labeled
)
{
create
(
:issue
,
project:
project_1
)
}
before
do
grandparent
.
add_owner
(
user
)
sign_in
(
user
)
end
shared_examples
'filter for scoped boards'
do
|
project
=
false
|
it
'scopes board to ancestor and descendant labels'
do
labels
=
[
grandparent_group_label
,
parent_group_label
,
child_group_label
]
labels
.
push
(
project_label_1
)
if
project
labels
.
each
do
|
label
|
page
.
within
(
'.filter-dropdown-container'
)
do
find
(
'button'
,
text:
"Edit board"
).
click
end
page
.
within
(
'.js-labels-block'
)
do
find
(
'.edit-link'
).
click
end
wait_for_requests
find
(
'a.label-item'
,
text:
label
.
title
).
click
find
(
'button'
,
text:
"Save changes"
).
click
wait_for_requests
expect
(
page
).
to
have_selector
(
'.card'
,
count:
label
.
issues
.
count
)
label
.
issues
.
each
do
|
issue
|
expect
(
page
).
to
have_selector
(
'.card-title'
)
do
|
card
|
expect
(
card
).
to
have_selector
(
'a'
,
text
:issue
.
title
)
end
end
end
end
end
context
'scoped boards'
do
context
'for group boards'
do
let
(
:board
)
{
create
(
:board
,
group:
parent
)
}
before
do
visit
group_board_path
(
parent
,
board
)
wait_for_requests
end
it_behaves_like
'filter for scoped boards'
end
context
'for project boards'
do
let
(
:board
)
{
create
(
:board
,
project:
project_1
)
}
before
do
visit
project_board_path
(
project_1
,
board
)
wait_for_requests
end
it_behaves_like
'filter for scoped boards'
,
true
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