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
Léo-Paul Géneau
gitlab-ce
Commits
b1528859
Commit
b1528859
authored
Aug 31, 2017
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Combine multiple `it` blocks in filter_issues_spec
parent
18dd86b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
18 deletions
+9
-18
spec/features/issues/filtered_search/filter_issues_spec.rb
spec/features/issues/filtered_search/filter_issues_spec.rb
+9
-18
No files found.
spec/features/issues/filtered_search/filter_issues_spec.rb
View file @
b1528859
...
...
@@ -251,15 +251,10 @@ describe 'Filter issues', js: true do
end
context
'issue label clicked'
do
before
do
it
'filters and displays in search bar'
do
find
(
'.issues-list .issue .issue-main-info .issuable-info a .label'
,
text:
multiple_words_label
.
title
).
click
end
it
'filters'
do
expect_issues_list_count
(
1
)
end
it
'displays in search bar'
do
expect_tokens
([
label_token
(
"
\"
#{
multiple_words_label
.
title
}
\"
"
)])
expect_filtered_search_input_empty
end
...
...
@@ -435,7 +430,7 @@ describe 'Filter issues', js: true do
end
end
describe
'
retains filter when
switching issue states'
do
describe
'switching issue states'
do
let!
(
:closed_issue
)
{
create
(
:issue
,
:closed
,
project:
project
,
title:
'closed bug'
)
}
before
do
...
...
@@ -445,25 +440,21 @@ describe 'Filter issues', js: true do
expect_issues_list_count
(
4
,
1
)
end
it
'open state'
do
it
'maintains filter'
do
# Closed
find
(
'.issues-state-filters [data-state="closed"]'
).
click
wait_for_requests
expect
(
page
).
to
have_selector
(
'.issues-list .issue'
,
count:
1
)
expect
(
page
).
to
have_link
(
closed_issue
.
title
)
# Opened
find
(
'.issues-state-filters [data-state="opened"]'
).
click
wait_for_requests
expect
(
page
).
to
have_selector
(
'.issues-list .issue'
,
count:
4
)
end
it
'closed state'
do
find
(
'.issues-state-filters [data-state="closed"]'
).
click
wait_for_requests
expect
(
page
).
to
have_selector
(
'.issues-list .issue'
,
count:
1
)
expect
(
find
(
'.issues-list .issue:first-of-type .issue-title-text a'
)).
to
have_content
(
closed_issue
.
title
)
end
it
'all state'
do
# All
find
(
'.issues-state-filters [data-state="all"]'
).
click
wait_for_requests
...
...
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