diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-19 14:01:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-19 14:01:45 +0300 |
commit | 9297025d0b7ddf095eb618dfaaab2ff8f2018d8b (patch) | |
tree | 865198c01d1824a9b098127baa3ab980c9cd2c06 /spec/frontend/boards/mock_data.js | |
parent | 6372471f43ee03c05a7c1f8b0c6ac6b8a7431dbe (diff) |
Add latest changes from gitlab-org/gitlab@16-7-stable-eev16.7.0-rc42
Diffstat (limited to 'spec/frontend/boards/mock_data.js')
-rw-r--r-- | spec/frontend/boards/mock_data.js | 71 |
1 files changed, 50 insertions, 21 deletions
diff --git a/spec/frontend/boards/mock_data.js b/spec/frontend/boards/mock_data.js index 0be17db9450..3a5e108ac07 100644 --- a/spec/frontend/boards/mock_data.js +++ b/spec/frontend/boards/mock_data.js @@ -275,6 +275,7 @@ export const labels = [ ]; export const mockIssueFullPath = 'gitlab-org/test-subgroup/gitlab-test'; +export const mockIssueDirectNamespace = 'gitlab-test'; export const mockEpicFullPath = 'gitlab-org/test-subgroup'; export const rawIssue = { @@ -331,15 +332,17 @@ export const mockIssue = { confidential: false, referencePath: `${mockIssueFullPath}#27`, path: `/${mockIssueFullPath}/-/issues/27`, - assignees, - labels: [ - { - id: 1, - title: 'test', - color: '#F0AD4E', - description: 'testing', - }, - ], + assignees: { nodes: assignees }, + labels: { + nodes: [ + { + id: 1, + title: 'test', + color: '#F0AD4E', + description: 'testing', + }, + ], + }, epic: { id: 'gid://gitlab/Epic/41', }, @@ -411,6 +414,7 @@ export const mockActiveIssue = { }; export const mockIssue2 = { + ...rawIssue, id: 'gid://gitlab/Issue/437', iid: 28, title: 'Issue 2', @@ -420,14 +424,13 @@ export const mockIssue2 = { confidential: false, referencePath: 'gitlab-org/test-subgroup/gitlab-test#28', path: '/gitlab-org/test-subgroup/gitlab-test/-/issues/28', - assignees, - labels, epic: { id: 'gid://gitlab/Epic/40', }, }; export const mockIssue3 = { + ...rawIssue, id: 'gid://gitlab/Issue/438', iid: 29, title: 'Issue 3', @@ -436,12 +439,11 @@ export const mockIssue3 = { timeEstimate: 0, confidential: false, path: '/gitlab-org/gitlab-test/-/issues/28', - assignees, - labels, epic: null, }; export const mockIssue4 = { + ...rawIssue, id: 'gid://gitlab/Issue/439', iid: 30, title: 'Issue 4', @@ -450,12 +452,11 @@ export const mockIssue4 = { timeEstimate: 0, confidential: false, path: '/gitlab-org/gitlab-test/-/issues/28', - assignees, - labels, epic: null, }; export const mockIssue5 = { + ...rawIssue, id: 'gid://gitlab/Issue/440', iid: 40, title: 'Issue 5', @@ -464,12 +465,11 @@ export const mockIssue5 = { timeEstimate: 0, confidential: false, path: '/gitlab-org/gitlab-test/-/issues/40', - assignees, - labels, epic: null, }; export const mockIssue6 = { + ...rawIssue, id: 'gid://gitlab/Issue/441', iid: 41, title: 'Issue 6', @@ -478,12 +478,11 @@ export const mockIssue6 = { timeEstimate: 0, confidential: false, path: '/gitlab-org/gitlab-test/-/issues/41', - assignees, - labels, epic: null, }; export const mockIssue7 = { + ...rawIssue, id: 'gid://gitlab/Issue/442', iid: 42, title: 'Issue 6', @@ -492,8 +491,6 @@ export const mockIssue7 = { timeEstimate: 0, confidential: false, path: '/gitlab-org/gitlab-test/-/issues/42', - assignees, - labels, epic: null, }; @@ -1085,4 +1082,36 @@ export const mockGroupProjectsResponse = (projects = mockProjects) => ({ }, }); +export const mockGroupIssuesResponse = ( + listId = 'gid://gitlab/List/1', + rawIssues = [rawIssue], +) => ({ + data: { + group: { + id: 'gid://gitlab/Group/1', + board: { + __typename: 'Board', + id: 'gid://gitlab/Board/1', + lists: { + nodes: [ + { + id: listId, + listType: 'backlog', + issues: { + nodes: rawIssues, + pageInfo: { + endCursor: null, + hasNextPage: true, + }, + }, + __typename: 'BoardList', + }, + ], + }, + }, + __typename: 'Group', + }, + }, +}); + export const DEFAULT_COLOR = '#1068bf'; |