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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
a73a99af
Commit
a73a99af
authored
Jan 13, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix specs
parent
65ce3bdd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
58 deletions
+1
-58
spec/features/issues/filter_by_weight_spec.rb
spec/features/issues/filter_by_weight_spec.rb
+0
-57
spec/features/issues/reset_filters_spec.rb
spec/features/issues/reset_filters_spec.rb
+0
-0
spec/requests/api/groups_spec.rb
spec/requests/api/groups_spec.rb
+1
-1
No files found.
spec/features/issues/filter_by_weight_spec.rb
deleted
100644 → 0
View file @
65ce3bdd
require
'rails_helper'
feature
'Issue filtering by Weight'
,
feature:
true
do
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:weight_num
)
{
random_weight
}
before
(
:each
)
do
create
(
:issue
,
project:
project
,
weight:
nil
)
create
(
:issue
,
project:
project
,
weight:
weight_num
)
create
(
:issue
,
project:
project
,
weight:
weight_num
)
end
scenario
'filters by no Weight'
,
js:
true
do
visit_issues
(
project
)
filter_by_weight
(
Issue
::
WEIGHT_NONE
)
expect
(
page
).
to
have_css
(
'.weight-filter .dropdown-toggle-text'
,
text:
Issue
::
WEIGHT_NONE
)
expect
(
page
).
to
have_css
(
'.issue'
,
count:
1
)
end
scenario
'filters by any Weight'
,
js:
true
do
visit_issues
(
project
)
filter_by_weight
(
Issue
::
WEIGHT_ANY
)
expect
(
page
).
to
have_css
(
'.weight-filter .dropdown-toggle-text'
,
text:
Issue
::
WEIGHT_ANY
)
expect
(
page
).
to
have_css
(
'.issue'
,
count:
2
)
end
scenario
'filters by a specific Weight'
,
js:
true
do
visit_issues
(
project
)
filter_by_weight
(
weight_num
)
expect
(
page
).
to
have_css
(
'.weight-filter .dropdown-toggle-text'
,
text:
weight_num
)
expect
(
page
).
to
have_css
(
'.issue'
,
count:
2
)
end
scenario
'all weights'
,
js:
true
do
visit_issues
(
project
)
filter_by_weight
(
Issue
::
WEIGHT_ALL
)
expect
(
page
).
to
have_css
(
'.weight-filter .dropdown-toggle-text'
,
text:
Issue
::
WEIGHT_ALL
)
expect
(
page
).
to
have_css
(
'.issue'
,
count:
3
)
end
def
visit_issues
(
project
)
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
end
def
filter_by_weight
(
title
)
find
(
'.js-weight-select'
).
click
find
(
'.weight-filter .dropdown-content a'
,
text:
title
,
match: :first
).
click
end
def
random_weight
Issue
::
WEIGHT_RANGE
.
to_a
.
sample
end
end
spec/features/issues/reset_filters_spec.rb
deleted
100644 → 0
View file @
65ce3bdd
spec/requests/api/groups_spec.rb
View file @
a73a99af
...
...
@@ -87,7 +87,7 @@ describe API::Groups, api: true do
expect
(
response
).
to
have_http_status
(
200
)
expect
(
json_response
).
to
be_an
Array
expect
(
json_response
.
fi
rst
[
'statistics'
]).
to
eq
attributes
.
stringify_keys
expect
(
json_response
.
fi
nd
{
|
r
|
r
[
'id'
]
==
group1
.
id
}
[
'statistics'
]).
to
eq
attributes
.
stringify_keys
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