Commit 62574be3 authored by Felipe Artur's avatar Felipe Artur

Fix specs

parent 22423d28
...@@ -34,8 +34,8 @@ class Milestone < ActiveRecord::Base ...@@ -34,8 +34,8 @@ class Milestone < ActiveRecord::Base
scope :for_projects_and_groups, -> (project_ids, group_ids) do scope :for_projects_and_groups, -> (project_ids, group_ids) do
conditions = [] conditions = []
conditions << arel_table[:project_id].in(project_ids) if project_ids.compact.any? conditions << arel_table[:project_id].in(project_ids) if project_ids&.compact&.any?
conditions << arel_table[:group_id].in(group_ids) if group_ids.compact.any? conditions << arel_table[:group_id].in(group_ids) if group_ids&.compact&.any?
where(conditions.reduce(:or)) where(conditions.reduce(:or))
end end
......
...@@ -115,9 +115,9 @@ feature 'Labels Hierarchy', :js, :nested_groups do ...@@ -115,9 +115,9 @@ feature 'Labels Hierarchy', :js, :nested_groups do
it 'filters by descendant group labels' do it 'filters by descendant group labels' do
wait_for_requests wait_for_requests
if board
select_label_on_dropdown(group_label_3.title) select_label_on_dropdown(group_label_3.title)
if board
expect(page).to have_selector('.card-title') do |card| expect(page).to have_selector('.card-title') do |card|
expect(card).not_to have_selector('a', text: labeled_issue_2.title) expect(card).not_to have_selector('a', text: labeled_issue_2.title)
end end
...@@ -126,8 +126,6 @@ feature 'Labels Hierarchy', :js, :nested_groups do ...@@ -126,8 +126,6 @@ feature 'Labels Hierarchy', :js, :nested_groups do
expect(card).to have_selector('a', text: labeled_issue_3.title) expect(card).to have_selector('a', text: labeled_issue_3.title)
end end
else else
select_label_on_dropdown(group_label_3.title)
expect_issues_list_count(1) expect_issues_list_count(1)
expect(page).to have_selector('span.issue-title-text', text: labeled_issue_3.title) expect(page).to have_selector('span.issue-title-text', text: labeled_issue_3.title)
end end
......
...@@ -41,6 +41,8 @@ describe('Issue card component', () => { ...@@ -41,6 +41,8 @@ describe('Issue card component', () => {
confidential: false, confidential: false,
labels: [list.label], labels: [list.label],
assignees: [], assignees: [],
reference_path: '#1',
real_path: '/test/1'
}); });
component = new Vue({ component = new Vue({
......
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