Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/boards/mock_data.js')
-rw-r--r--spec/frontend/boards/mock_data.js44
1 files changed, 39 insertions, 5 deletions
diff --git a/spec/frontend/boards/mock_data.js b/spec/frontend/boards/mock_data.js
index ec3ae27b6a1..447aacd9cea 100644
--- a/spec/frontend/boards/mock_data.js
+++ b/spec/frontend/boards/mock_data.js
@@ -526,6 +526,27 @@ export const mockList = {
__typename: 'BoardList',
};
+export const labelsQueryResponse = {
+ data: {
+ project: {
+ id: 'gid://gitlab/Project/33',
+ labels: {
+ nodes: [
+ {
+ id: 'gid://gitlab/GroupLabel/121',
+ title: 'To Do',
+ color: '#F0AD4E',
+ textColor: '#FFFFFF',
+ description: null,
+ descriptionHtml: null,
+ },
+ ],
+ },
+ __typename: 'Project',
+ },
+ },
+};
+
export const mockLabelList = {
id: 'gid://gitlab/List/2',
title: 'To Do',
@@ -913,8 +934,8 @@ export const mockGroupLabelsResponse = {
export const boardListsQueryResponse = {
data: {
- group: {
- id: 'gid://gitlab/Group/1',
+ project: {
+ id: 'gid://gitlab/Project/1',
board: {
id: 'gid://gitlab/Board/1',
hideBacklogList: false,
@@ -922,7 +943,7 @@ export const boardListsQueryResponse = {
nodes: mockLists,
},
},
- __typename: 'Group',
+ __typename: 'Project',
},
},
};
@@ -943,11 +964,14 @@ export const issueBoardListsQueryResponse = {
},
};
-export const boardListQueryResponse = (issuesCount = 20) => ({
+export const boardListQueryResponse = ({
+ listId = 'gid://gitlab/List/5',
+ issuesCount = 20,
+} = {}) => ({
data: {
boardList: {
__typename: 'BoardList',
- id: 'gid://gitlab/BoardList/5',
+ id: listId,
totalWeight: 5,
issuesCount,
},
@@ -989,10 +1013,20 @@ export const updateEpicTitleResponse = {
},
};
+export const createBoardListResponse = {
+ data: {
+ boardListCreate: {
+ list: mockLabelList,
+ errors: [],
+ },
+ },
+};
+
export const updateBoardListResponse = {
data: {
updateBoardList: {
list: mockList,
+ errors: [],
},
},
};