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
18dd86b6
Commit
18dd86b6
authored
Aug 31, 2017
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove more redundant specs in filter_issues_spec
We were essentially testing "all of the filters" four times, so now we just do it once at the top level.
parent
f70a56f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
72 deletions
+17
-72
filter_issues_spec.rb
spec/features/issues/filtered_search/filter_issues_spec.rb
+17
-72
No files found.
spec/features/issues/filtered_search/filter_issues_spec.rb
View file @
18dd86b6
...
...
@@ -67,6 +67,23 @@ describe 'Filter issues', js: true do
visit
project_issues_path
(
project
)
end
it
'filters by all available tokens'
do
search_term
=
'issue'
input_filtered_search
(
"assignee:@
#{
user
.
username
}
author:@
#{
user
.
username
}
label:~
#{
caps_sensitive_label
.
title
}
milestone:%
#{
milestone
.
title
}
#{
search_term
}
"
)
wait_for_requests
expect_tokens
([
assignee_token
(
user
.
name
),
author_token
(
user
.
name
),
label_token
(
caps_sensitive_label
.
title
),
milestone_token
(
milestone
.
title
)
])
expect_issues_list_count
(
1
)
expect_filtered_search_input
(
search_term
)
end
describe
'filter issues by author'
do
context
'only author'
do
it
'filters issues by searched author'
do
...
...
@@ -79,25 +96,6 @@ describe 'Filter issues', js: true do
expect_filtered_search_input_empty
end
end
context
'author with other filters'
do
it
'filters issues by searched author, assignee, label, milestone and text'
do
search_term
=
'issue'
input_filtered_search
(
"author:@
#{
user
.
username
}
assignee:@
#{
user
.
username
}
label:~
#{
caps_sensitive_label
.
title
}
milestone:%
#{
milestone
.
title
}
#{
search_term
}
"
)
wait_for_requests
expect_tokens
([
author_token
(
user
.
name
),
assignee_token
(
user
.
name
),
label_token
(
caps_sensitive_label
.
title
),
milestone_token
(
milestone
.
title
)
])
expect_issues_list_count
(
1
)
expect_filtered_search_input
(
search_term
)
end
end
end
describe
'filter issues by assignee'
do
...
...
@@ -120,23 +118,6 @@ describe 'Filter issues', js: true do
expect_filtered_search_input_empty
end
end
context
'assignee with other filters'
do
it
'filters issues by searched assignee, author, label, milestone and text'
do
search_term
=
'searchTerm'
input_filtered_search
(
"assignee:@
#{
user
.
username
}
author:@
#{
user
.
username
}
label:~
#{
caps_sensitive_label
.
title
}
milestone:%
#{
milestone
.
title
}
#{
search_term
}
"
)
expect_tokens
([
assignee_token
(
user
.
name
),
author_token
(
user
.
name
),
label_token
(
caps_sensitive_label
.
title
),
milestone_token
(
milestone
.
title
)
])
expect_issues_list_count
(
1
)
expect_filtered_search_input
(
search_term
)
end
end
end
describe
'filter issues by label'
do
...
...
@@ -249,23 +230,6 @@ describe 'Filter issues', js: true do
end
end
context
'label with other filters'
do
it
'filters issues by searched label, author, assignee, milestone and text'
do
search_term
=
'bug'
input_filtered_search
(
"label:~
#{
caps_sensitive_label
.
title
}
author:@
#{
user
.
username
}
assignee:@
#{
user
.
username
}
milestone:%
#{
milestone
.
title
}
#{
search_term
}
"
)
expect_tokens
([
label_token
(
caps_sensitive_label
.
title
),
author_token
(
user
.
name
),
assignee_token
(
user
.
name
),
milestone_token
(
milestone
.
title
)
])
expect_issues_list_count
(
1
)
expect_filtered_search_input
(
search_term
)
end
end
context
'multiple labels with other filters'
do
it
'filters issues by searched label, label2, author, assignee, milestone and text'
do
search_term
=
'bug'
...
...
@@ -361,25 +325,6 @@ describe 'Filter issues', js: true do
expect_filtered_search_input_empty
end
end
context
'milestone with other filters'
do
it
'filters issues by searched milestone, author, assignee, label and text'
do
search_term
=
'bug'
input_filtered_search
(
"milestone:%
#{
milestone
.
title
}
author:@
#{
user
.
username
}
assignee:@
#{
user
.
username
}
label:~
#{
bug_label
.
title
}
#{
search_term
}
"
)
wait_for_requests
expect_tokens
([
milestone_token
(
milestone
.
title
),
author_token
(
user
.
name
),
assignee_token
(
user
.
name
),
label_token
(
bug_label
.
title
)
])
expect_issues_list_count
(
2
)
expect_filtered_search_input
(
search_term
)
end
end
end
describe
'filter issues by text'
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