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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
1e876797
Commit
1e876797
authored
Apr 06, 2016
by
Arinde Eniola
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
complete the tests
parent
55b2fae3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
1 deletion
+75
-1
spec/features/issues/filter_issues_spec.rb
spec/features/issues/filter_issues_spec.rb
+75
-1
No files found.
spec/features/issues/filter_issues_spec.rb
View file @
1e876797
...
@@ -3,8 +3,9 @@ require 'rails_helper'
...
@@ -3,8 +3,9 @@ require 'rails_helper'
describe
'Filter issues'
,
feature:
true
do
describe
'Filter issues'
,
feature:
true
do
let!
(
:project
)
{
create
(
:project
)
}
let!
(
:project
)
{
create
(
:project
)
}
let!
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let!
(
:user
)
{
create
(
:user
)}
let!
(
:user
)
{
create
(
:user
)}
let!
(
:milestone
)
{
create
(
:milestone
,
project:
project
)
}
let!
(
:label
)
{
create
(
:label
,
project:
project
)
}
before
do
before
do
project
.
team
<<
[
user
,
:master
]
project
.
team
<<
[
user
,
:master
]
...
@@ -42,4 +43,77 @@ describe 'Filter issues', feature: true do
...
@@ -42,4 +43,77 @@ describe 'Filter issues', feature: true do
end
end
end
end
end
end
describe
'Filter issues for milestone from issues#index'
do
before
do
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
find
(
'.js-milestone-select'
).
click
find
(
'.milestone-filter .dropdown-content a'
,
text:
milestone
.
title
).
click
sleep
2
end
context
'milestone'
,
js:
true
do
it
'should update to current milestone'
do
expect
(
find
(
'.js-milestone-select .dropdown-toggle-text'
)).
to
have_content
(
milestone
.
title
)
end
it
'should not change when closed link is clicked'
do
find
(
'.issues-state-filters a'
,
text:
"Closed"
).
click
expect
(
find
(
'.js-milestone-select .dropdown-toggle-text'
)).
to
have_content
(
milestone
.
title
)
end
it
'should not change when all link is clicked'
do
find
(
'.issues-state-filters a'
,
text:
"All"
).
click
expect
(
find
(
'.js-milestone-select .dropdown-toggle-text'
)).
to
have_content
(
milestone
.
title
)
end
end
end
describe
'Filter issues for assignee and label from issues#index'
do
before
do
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
find
(
'.js-assignee-search'
).
click
find
(
'.dropdown-menu-user-link'
,
text:
user
.
username
).
click
sleep
2
find
(
'.js-label-select'
).
click
find
(
'.dropdown-menu-labels .dropdown-content a'
,
text:
label
.
title
).
click
sleep
2
end
context
'assignee and label'
,
js:
true
do
it
'should update to current assignee and label'
do
expect
(
find
(
'.js-assignee-search .dropdown-toggle-text'
)).
to
have_content
(
user
.
name
)
expect
(
find
(
'.js-label-select .dropdown-toggle-text'
)).
to
have_content
(
label
.
title
)
end
it
'should not change when closed link is clicked'
do
find
(
'.issues-state-filters a'
,
text:
"Closed"
).
click
expect
(
find
(
'.js-assignee-search .dropdown-toggle-text'
)).
to
have_content
(
user
.
name
)
expect
(
find
(
'.js-label-select .dropdown-toggle-text'
)).
to
have_content
(
label
.
title
)
end
it
'should not change when all link is clicked'
do
find
(
'.issues-state-filters a'
,
text:
"All"
).
click
expect
(
find
(
'.js-assignee-search .dropdown-toggle-text'
)).
to
have_content
(
user
.
name
)
expect
(
find
(
'.js-label-select .dropdown-toggle-text'
)).
to
have_content
(
label
.
title
)
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