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
1456c6a4
Commit
1456c6a4
authored
Oct 17, 2019
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move scoped label spec to EE
parent
8a713738
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
31 deletions
+36
-31
ee/spec/features/boards/sidebar_spec.rb
ee/spec/features/boards/sidebar_spec.rb
+36
-0
spec/features/boards/sidebar_spec.rb
spec/features/boards/sidebar_spec.rb
+0
-31
No files found.
ee/spec/features/boards/sidebar_spec.rb
View file @
1456c6a4
...
@@ -250,4 +250,40 @@ describe 'Issue Boards', :js do
...
@@ -250,4 +250,40 @@ describe 'Issue Boards', :js do
end
end
end
end
end
end
context
'scoped labels'
do
let!
(
:scoped_label_1
)
{
create
(
:label
,
project:
project
,
name:
'Scoped::Label1'
)
}
let!
(
:scoped_label_2
)
{
create
(
:label
,
project:
project
,
name:
'Scoped::Label2'
)
}
before
do
stub_licensed_features
(
scoped_labels:
true
)
end
it
'removes existing scoped label'
do
click_card
(
card
)
page
.
within
(
'.labels'
)
do
click_link
'Edit'
wait_for_requests
click_link
scoped_label_1
.
title
click_link
scoped_label_2
.
title
wait_for_requests
find
(
'.dropdown-menu-close-icon'
).
click
page
.
within
(
'.value'
)
do
expect
(
page
).
to
have_selector
(
'.scoped-label-wrapper'
,
count:
1
)
expect
(
page
).
not_to
have_content
(
scoped_label_1
.
title
)
expect
(
page
).
to
have_content
(
scoped_label_2
.
title
)
end
end
expect
(
card
).
to
have_selector
(
'.scoped-label-wrapper'
,
count:
1
)
expect
(
card
).
not_to
have_content
(
scoped_label_1
.
title
)
expect
(
card
).
to
have_content
(
scoped_label_2
.
title
)
end
end
end
end
spec/features/boards/sidebar_spec.rb
View file @
1456c6a4
...
@@ -14,8 +14,6 @@ describe 'Issue Boards', :js do
...
@@ -14,8 +14,6 @@ describe 'Issue Boards', :js do
let!
(
:bug
)
{
create
(
:label
,
project:
project
,
name:
'Bug'
)
}
let!
(
:bug
)
{
create
(
:label
,
project:
project
,
name:
'Bug'
)
}
let!
(
:regression
)
{
create
(
:label
,
project:
project
,
name:
'Regression'
)
}
let!
(
:regression
)
{
create
(
:label
,
project:
project
,
name:
'Regression'
)
}
let!
(
:stretch
)
{
create
(
:label
,
project:
project
,
name:
'Stretch'
)
}
let!
(
:stretch
)
{
create
(
:label
,
project:
project
,
name:
'Stretch'
)
}
let!
(
:scoped_label_1
)
{
create
(
:label
,
project:
project
,
name:
'Scoped::Label1'
)
}
let!
(
:scoped_label_2
)
{
create
(
:label
,
project:
project
,
name:
'Scoped::Label2'
)
}
let!
(
:issue1
)
{
create
(
:labeled_issue
,
project:
project
,
assignees:
[
user
],
milestone:
milestone
,
labels:
[
development
],
relative_position:
2
)
}
let!
(
:issue1
)
{
create
(
:labeled_issue
,
project:
project
,
assignees:
[
user
],
milestone:
milestone
,
labels:
[
development
],
relative_position:
2
)
}
let!
(
:issue2
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
development
,
stretch
],
relative_position:
1
)
}
let!
(
:issue2
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
development
,
stretch
],
relative_position:
1
)
}
let
(
:board
)
{
create
(
:board
,
project:
project
)
}
let
(
:board
)
{
create
(
:board
,
project:
project
)
}
...
@@ -29,8 +27,6 @@ describe 'Issue Boards', :js do
...
@@ -29,8 +27,6 @@ describe 'Issue Boards', :js do
end
end
before
do
before
do
stub_licensed_features
(
scoped_labels:
true
)
project
.
add_maintainer
(
user
)
project
.
add_maintainer
(
user
)
sign_in
(
user
)
sign_in
(
user
)
...
@@ -313,33 +309,6 @@ describe 'Issue Boards', :js do
...
@@ -313,33 +309,6 @@ describe 'Issue Boards', :js do
expect
(
card
).
to
have_content
(
bug
.
title
)
expect
(
card
).
to
have_content
(
bug
.
title
)
end
end
it
'removes existing scoped label'
do
click_card
(
card
)
page
.
within
(
'.labels'
)
do
click_link
'Edit'
wait_for_requests
click_link
scoped_label_1
.
title
click_link
scoped_label_2
.
title
wait_for_requests
find
(
'.dropdown-menu-close-icon'
).
click
page
.
within
(
'.value'
)
do
expect
(
page
).
to
have_selector
(
'.scoped-label-wrapper'
,
count:
1
)
expect
(
page
).
not_to
have_content
(
scoped_label_1
.
title
)
expect
(
page
).
to
have_content
(
scoped_label_2
.
title
)
end
end
expect
(
card
).
to
have_selector
(
'.scoped-label-wrapper'
,
count:
1
)
expect
(
card
).
not_to
have_content
(
scoped_label_1
.
title
)
expect
(
card
).
to
have_content
(
scoped_label_2
.
title
)
end
it
'adds a multiple labels'
do
it
'adds a multiple labels'
do
click_card
(
card
)
click_card
(
card
)
...
...
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