Commit 377493a9 authored by Vitaly Slobodin's avatar Vitaly Slobodin

Merge branch 'psi-inherit-cadences' into 'master'

Include cadences from parent groups

See merge request gitlab-org/gitlab!65137
parents a304e877 0c465f4c
......@@ -9,6 +9,7 @@ query IterationCadences(
) {
group(fullPath: $fullPath) {
iterationCadences(
includeAncestorGroups: true
before: $beforeCursor
after: $afterCursor
first: $firstPageSize
......
......@@ -5,19 +5,21 @@ require 'spec_helper'
RSpec.describe 'User views iteration cadences', :js do
let_it_be(:user) { create(:user) }
let_it_be(:group) { create(:group) }
let_it_be(:subgroup) { create(:group, parent: group) }
let_it_be(:cadence) { create(:iterations_cadence, group: group) }
let_it_be(:other_cadence) { create(:iterations_cadence, group: group) }
let_it_be(:subgroup_cadence) { create(:iterations_cadence, group: subgroup) }
let_it_be(:iteration_in_cadence) { create(:iteration, group: group, iterations_cadence: cadence) }
let_it_be(:closed_iteration_in_cadence) { create(:iteration, group: group, iterations_cadence: cadence, start_date: 2.weeks.ago, due_date: 1.week.ago) }
let_it_be(:iteration_in_other_cadence) { create(:iteration, group: group, iterations_cadence: other_cadence) }
before do
stub_licensed_features(iterations: true)
visit group_iteration_cadences_path(group)
end
it 'shows iteration cadences with iterations when expanded', :aggregate_failures do
visit group_iteration_cadences_path(group)
expect(page).to have_title('Iteration cadences')
expect(page).to have_content(cadence.title)
expect(page).to have_content(other_cadence.title)
......@@ -27,15 +29,25 @@ RSpec.describe 'User views iteration cadences', :js do
click_button cadence.title
expect(page).to have_content(iteration_in_cadence.title)
expect(page).not_to have_content(subgroup_cadence.title)
expect(page).not_to have_content(iteration_in_other_cadence.title)
expect(page).not_to have_content(closed_iteration_in_cadence.title)
end
it 'only shows completed iterations on Done tab', :aggregate_failures do
visit group_iteration_cadences_path(group)
click_link 'Done'
click_button cadence.title
expect(page).not_to have_content(iteration_in_cadence.title)
expect(page).to have_content(closed_iteration_in_cadence.title)
end
it 'shows inherited cadences in subgroup', :aggregate_failures do
visit group_iteration_cadences_path(subgroup)
expect(page).to have_content(cadence.title)
expect(page).to have_content(other_cadence.title)
expect(page).to have_content(subgroup_cadence.title)
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