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
471d7a5b
Commit
471d7a5b
authored
Apr 15, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests
parent
3a76cc5c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
106 additions
and
0 deletions
+106
-0
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