diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-04 22:45:17 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-04 22:45:17 +0300 |
commit | 202d84e543578c3ab47295400a1b9b25bbb3bb67 (patch) | |
tree | bd5ed86968f1d93ea0e396c71735a1daac264c90 | |
parent | a761a28a03863e85b958f61700a2b9dddeb5e3bd (diff) |
Add latest changes from gitlab-org/gitlab@16-6-stable-ee
4 files changed, 41 insertions, 0 deletions
diff --git a/app/assets/javascripts/work_items/graphql/group_work_items.query.graphql b/app/assets/javascripts/work_items/graphql/group_work_items.query.graphql index 5332e21a0cb..bfee0452acd 100644 --- a/app/assets/javascripts/work_items/graphql/group_work_items.query.graphql +++ b/app/assets/javascripts/work_items/graphql/group_work_items.query.graphql @@ -11,6 +11,7 @@ query groupWorkItems( id iid title + confidential } } } diff --git a/app/assets/javascripts/work_items/graphql/project_work_items.query.graphql b/app/assets/javascripts/work_items/graphql/project_work_items.query.graphql index 3aeaaa1116a..7efd67467e5 100644 --- a/app/assets/javascripts/work_items/graphql/project_work_items.query.graphql +++ b/app/assets/javascripts/work_items/graphql/project_work_items.query.graphql @@ -13,6 +13,7 @@ query projectWorkItems( id iid title + confidential } } workItemsByIid: workItems(iid: $iid, types: $types) @include(if: $isNumber) { @@ -20,6 +21,7 @@ query projectWorkItems( id iid title + confidential } } } diff --git a/spec/features/projects/work_items/work_item_children_spec.rb b/spec/features/projects/work_items/work_item_children_spec.rb index 752ea282fbf..0970752157d 100644 --- a/spec/features/projects/work_items/work_item_children_spec.rb +++ b/spec/features/projects/work_items/work_item_children_spec.rb @@ -133,6 +133,33 @@ RSpec.describe 'Work item children', :js, feature_category: :team_planning do expect(find('[data-testid="links-child"]')).to have_content(task.title) end end + + context 'with confidential issue' do + let_it_be_with_reload(:issue) { create(:issue, :confidential, project: project) } + let_it_be(:task) { create(:work_item, :confidential, :task, project: project) } + + it 'adds an existing child task', :aggregate_failures do + page.within('[data-testid="work-item-links"]') do + click_button 'Add' + click_button 'Existing task' + + expect(page).to have_button('Add task', disabled: true) + find('[data-testid="work-item-token-select-input"]').set(task.title) + wait_for_all_requests + click_button task.title + + expect(page).to have_button('Add task', disabled: false) + + send_keys :escape + + click_button('Add task') + + wait_for_all_requests + + expect(find('[data-testid="links-child"]')).to have_content(task.title) + end + end + end end context 'in work item metadata' do diff --git a/spec/frontend/work_items/mock_data.js b/spec/frontend/work_items/mock_data.js index 41e8a01de36..8df46403b90 100644 --- a/spec/frontend/work_items/mock_data.js +++ b/spec/frontend/work_items/mock_data.js @@ -1600,18 +1600,21 @@ export const availableWorkItemsResponse = { id: 'gid://gitlab/WorkItem/458', iid: '2', title: 'Task 1', + confidential: false, __typename: 'WorkItem', }, { id: 'gid://gitlab/WorkItem/459', iid: '3', title: 'Task 2', + confidential: false, __typename: 'WorkItem', }, { id: 'gid://gitlab/WorkItem/460', iid: '4', title: 'Task 3', + confidential: false, __typename: 'WorkItem', }, ], @@ -1631,18 +1634,21 @@ export const availableObjectivesResponse = { id: 'gid://gitlab/WorkItem/716', iid: '122', title: 'Objective 101', + confidential: false, __typename: 'WorkItem', }, { id: 'gid://gitlab/WorkItem/712', iid: '118', title: 'Objective 103', + confidential: false, __typename: 'WorkItem', }, { id: 'gid://gitlab/WorkItem/711', iid: '117', title: 'Objective 102', + confidential: false, __typename: 'WorkItem', }, ], @@ -1662,6 +1668,7 @@ export const searchedObjectiveResponse = { id: 'gid://gitlab/WorkItem/716', iid: '122', title: 'Objective 101', + confidential: false, __typename: 'WorkItem', }, ], @@ -1681,6 +1688,7 @@ export const searchWorkItemsTextResponse = { id: 'gid://gitlab/WorkItem/459', iid: '3', title: 'Task 2', + confidential: false, __typename: 'WorkItem', }, ], @@ -1703,6 +1711,7 @@ export const searchWorkItemsIidResponse = { id: 'gid://gitlab/WorkItem/460', iid: '101', title: 'Task 3', + confidential: false, __typename: 'WorkItem', }, ], @@ -1722,6 +1731,7 @@ export const searchWorkItemsTextIidResponse = { id: 'gid://gitlab/WorkItem/459', iid: '3', title: 'Task 123', + confidential: false, __typename: 'WorkItem', }, ], @@ -1732,6 +1742,7 @@ export const searchWorkItemsTextIidResponse = { id: 'gid://gitlab/WorkItem/460', iid: '123', title: 'Task 2', + confidential: false, __typename: 'WorkItem', }, ], |