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.js41
1 files changed, 41 insertions, 0 deletions
diff --git a/spec/frontend/boards/mock_data.js b/spec/frontend/boards/mock_data.js
index 447aacd9cea..8235c3e4194 100644
--- a/spec/frontend/boards/mock_data.js
+++ b/spec/frontend/boards/mock_data.js
@@ -836,6 +836,7 @@ export const mockTokens = (fetchLabels, fetchUsers, fetchMilestones, isSignedIn)
type: TOKEN_TYPE_ASSIGNEE,
operators: OPERATORS_IS_NOT,
token: UserToken,
+ dataType: 'user',
unique: true,
fetchUsers,
preloadedUsers: [],
@@ -847,6 +848,7 @@ export const mockTokens = (fetchLabels, fetchUsers, fetchMilestones, isSignedIn)
operators: OPERATORS_IS_NOT,
symbol: '@',
token: UserToken,
+ dataType: 'user',
unique: true,
fetchUsers,
preloadedUsers: [],
@@ -1040,4 +1042,43 @@ export const destroyBoardListMutationResponse = {
},
};
+export const mockProjects = [
+ {
+ id: 'gid://gitlab/Project/1',
+ name: 'Gitlab Shell',
+ nameWithNamespace: 'Gitlab Org / Gitlab Shell',
+ fullPath: 'gitlab-org/gitlab-shell',
+ archived: false,
+ __typename: 'Project',
+ },
+ {
+ id: 'gid://gitlab/Project/2',
+ name: 'Gitlab Test',
+ nameWithNamespace: 'Gitlab Org / Gitlab Test',
+ fullPath: 'gitlab-org/gitlab-test',
+ archived: true,
+ __typename: 'Project',
+ },
+];
+
+export const mockGroupProjectsResponse = (projects = mockProjects) => ({
+ data: {
+ group: {
+ id: 'gid://gitlab/Group/1',
+ projects: {
+ nodes: projects,
+ pageInfo: {
+ hasNextPage: true,
+ hasPreviousPage: false,
+ startCursor: 'abc',
+ endCursor: 'bcd',
+ __typename: 'PageInfo',
+ },
+ __typename: 'ProjectConnection',
+ },
+ __typename: 'Group',
+ },
+ },
+});
+
export const DEFAULT_COLOR = '#1068bf';