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
8c55118b
Commit
8c55118b
authored
Oct 01, 2020
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide test cases from dashboard and group issues list
Do not show test case issues on dashboard and group issues list.
parent
fd8bd5ed
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
3 deletions
+25
-3
app/controllers/concerns/issuable_collections_action.rb
app/controllers/concerns/issuable_collections_action.rb
+4
-1
spec/controllers/dashboard_controller_spec.rb
spec/controllers/dashboard_controller_spec.rb
+10
-0
spec/controllers/groups_controller_spec.rb
spec/controllers/groups_controller_spec.rb
+11
-2
No files found.
app/controllers/concerns/issuable_collections_action.rb
View file @
8c55118b
...
...
@@ -59,6 +59,9 @@ module IssuableCollectionsAction
end
def
finder_options
super
.
merge
(
non_archived:
true
)
super
.
merge
(
non_archived:
true
,
issue_types:
Issue
::
TYPES_FOR_LIST
)
end
end
spec/controllers/dashboard_controller_spec.rb
View file @
8c55118b
...
...
@@ -15,6 +15,16 @@ RSpec.describe DashboardController do
describe
'GET issues'
do
it_behaves_like
'issuables list meta-data'
,
:issue
,
:issues
it_behaves_like
'issuables requiring filter'
,
:issues
it
'lists only incidents and issues'
do
issue
=
create
(
:incident
,
project:
project
,
author:
user
)
incident
=
create
(
:incident
,
project:
project
,
author:
user
)
create
(
:quality_test_case
,
project:
project
,
author:
user
)
get
:issues
,
params:
{
author_id:
user
.
id
}
expect
(
assigns
(
:issues
)).
to
match_array
([
issue
,
incident
])
end
end
describe
'GET merge requests'
do
...
...
spec/controllers/groups_controller_spec.rb
View file @
8c55118b
...
...
@@ -389,8 +389,8 @@ RSpec.describe GroupsController, factory_default: :keep do
end
describe
'GET #issues'
,
:sidekiq_might_not_need_inline
do
let
(
:issue_1
)
{
create
(
:issue
,
project:
project
,
title:
'foo'
)
}
let
(
:issue_2
)
{
create
(
:issue
,
project:
project
,
title:
'bar'
)
}
let
_it_be
(
:issue_1
)
{
create
(
:issue
,
project:
project
,
title:
'foo'
)
}
let
_it_be
(
:issue_2
)
{
create
(
:issue
,
project:
project
,
title:
'bar'
)
}
before
do
create_list
(
:award_emoji
,
3
,
awardable:
issue_2
)
...
...
@@ -400,6 +400,15 @@ RSpec.describe GroupsController, factory_default: :keep do
sign_in
(
user
)
end
it
'lists only incidents and issues'
do
incident
=
create
(
:incident
,
project:
project
)
create
(
:quality_test_case
,
project:
project
)
get
:issues
,
params:
{
id:
group
.
to_param
}
expect
(
assigns
(
:issues
)).
to
match_array
([
issue_1
,
issue_2
,
incident
])
end
context
'sorting by votes'
do
it
'sorts most popular issues'
do
get
:issues
,
params:
{
id:
group
.
to_param
,
sort:
'upvotes_desc'
}
...
...
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