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
471d7a5b
Commit
471d7a5b
authored
Apr 15, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests
parent
3a76cc5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
106 additions
and
0 deletions
+106
-0
spec/features/issues/filter_issues_spec.rb
spec/features/issues/filter_issues_spec.rb
+106
-0
No files found.
spec/features/issues/filter_issues_spec.rb
View file @
471d7a5b
...
@@ -154,4 +154,110 @@ describe 'Filter issues', feature: true do
...
@@ -154,4 +154,110 @@ describe 'Filter issues', feature: true do
end
end
end
end
end
end
describe
'filter issues by text'
do
before
do
create
(
:issue
,
title:
"Bug"
,
project:
project
)
create
(
:label
,
project:
project
,
title:
'bug'
)
milestone
=
create
(
:milestone
,
title:
"8"
,
project:
project
)
issue
=
create
(
:issue
,
title:
"Bug 2"
,
project:
project
,
milestone:
milestone
,
author:
user
,
assignee:
user
)
issue
.
labels
<<
project
.
labels
.
find_by
(
title:
'bug'
)
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
end
context
'only text'
,
js:
true
do
it
'should filter issues by searched text'
do
fill_in
'issue_search'
,
with:
'Bug'
page
.
within
'.issues-list'
do
expect
(
page
).
to
have_selector
(
'.issue'
,
count:
2
)
end
end
it
'should not show any issues'
do
fill_in
'issue_search'
,
with:
'testing'
page
.
within
'.issues-list'
do
expect
(
page
).
to_not
have_selector
(
'.issue'
)
end
end
it
'should filter by text and label'
do
fill_in
'issue_search'
,
with:
'Bug'
page
.
within
'.issues-list'
do
expect
(
page
).
to
have_selector
(
'.issue'
,
count:
2
)
end
click_button
'Label'
page
.
within
'.labels-filter'
do
click_link
'bug'
end
page
.
within
'.issues-list'
do
expect
(
page
).
to
have_selector
(
'.issue'
,
count:
1
)
end
end
it
'should filter by text and milestone'
do
fill_in
'issue_search'
,
with:
'Bug'
page
.
within
'.issues-list'
do
expect
(
page
).
to
have_selector
(
'.issue'
,
count:
2
)
end
click_button
'Milestone'
page
.
within
'.milestone-filter'
do
click_link
'8'
end
page
.
within
'.issues-list'
do
expect
(
page
).
to
have_selector
(
'.issue'
,
count:
1
)
end
end
it
'should filter by text and assignee'
do
fill_in
'issue_search'
,
with:
'Bug'
page
.
within
'.issues-list'
do
expect
(
page
).
to
have_selector
(
'.issue'
,
count:
2
)
end
click_button
'Assignee'
page
.
within
'.dropdown-menu-assignee'
do
click_link
user
.
name
end
page
.
within
'.issues-list'
do
expect
(
page
).
to
have_selector
(
'.issue'
,
count:
1
)
end
end
it
'should filter by text and author'
do
fill_in
'issue_search'
,
with:
'Bug'
page
.
within
'.issues-list'
do
expect
(
page
).
to
have_selector
(
'.issue'
,
count:
2
)
end
click_button
'Author'
page
.
within
'.dropdown-menu-author'
do
click_link
user
.
name
end
page
.
within
'.issues-list'
do
expect
(
page
).
to
have_selector
(
'.issue'
,
count:
1
)
end
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