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
Boxiang Sun
gitlab-ce
Commits
00d66140
Commit
00d66140
authored
Jun 21, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bring changes from EE
parent
94ac31e2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
2 deletions
+34
-2
spec/features/issues/filtered_search/filter_issues_spec.rb
spec/features/issues/filtered_search/filter_issues_spec.rb
+34
-2
No files found.
spec/features/issues/filtered_search/filter_issues_spec.rb
View file @
00d66140
...
@@ -10,6 +10,7 @@ describe 'Filter issues', :js do
...
@@ -10,6 +10,7 @@ describe 'Filter issues', :js do
# When the name is longer, the filtered search input can end up scrolling
# When the name is longer, the filtered search input can end up scrolling
# horizontally, and PhantomJS can't handle it.
# horizontally, and PhantomJS can't handle it.
let
(
:user
)
{
create
(
:user
,
name:
'Ann'
)
}
let
(
:user
)
{
create
(
:user
,
name:
'Ann'
)
}
let
(
:user2
)
{
create
(
:user
,
name:
'jane'
)
}
let!
(
:bug_label
)
{
create
(
:label
,
project:
project
,
title:
'bug'
)
}
let!
(
:bug_label
)
{
create
(
:label
,
project:
project
,
title:
'bug'
)
}
let!
(
:caps_sensitive_label
)
{
create
(
:label
,
project:
project
,
title:
'CaPs'
)
}
let!
(
:caps_sensitive_label
)
{
create
(
:label
,
project:
project
,
title:
'CaPs'
)
}
...
@@ -25,8 +26,6 @@ describe 'Filter issues', :js do
...
@@ -25,8 +26,6 @@ describe 'Filter issues', :js do
before
do
before
do
project
.
add_master
(
user
)
project
.
add_master
(
user
)
user2
=
create
(
:user
)
create
(
:issue
,
project:
project
,
author:
user2
,
title:
"Bug report 1"
)
create
(
:issue
,
project:
project
,
author:
user2
,
title:
"Bug report 1"
)
create
(
:issue
,
project:
project
,
author:
user2
,
title:
"Bug report 2"
)
create
(
:issue
,
project:
project
,
author:
user2
,
title:
"Bug report 2"
)
...
@@ -113,6 +112,24 @@ describe 'Filter issues', :js do
...
@@ -113,6 +112,24 @@ describe 'Filter issues', :js do
expect_issues_list_count
(
3
)
expect_issues_list_count
(
3
)
expect_filtered_search_input_empty
expect_filtered_search_input_empty
end
end
it
'filters issues by invalid assignee'
do
skip
(
'to be tested, issue #26546'
)
end
it
'filters issues by multiple assignees'
do
create
(
:issue
,
project:
project
,
author:
user
,
assignees:
[
user2
,
user
])
input_filtered_search
(
"assignee:@
#{
user
.
username
}
assignee:@
#{
user2
.
username
}
"
)
expect_tokens
([
assignee_token
(
user
.
name
),
assignee_token
(
user2
.
name
)
])
expect_issues_list_count
(
1
)
expect_filtered_search_input_empty
end
end
end
end
end
...
@@ -491,6 +508,21 @@ describe 'Filter issues', :js do
...
@@ -491,6 +508,21 @@ describe 'Filter issues', :js do
it_behaves_like
'updates atom feed link'
,
:group
do
it_behaves_like
'updates atom feed link'
,
:group
do
let
(
:path
)
{
issues_group_path
(
group
,
milestone_title:
milestone
.
title
,
assignee_id:
user
.
id
)
}
let
(
:path
)
{
issues_group_path
(
group
,
milestone_title:
milestone
.
title
,
assignee_id:
user
.
id
)
}
end
end
it
'updates atom feed link for group issues'
do
visit
issues_group_path
(
group
,
milestone_title:
milestone
.
title
,
assignee_id:
user
.
id
)
link
=
find
(
'.nav-controls a[title="Subscribe to RSS feed"]'
,
visible:
false
)
params
=
CGI
.
parse
(
URI
.
parse
(
link
[
:href
]).
query
)
auto_discovery_link
=
find
(
'link[type="application/atom+xml"]'
,
visible:
false
)
auto_discovery_params
=
CGI
.
parse
(
URI
.
parse
(
auto_discovery_link
[
:href
]).
query
)
expect
(
params
).
to
include
(
'feed_token'
=>
[
user
.
feed_token
])
expect
(
params
).
to
include
(
'milestone_title'
=>
[
milestone
.
title
])
expect
(
params
).
to
include
(
'assignee_id'
=>
[
user
.
id
.
to_s
])
expect
(
auto_discovery_params
).
to
include
(
'feed_token'
=>
[
user
.
feed_token
])
expect
(
auto_discovery_params
).
to
include
(
'milestone_title'
=>
[
milestone
.
title
])
expect
(
auto_discovery_params
).
to
include
(
'assignee_id'
=>
[
user
.
id
.
to_s
])
end
end
end
context
'URL has a trailing slash'
do
context
'URL has a trailing slash'
do
...
...
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