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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
f128cdb8
Commit
f128cdb8
authored
Jul 30, 2018
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more specs to labels search feature
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
300f6aba
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
4 deletions
+45
-4
spec/features/projects/labels/search_labels_spec.rb
spec/features/projects/labels/search_labels_spec.rb
+45
-4
No files found.
spec/features/projects/labels/search_labels_spec.rb
View file @
f128cdb8
...
@@ -9,11 +9,11 @@ describe 'Search for labels', :js do
...
@@ -9,11 +9,11 @@ describe 'Search for labels', :js do
before
do
before
do
project
.
add_maintainer
(
user
)
project
.
add_maintainer
(
user
)
sign_in
(
user
)
sign_in
(
user
)
end
it
'searches for label by title'
do
visit
project_labels_path
(
project
)
visit
project_labels_path
(
project
)
end
it
'searches for label by title'
do
fill_in
'label-search'
,
with:
'Bar'
fill_in
'label-search'
,
with:
'Bar'
find
(
'#label-search'
).
native
.
send_keys
(
:enter
)
find
(
'#label-search'
).
native
.
send_keys
(
:enter
)
...
@@ -24,8 +24,6 @@ describe 'Search for labels', :js do
...
@@ -24,8 +24,6 @@ describe 'Search for labels', :js do
end
end
it
'searches for label by title'
do
it
'searches for label by title'
do
visit
project_labels_path
(
project
)
fill_in
'label-search'
,
with:
'Lorem'
fill_in
'label-search'
,
with:
'Lorem'
find
(
'#label-search'
).
native
.
send_keys
(
:enter
)
find
(
'#label-search'
).
native
.
send_keys
(
:enter
)
...
@@ -34,4 +32,47 @@ describe 'Search for labels', :js do
...
@@ -34,4 +32,47 @@ describe 'Search for labels', :js do
expect
(
page
).
not_to
have_content
(
label2
.
title
)
expect
(
page
).
not_to
have_content
(
label2
.
title
)
expect
(
page
).
not_to
have_content
(
label2
.
description
)
expect
(
page
).
not_to
have_content
(
label2
.
description
)
end
end
it
'shows nothing found message'
do
fill_in
'label-search'
,
with:
'nonexistent'
find
(
'#label-search'
).
native
.
send_keys
(
:enter
)
expect
(
page
).
to
have_content
(
'No labels with such name or description'
)
expect
(
page
).
not_to
have_content
(
label1
.
title
)
expect
(
page
).
not_to
have_content
(
label1
.
description
)
expect
(
page
).
not_to
have_content
(
label2
.
title
)
expect
(
page
).
not_to
have_content
(
label2
.
description
)
end
context
'priority labels'
do
let!
(
:label_priority
)
{
create
(
:label_priority
,
label:
label1
,
project:
project
)
}
it
'searches for priority label'
do
fill_in
'label-search'
,
with:
'Foo'
find
(
'#label-search'
).
native
.
send_keys
(
:enter
)
page
.
within
(
'.prioritized-labels'
)
do
expect
(
page
).
to
have_content
(
label1
.
title
)
expect
(
page
).
to
have_content
(
label1
.
description
)
end
page
.
within
(
'.other-labels'
)
do
expect
(
page
).
to
have_content
(
'No labels with such name or description'
)
end
end
it
'searches for other label'
do
fill_in
'label-search'
,
with:
'Bar'
find
(
'#label-search'
).
native
.
send_keys
(
:enter
)
page
.
within
(
'.prioritized-labels'
)
do
expect
(
page
).
to
have_content
(
'No labels with such name or description'
)
end
page
.
within
(
'.other-labels'
)
do
expect
(
page
).
to
have_content
(
label2
.
title
)
expect
(
page
).
to
have_content
(
label2
.
description
)
end
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