Commit 4b963016 authored by Felipe Artur's avatar Felipe Artur

Hide test cases from issue boards

Do not list test cases under issue boards
parent cf2bca62
......@@ -80,6 +80,7 @@ module Boards
set_scope
set_non_archived
set_attempt_search_optimizations
set_issue_types
params
end
......@@ -116,6 +117,10 @@ module Boards
end
end
def set_issue_types
params[:issue_types] = Issue::TYPES_FOR_LIST
end
# rubocop: disable CodeReuse/ActiveRecord
def board_label_ids
@board_label_ids ||= board.lists.movable.pluck(:label_id)
......
......@@ -180,6 +180,18 @@ RSpec.describe Boards::Issues::ListService, services: true do
expect(issues).to contain_exactly(opened_issue1, opened_issue2, reopened_issue1)
end
end
context 'when test cases are present' do
it 'filters out test cases' do
create(:quality_test_case, project: project, milestone: m1, title: 'Test Case 1', labels: [development])
incident = create(:incident, project: project, milestone: m1, title: 'Incident 1', labels: [development])
params = { board_id: board.id, id: list1.id }
issues = described_class.new(parent, user, params).execute
expect(issues).to match_array([list1_issue1, list1_issue2, list1_issue3, incident])
end
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment