2022-08-13 15:12:31 +05:30
export const mockAssignees = [
{
_ _typename : 'UserCore' ,
id : 'gid://gitlab/User/1' ,
avatarUrl : '' ,
webUrl : '' ,
name : 'John Doe' ,
username : 'doe_I' ,
} ,
{
_ _typename : 'UserCore' ,
id : 'gid://gitlab/User/2' ,
avatarUrl : '' ,
webUrl : '' ,
name : 'Marcus Rutherford' ,
username : 'ruthfull' ,
} ,
] ;
2022-11-25 23:54:43 +05:30
export const mockLabels = [
{
_ _typename : 'Label' ,
id : 'gid://gitlab/Label/1' ,
title : 'Label 1' ,
description : '' ,
color : '#f00' ,
textColor : '#00f' ,
} ,
{
_ _typename : 'Label' ,
id : 'gid://gitlab/Label/2' ,
title : 'Label::2' ,
description : '' ,
color : '#b00' ,
textColor : '#00b' ,
} ,
] ;
2023-03-04 22:38:38 +05:30
export const mockMilestone = {
_ _typename : 'Milestone' ,
id : 'gid://gitlab/Milestone/30' ,
title : 'v4.0' ,
state : 'active' ,
expired : false ,
startDate : '2022-10-17' ,
dueDate : '2022-10-24' ,
} ;
2021-12-11 22:18:48 +05:30
export const workItemQueryResponse = {
2022-06-21 17:19:12 +05:30
data : {
workItem : {
_ _typename : 'WorkItem' ,
id : 'gid://gitlab/WorkItem/1' ,
2023-01-13 00:05:48 +05:30
iid : '1' ,
2022-06-21 17:19:12 +05:30
title : 'Test' ,
2022-07-16 23:28:13 +05:30
state : 'OPEN' ,
description : 'description' ,
2022-08-27 11:52:29 +05:30
confidential : false ,
createdAt : '2022-08-03T12:41:54Z' ,
2023-04-23 21:23:45 +05:30
updatedAt : null ,
2022-08-27 11:52:29 +05:30
closedAt : null ,
2023-04-23 21:23:45 +05:30
author : {
avatarUrl : 'http://127.0.0.1:3000/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon' ,
id : 'gid://gitlab/User/1' ,
name : 'Administrator' ,
username : 'root' ,
webUrl : 'http://127.0.0.1:3000/root' ,
_ _typename : 'UserCore' ,
} ,
2022-10-11 01:57:18 +05:30
project : {
_ _typename : 'Project' ,
id : '1' ,
fullPath : 'test-project-path' ,
2023-03-17 16:20:25 +05:30
archived : false ,
2022-10-11 01:57:18 +05:30
} ,
2022-06-21 17:19:12 +05:30
workItemType : {
_ _typename : 'WorkItemType' ,
id : 'gid://gitlab/WorkItems::Type/5' ,
name : 'Task' ,
2022-08-27 11:52:29 +05:30
iconName : 'issue-type-task' ,
2022-06-21 17:19:12 +05:30
} ,
2022-07-16 23:28:13 +05:30
userPermissions : {
deleteWorkItem : false ,
updateWorkItem : false ,
} ,
2022-07-23 23:45:48 +05:30
widgets : [
{
_ _typename : 'WorkItemWidgetDescription' ,
type : 'DESCRIPTION' ,
description : 'some **great** text' ,
descriptionHtml :
'<p data-sourcepos="1:1-1:19" dir="auto">some <strong>great</strong> text</p>' ,
2022-11-25 23:54:43 +05:30
lastEditedAt : null ,
lastEditedBy : null ,
2022-07-23 23:45:48 +05:30
} ,
2022-08-13 15:12:31 +05:30
{
_ _typename : 'WorkItemWidgetAssignees' ,
type : 'ASSIGNEES' ,
allowsMultipleAssignees : true ,
2022-08-27 11:52:29 +05:30
canInviteMembers : true ,
2022-08-13 15:12:31 +05:30
assignees : {
nodes : mockAssignees ,
} ,
} ,
{
_ _typename : 'WorkItemWidgetHierarchy' ,
type : 'HIERARCHY' ,
2023-03-04 22:38:38 +05:30
hasChildren : true ,
2022-08-13 15:12:31 +05:30
parent : {
id : 'gid://gitlab/Issue/1' ,
iid : '5' ,
title : 'Parent title' ,
2022-08-27 11:52:29 +05:30
confidential : false ,
2023-03-04 22:38:38 +05:30
webUrl : 'http://gdk.test/gitlab-org/gitlab/-/issues/1' ,
workItemType : {
id : 'gid://gitlab/WorkItems::Type/1' ,
name : 'Issue' ,
iconName : 'issue-type-issue' ,
} ,
2022-08-13 15:12:31 +05:30
} ,
children : {
2022-08-27 11:52:29 +05:30
nodes : [
2022-08-13 15:12:31 +05:30
{
2022-08-27 11:52:29 +05:30
id : 'gid://gitlab/WorkItem/444' ,
2023-04-23 21:23:45 +05:30
iid : '4' ,
2022-08-27 11:52:29 +05:30
createdAt : '2022-08-03T12:41:54Z' ,
closedAt : null ,
2023-03-04 22:38:38 +05:30
confidential : false ,
title : '123' ,
state : 'OPEN' ,
workItemType : {
id : '1' ,
name : 'Task' ,
iconName : 'issue-type-task' ,
} ,
widgets : [
{
type : 'HIERARCHY' ,
hasChildren : false ,
} ,
] ,
2022-08-13 15:12:31 +05:30
} ,
] ,
} ,
} ,
2022-07-23 23:45:48 +05:30
] ,
2021-12-11 22:18:48 +05:30
} ,
} ,
} ;
2022-01-26 12:08:38 +05:30
export const updateWorkItemMutationResponse = {
2022-05-07 20:08:51 +05:30
data : {
workItemUpdate : {
2022-06-21 17:19:12 +05:30
_ _typename : 'WorkItemUpdatePayload' ,
2022-08-27 11:52:29 +05:30
errors : [ ] ,
2022-05-07 20:08:51 +05:30
workItem : {
2022-06-21 17:19:12 +05:30
_ _typename : 'WorkItem' ,
id : 'gid://gitlab/WorkItem/1' ,
2023-01-13 00:05:48 +05:30
iid : '1' ,
2022-05-07 20:08:51 +05:30
title : 'Updated title' ,
2022-07-16 23:28:13 +05:30
state : 'OPEN' ,
description : 'description' ,
2022-08-27 11:52:29 +05:30
confidential : false ,
createdAt : '2022-08-03T12:41:54Z' ,
2023-04-23 21:23:45 +05:30
updatedAt : '2022-08-08T12:41:54Z' ,
2022-08-27 11:52:29 +05:30
closedAt : null ,
2023-04-23 21:23:45 +05:30
author : {
... mockAssignees [ 0 ] ,
} ,
2022-10-11 01:57:18 +05:30
project : {
_ _typename : 'Project' ,
id : '1' ,
fullPath : 'test-project-path' ,
2023-03-17 16:20:25 +05:30
archived : false ,
2022-10-11 01:57:18 +05:30
} ,
2022-05-07 20:08:51 +05:30
workItemType : {
_ _typename : 'WorkItemType' ,
2022-06-21 17:19:12 +05:30
id : 'gid://gitlab/WorkItems::Type/5' ,
name : 'Task' ,
2022-08-27 11:52:29 +05:30
iconName : 'issue-type-task' ,
2022-05-07 20:08:51 +05:30
} ,
2022-07-16 23:28:13 +05:30
userPermissions : {
deleteWorkItem : false ,
updateWorkItem : false ,
} ,
2022-08-13 15:12:31 +05:30
widgets : [
{
2023-03-04 22:38:38 +05:30
type : 'HIERARCHY' ,
2022-08-13 15:12:31 +05:30
children : {
2022-08-27 11:52:29 +05:30
nodes : [
2022-08-13 15:12:31 +05:30
{
2022-08-27 11:52:29 +05:30
id : 'gid://gitlab/WorkItem/444' ,
2023-04-23 21:23:45 +05:30
iid : '4' ,
2023-03-04 22:38:38 +05:30
createdAt : '2022-08-03T12:41:54Z' ,
closedAt : null ,
confidential : false ,
title : '123' ,
state : 'OPEN' ,
workItemType : {
id : '1' ,
name : 'Task' ,
iconName : 'issue-type-task' ,
} ,
2022-08-13 15:12:31 +05:30
} ,
] ,
} ,
2023-03-04 22:38:38 +05:30
_ _typename : 'WorkItemConnection' ,
2022-08-13 15:12:31 +05:30
} ,
2022-08-27 11:52:29 +05:30
{
_ _typename : 'WorkItemWidgetAssignees' ,
type : 'ASSIGNEES' ,
allowsMultipleAssignees : true ,
canInviteMembers : true ,
assignees : {
nodes : [ mockAssignees [ 0 ] ] ,
} ,
} ,
2023-04-23 21:23:45 +05:30
{
_ _typename : 'WorkItemWidgetLabels' ,
type : 'LABELS' ,
allowsScopedLabels : false ,
labels : {
nodes : mockLabels ,
} ,
} ,
2022-08-13 15:12:31 +05:30
] ,
2022-05-07 20:08:51 +05:30
} ,
2022-01-26 12:08:38 +05:30
} ,
} ,
} ;
2022-04-04 11:22:00 +05:30
2022-10-11 01:57:18 +05:30
export const updateWorkItemMutationErrorResponse = {
data : {
workItemUpdate : {
_ _typename : 'WorkItemUpdatePayload' ,
errors : [ 'Error!' ] ,
workItem : { } ,
} ,
} ,
} ;
2022-08-27 11:52:29 +05:30
export const mockParent = {
parent : {
id : 'gid://gitlab/Issue/1' ,
iid : '5' ,
title : 'Parent title' ,
confidential : false ,
2023-03-04 22:38:38 +05:30
webUrl : 'http://gdk.test/gitlab-org/gitlab/-/issues/1' ,
workItemType : {
id : 'gid://gitlab/WorkItems::Type/1' ,
name : 'Issue' ,
iconName : 'issue-type-issue' ,
} ,
2022-08-27 11:52:29 +05:30
} ,
} ;
2023-01-13 00:05:48 +05:30
export const descriptionTextWithCheckboxes = ` - [ ] todo 1 \n - [ ] todo 2 ` ;
export const descriptionHtmlWithCheckboxes = `
< ul dir = "auto" class = "task-list" data - sourcepos "1:1-2:12" >
< li class = "task-list-item" data - sourcepos = "1:1-1:11" >
< input class = "task-list-item-checkbox" type = "checkbox" > todo 1
< / l i >
< li class = "task-list-item" data - sourcepos = "2:1-2:12" >
< input class = "task-list-item-checkbox" type = "checkbox" > todo 2
< / l i >
< / u l >
` ;
2023-03-04 22:38:38 +05:30
const taskType = {
_ _typename : 'WorkItemType' ,
id : 'gid://gitlab/WorkItems::Type/5' ,
name : 'Task' ,
iconName : 'issue-type-task' ,
} ;
export const objectiveType = {
_ _typename : 'WorkItemType' ,
id : 'gid://gitlab/WorkItems::Type/2411' ,
name : 'Objective' ,
iconName : 'issue-type-objective' ,
} ;
2022-08-13 15:12:31 +05:30
export const workItemResponseFactory = ( {
canUpdate = false ,
2022-08-27 11:52:29 +05:30
canDelete = false ,
2022-08-13 15:12:31 +05:30
allowsMultipleAssignees = true ,
assigneesWidgetPresent = true ,
2022-10-11 01:57:18 +05:30
datesWidgetPresent = true ,
2022-08-27 11:52:29 +05:30
weightWidgetPresent = true ,
2023-03-04 22:38:38 +05:30
progressWidgetPresent = true ,
2022-11-25 23:54:43 +05:30
milestoneWidgetPresent = true ,
iterationWidgetPresent = true ,
2023-03-04 22:38:38 +05:30
healthStatusWidgetPresent = true ,
2023-03-17 16:20:25 +05:30
notesWidgetPresent = true ,
2022-08-27 11:52:29 +05:30
confidential = false ,
canInviteMembers = false ,
2023-04-23 21:23:45 +05:30
labelsWidgetPresent = true ,
labels = mockLabels ,
2022-11-25 23:54:43 +05:30
allowsScopedLabels = false ,
lastEditedAt = null ,
lastEditedBy = null ,
2023-01-13 00:05:48 +05:30
withCheckboxes = false ,
2022-08-27 11:52:29 +05:30
parent = mockParent . parent ,
2023-03-04 22:38:38 +05:30
workItemType = taskType ,
2023-04-23 21:23:45 +05:30
author = mockAssignees [ 0 ] ,
createdAt = '2022-08-03T12:41:54Z' ,
updatedAt = '2022-08-08T12:32:54Z' ,
2022-08-13 15:12:31 +05:30
} = { } ) => ( {
2022-07-23 23:45:48 +05:30
data : {
workItem : {
_ _typename : 'WorkItem' ,
id : 'gid://gitlab/WorkItem/1' ,
2023-01-13 00:05:48 +05:30
iid : 1 ,
2022-07-23 23:45:48 +05:30
title : 'Updated title' ,
state : 'OPEN' ,
description : 'description' ,
2022-08-27 11:52:29 +05:30
confidential ,
2023-04-23 21:23:45 +05:30
createdAt ,
updatedAt ,
2022-08-27 11:52:29 +05:30
closedAt : null ,
2023-04-23 21:23:45 +05:30
author ,
2022-10-11 01:57:18 +05:30
project : {
_ _typename : 'Project' ,
id : '1' ,
fullPath : 'test-project-path' ,
2023-03-17 16:20:25 +05:30
archived : false ,
2022-10-11 01:57:18 +05:30
} ,
2023-03-04 22:38:38 +05:30
workItemType ,
2022-07-23 23:45:48 +05:30
userPermissions : {
2022-08-27 11:52:29 +05:30
deleteWorkItem : canDelete ,
2022-07-23 23:45:48 +05:30
updateWorkItem : canUpdate ,
} ,
widgets : [
{
_ _typename : 'WorkItemWidgetDescription' ,
type : 'DESCRIPTION' ,
2023-01-13 00:05:48 +05:30
description : withCheckboxes ? descriptionTextWithCheckboxes : 'some **great** text' ,
descriptionHtml : withCheckboxes
? descriptionHtmlWithCheckboxes
: '<p data-sourcepos="1:1-1:19" dir="auto">some <strong>great</strong> text</p>' ,
2022-11-25 23:54:43 +05:30
lastEditedAt ,
lastEditedBy ,
2022-07-23 23:45:48 +05:30
} ,
2022-08-13 15:12:31 +05:30
assigneesWidgetPresent
? {
_ _typename : 'WorkItemWidgetAssignees' ,
type : 'ASSIGNEES' ,
allowsMultipleAssignees ,
2022-08-27 11:52:29 +05:30
canInviteMembers ,
2022-08-13 15:12:31 +05:30
assignees : {
nodes : mockAssignees ,
} ,
}
: { type : 'MOCK TYPE' } ,
2022-11-25 23:54:43 +05:30
labelsWidgetPresent
? {
_ _typename : 'WorkItemWidgetLabels' ,
type : 'LABELS' ,
allowsScopedLabels ,
labels : {
2023-04-23 21:23:45 +05:30
nodes : labels ,
2022-11-25 23:54:43 +05:30
} ,
}
: { type : 'MOCK TYPE' } ,
2022-10-11 01:57:18 +05:30
datesWidgetPresent
? {
_ _typename : 'WorkItemWidgetStartAndDueDate' ,
type : 'START_AND_DUE_DATE' ,
dueDate : '2022-12-31' ,
startDate : '2022-01-01' ,
}
: { type : 'MOCK TYPE' } ,
2022-08-27 11:52:29 +05:30
weightWidgetPresent
? {
_ _typename : 'WorkItemWidgetWeight' ,
type : 'WEIGHT' ,
weight : 0 ,
}
: { type : 'MOCK TYPE' } ,
2022-11-25 23:54:43 +05:30
iterationWidgetPresent
? {
_ _typename : 'WorkItemWidgetIteration' ,
type : 'ITERATION' ,
iteration : {
description : null ,
id : 'gid://gitlab/Iteration/1215' ,
iid : '182' ,
title : 'Iteration default title' ,
startDate : '2022-09-22' ,
dueDate : '2022-09-30' ,
} ,
}
: { type : 'MOCK TYPE' } ,
2023-03-04 22:38:38 +05:30
progressWidgetPresent
? {
_ _typename : 'WorkItemWidgetProgress' ,
type : 'PROGRESS' ,
progress : 0 ,
}
: { type : 'MOCK TYPE' } ,
2022-11-25 23:54:43 +05:30
milestoneWidgetPresent
? {
_ _typename : 'WorkItemWidgetMilestone' ,
type : 'MILESTONE' ,
2023-03-04 22:38:38 +05:30
milestone : mockMilestone ,
}
: { type : 'MOCK TYPE' } ,
healthStatusWidgetPresent
? {
_ _typename : 'WorkItemWidgetHealthStatus' ,
type : 'HEALTH_STATUS' ,
healthStatus : 'onTrack' ,
2022-11-25 23:54:43 +05:30
}
: { type : 'MOCK TYPE' } ,
2023-03-17 16:20:25 +05:30
notesWidgetPresent
? {
_ _typename : 'WorkItemWidgetNotes' ,
type : 'NOTES' ,
discussions : {
pageInfo : {
hasNextPage : true ,
hasPreviousPage : false ,
startCursor : null ,
endCursor :
'eyJjcmVhdGVkX2F0IjoiMjAyMi0xMS0xNCAwNDoxOTowMC4wOTkxMTcwMDAgKzAwMDAiLCJpZCI6IjQyNyIsIl9rZCI6Im4ifQ==' ,
_ _typename : 'PageInfo' ,
} ,
nodes : [ ] ,
} ,
}
: { type : 'MOCK TYPE' } ,
2022-08-13 15:12:31 +05:30
{
_ _typename : 'WorkItemWidgetHierarchy' ,
type : 'HIERARCHY' ,
2023-03-04 22:38:38 +05:30
hasChildren : true ,
2022-08-13 15:12:31 +05:30
children : {
2022-08-27 11:52:29 +05:30
nodes : [
2022-08-13 15:12:31 +05:30
{
2022-08-27 11:52:29 +05:30
id : 'gid://gitlab/WorkItem/444' ,
2023-04-23 21:23:45 +05:30
iid : '5' ,
2022-08-27 11:52:29 +05:30
createdAt : '2022-08-03T12:41:54Z' ,
closedAt : null ,
2023-03-04 22:38:38 +05:30
confidential : false ,
title : '123' ,
state : 'OPEN' ,
workItemType : {
id : '1' ,
name : 'Task' ,
iconName : 'issue-type-task' ,
} ,
widgets : [
{
type : 'HIERARCHY' ,
hasChildren : false ,
} ,
] ,
2022-08-13 15:12:31 +05:30
} ,
] ,
} ,
parent ,
} ,
2023-03-17 16:20:25 +05:30
notesWidgetPresent
? {
_ _typename : 'WorkItemWidgetNotes' ,
type : 'NOTES' ,
}
: { type : 'MOCK TYPE' } ,
2022-07-23 23:45:48 +05:30
] ,
} ,
} ,
} ) ;
2023-04-23 21:23:45 +05:30
export const getIssueDetailsResponse = ( { confidential = false } = { } ) => ( {
data : {
workspace : {
id : 'gid://gitlab/Project/1' ,
issuable : {
id : 'gid://gitlab/Issue/4' ,
confidential ,
iteration : {
id : 'gid://gitlab/Iteration/1124' ,
_ _typename : 'Iteration' ,
} ,
milestone : {
id : 'gid://gitlab/Milestone/28' ,
_ _typename : 'Milestone' ,
} ,
_ _typename : 'Issue' ,
} ,
_ _typename : 'Project' ,
} ,
} ,
} ) ;
2022-04-04 11:22:00 +05:30
export const projectWorkItemTypesQueryResponse = {
data : {
workspace : {
2023-01-13 00:05:48 +05:30
_ _typename : 'Project' ,
id : 'gid://gitlab/Project/2' ,
2022-04-04 11:22:00 +05:30
workItemTypes : {
nodes : [
2022-06-21 17:19:12 +05:30
{ id : 'gid://gitlab/WorkItems::Type/1' , name : 'Issue' } ,
{ id : 'gid://gitlab/WorkItems::Type/2' , name : 'Incident' } ,
2022-07-16 23:28:13 +05:30
{ id : 'gid://gitlab/WorkItems::Type/3' , name : 'Task' } ,
2022-04-04 11:22:00 +05:30
] ,
} ,
} ,
} ,
} ;
2022-05-07 20:08:51 +05:30
export const createWorkItemMutationResponse = {
data : {
workItemCreate : {
_ _typename : 'WorkItemCreatePayload' ,
workItem : {
_ _typename : 'WorkItem' ,
2022-06-21 17:19:12 +05:30
id : 'gid://gitlab/WorkItem/1' ,
2023-01-13 00:05:48 +05:30
iid : '1' ,
2022-05-07 20:08:51 +05:30
title : 'Updated title' ,
2022-07-16 23:28:13 +05:30
state : 'OPEN' ,
description : 'description' ,
2022-08-27 11:52:29 +05:30
confidential : false ,
createdAt : '2022-08-03T12:41:54Z' ,
2023-04-23 21:23:45 +05:30
updatedAt : null ,
2022-08-27 11:52:29 +05:30
closedAt : null ,
2023-04-23 21:23:45 +05:30
author : {
... mockAssignees [ 0 ] ,
} ,
2022-10-11 01:57:18 +05:30
project : {
_ _typename : 'Project' ,
id : '1' ,
fullPath : 'test-project-path' ,
2023-03-17 16:20:25 +05:30
archived : false ,
2022-10-11 01:57:18 +05:30
} ,
2022-05-07 20:08:51 +05:30
workItemType : {
_ _typename : 'WorkItemType' ,
2022-06-21 17:19:12 +05:30
id : 'gid://gitlab/WorkItems::Type/5' ,
name : 'Task' ,
2022-08-27 11:52:29 +05:30
iconName : 'issue-type-task' ,
2022-05-07 20:08:51 +05:30
} ,
2022-07-16 23:28:13 +05:30
userPermissions : {
deleteWorkItem : false ,
updateWorkItem : false ,
} ,
2022-07-23 23:45:48 +05:30
widgets : [ ] ,
2022-05-07 20:08:51 +05:30
} ,
2022-08-27 11:52:29 +05:30
errors : [ ] ,
2022-05-07 20:08:51 +05:30
} ,
} ,
} ;
2022-06-21 17:19:12 +05:30
2023-04-23 21:23:45 +05:30
export const createWorkItemMutationErrorResponse = {
data : {
workItemCreate : {
_ _typename : 'WorkItemCreatePayload' ,
workItem : null ,
errors : [ 'an error' ] ,
} ,
} ,
} ;
2022-06-21 17:19:12 +05:30
export const createWorkItemFromTaskMutationResponse = {
data : {
workItemCreateFromTask : {
_ _typename : 'WorkItemCreateFromTaskPayload' ,
errors : [ ] ,
workItem : {
_ _typename : 'WorkItem' ,
2022-08-13 15:12:31 +05:30
description : 'New description' ,
id : 'gid://gitlab/WorkItem/1' ,
2023-01-13 00:05:48 +05:30
iid : '1' ,
2022-08-13 15:12:31 +05:30
title : 'Updated title' ,
state : 'OPEN' ,
2022-08-27 11:52:29 +05:30
confidential : false ,
createdAt : '2022-08-03T12:41:54Z' ,
closedAt : null ,
2022-10-11 01:57:18 +05:30
project : {
_ _typename : 'Project' ,
id : '1' ,
fullPath : 'test-project-path' ,
2023-03-17 16:20:25 +05:30
archived : false ,
2022-10-11 01:57:18 +05:30
} ,
2022-08-13 15:12:31 +05:30
workItemType : {
_ _typename : 'WorkItemType' ,
id : 'gid://gitlab/WorkItems::Type/5' ,
name : 'Task' ,
2022-08-27 11:52:29 +05:30
iconName : 'issue-type-task' ,
2022-08-13 15:12:31 +05:30
} ,
2022-07-16 23:28:13 +05:30
userPermissions : {
deleteWorkItem : false ,
updateWorkItem : false ,
} ,
2022-08-13 15:12:31 +05:30
widgets : [
{
_ _typename : 'WorkItemWidgetDescription' ,
type : 'DESCRIPTION' ,
description : 'New description' ,
descriptionHtml : '<p>New description</p>' ,
2022-11-25 23:54:43 +05:30
lastEditedAt : '2022-09-21T06:18:42Z' ,
lastEditedBy : {
name : 'Administrator' ,
webPath : '/root' ,
} ,
2022-08-13 15:12:31 +05:30
} ,
] ,
} ,
newWorkItem : {
_ _typename : 'WorkItem' ,
id : 'gid://gitlab/WorkItem/1000000' ,
2023-01-13 00:05:48 +05:30
iid : '100' ,
2022-08-13 15:12:31 +05:30
title : 'Updated title' ,
state : 'OPEN' ,
2022-08-27 11:52:29 +05:30
createdAt : '2022-08-03T12:41:54Z' ,
closedAt : null ,
2022-08-13 15:12:31 +05:30
description : '' ,
2022-08-27 11:52:29 +05:30
confidential : false ,
2022-10-11 01:57:18 +05:30
project : {
_ _typename : 'Project' ,
id : '1' ,
fullPath : 'test-project-path' ,
2023-03-17 16:20:25 +05:30
archived : false ,
2022-10-11 01:57:18 +05:30
} ,
2022-08-13 15:12:31 +05:30
workItemType : {
_ _typename : 'WorkItemType' ,
id : 'gid://gitlab/WorkItems::Type/5' ,
name : 'Task' ,
2022-08-27 11:52:29 +05:30
iconName : 'issue-type-task' ,
2022-08-13 15:12:31 +05:30
} ,
userPermissions : {
deleteWorkItem : false ,
updateWorkItem : false ,
} ,
widgets : [ ] ,
2022-06-21 17:19:12 +05:30
} ,
} ,
} ,
} ;
export const deleteWorkItemResponse = {
data : { workItemDelete : { errors : [ ] , _ _typename : 'WorkItemDeletePayload' } } ,
} ;
export const deleteWorkItemFailureResponse = {
data : { workItemDelete : null } ,
errors : [
{
message :
"The resource that you are attempting to access does not exist or you don't have permission to perform this action" ,
locations : [ { line : 2 , column : 3 } ] ,
path : [ 'workItemDelete' ] ,
} ,
] ,
} ;
2022-08-27 11:52:29 +05:30
export const deleteWorkItemMutationErrorResponse = {
data : {
workItemDelete : {
errors : [ 'Error' ] ,
} ,
} ,
} ;
export const deleteWorkItemFromTaskMutationResponse = {
data : {
workItemDeleteTask : {
workItem : { id : 123 , descriptionHtml : 'updated work item desc' } ,
errors : [ ] ,
} ,
} ,
} ;
export const deleteWorkItemFromTaskMutationErrorResponse = {
data : {
workItemDeleteTask : {
workItem : { id : 123 , descriptionHtml : 'updated work item desc' } ,
errors : [ 'Error' ] ,
} ,
} ,
} ;
2022-10-11 01:57:18 +05:30
export const workItemDatesSubscriptionResponse = {
data : {
issuableDatesUpdated : {
id : 'gid://gitlab/WorkItem/1' ,
widgets : [
{
_ _typename : 'WorkItemWidgetStartAndDueDate' ,
dueDate : '2022-12-31' ,
startDate : '2022-01-01' ,
} ,
] ,
} ,
} ,
} ;
2022-06-21 17:19:12 +05:30
export const workItemTitleSubscriptionResponse = {
data : {
issuableTitleUpdated : {
id : 'gid://gitlab/WorkItem/1' ,
title : 'new title' ,
} ,
} ,
} ;
2022-07-23 23:45:48 +05:30
2023-01-13 00:05:48 +05:30
export const workItemDescriptionSubscriptionResponse = {
data : {
issuableDescriptionUpdated : {
id : 'gid://gitlab/WorkItem/1' ,
widgets : [
{
_ _typename : 'WorkItemWidgetDescription' ,
type : 'DESCRIPTION' ,
description : 'New description' ,
descriptionHtml : '<p>New description</p>' ,
lastEditedAt : '2022-09-21T06:18:42Z' ,
lastEditedBy : {
id : 'gid://gitlab/User/2' ,
name : 'Someone else' ,
webPath : '/not-you' ,
} ,
} ,
] ,
} ,
} ,
} ;
2022-10-11 01:57:18 +05:30
export const workItemWeightSubscriptionResponse = {
data : {
issuableWeightUpdated : {
id : 'gid://gitlab/WorkItem/1' ,
widgets : [
{
_ _typename : 'WorkItemWidgetWeight' ,
weight : 1 ,
} ,
] ,
} ,
} ,
} ;
2022-11-25 23:54:43 +05:30
export const workItemAssigneesSubscriptionResponse = {
data : {
issuableAssigneesUpdated : {
id : 'gid://gitlab/WorkItem/1' ,
widgets : [
{
_ _typename : 'WorkItemAssigneesWeight' ,
assignees : {
nodes : [ mockAssignees [ 0 ] ] ,
} ,
} ,
] ,
} ,
} ,
} ;
export const workItemLabelsSubscriptionResponse = {
data : {
issuableLabelsUpdated : {
id : 'gid://gitlab/WorkItem/1' ,
widgets : [
{
_ _typename : 'WorkItemWidgetLabels' ,
type : 'LABELS' ,
allowsScopedLabels : false ,
labels : {
nodes : mockLabels ,
} ,
} ,
] ,
} ,
} ,
} ;
export const workItemIterationSubscriptionResponse = {
data : {
issuableIterationUpdated : {
id : 'gid://gitlab/WorkItem/1' ,
widgets : [
{
_ _typename : 'WorkItemWidgetIteration' ,
iteration : {
description : 'Iteration description' ,
dueDate : '2022-07-29' ,
id : 'gid://gitlab/Iteration/1125' ,
iid : '95' ,
startDate : '2022-06-22' ,
title : 'Iteration subcription title' ,
} ,
} ,
] ,
} ,
} ,
} ;
2023-03-17 16:20:25 +05:30
export const workItemHealthStatusSubscriptionResponse = {
data : {
issuableHealthStatusUpdated : {
id : 'gid://gitlab/WorkItem/1' ,
widgets : [
{
_ _typename : 'WorkItemWidgetHealthStatus' ,
healthStatus : 'needsAttention' ,
} ,
] ,
} ,
} ,
} ;
2023-01-13 00:05:48 +05:30
export const workItemMilestoneSubscriptionResponse = {
data : {
issuableMilestoneUpdated : {
id : 'gid://gitlab/WorkItem/1' ,
widgets : [
{
_ _typename : 'WorkItemWidgetMilestone' ,
type : 'MILESTONE' ,
milestone : {
id : 'gid://gitlab/Milestone/1125' ,
expired : false ,
title : 'Milestone title' ,
} ,
} ,
] ,
} ,
} ,
} ;
2022-07-23 23:45:48 +05:30
export const workItemHierarchyEmptyResponse = {
data : {
workItem : {
id : 'gid://gitlab/WorkItem/1' ,
workItemType : {
id : 'gid://gitlab/WorkItems::Type/6' ,
2023-03-04 22:38:38 +05:30
name : 'Issue' ,
iconName : 'issue-type-issue' ,
2022-07-23 23:45:48 +05:30
_ _typename : 'WorkItemType' ,
} ,
title : 'New title' ,
2022-08-27 11:52:29 +05:30
createdAt : '2022-08-03T12:41:54Z' ,
closedAt : null ,
2022-10-11 01:57:18 +05:30
project : {
_ _typename : 'Project' ,
id : '1' ,
fullPath : 'test-project-path' ,
2023-03-17 16:20:25 +05:30
archived : false ,
2022-10-11 01:57:18 +05:30
} ,
2022-08-27 11:52:29 +05:30
userPermissions : {
deleteWorkItem : false ,
updateWorkItem : false ,
} ,
confidential : false ,
2022-07-23 23:45:48 +05:30
widgets : [
{
type : 'DESCRIPTION' ,
_ _typename : 'WorkItemWidgetDescription' ,
} ,
{
type : 'HIERARCHY' ,
parent : null ,
2023-03-04 22:38:38 +05:30
hasChildren : false ,
2022-07-23 23:45:48 +05:30
children : {
nodes : [ ] ,
_ _typename : 'WorkItemConnection' ,
} ,
_ _typename : 'WorkItemWidgetHierarchy' ,
} ,
] ,
_ _typename : 'WorkItem' ,
} ,
} ,
} ;
2022-08-27 11:52:29 +05:30
export const workItemHierarchyNoUpdatePermissionResponse = {
data : {
workItem : {
id : 'gid://gitlab/WorkItem/1' ,
workItemType : {
id : 'gid://gitlab/WorkItems::Type/6' ,
2023-03-04 22:38:38 +05:30
name : 'Issue' ,
iconName : 'issue-type-issue' ,
2022-08-27 11:52:29 +05:30
_ _typename : 'WorkItemType' ,
} ,
title : 'New title' ,
userPermissions : {
deleteWorkItem : false ,
updateWorkItem : false ,
} ,
2022-10-11 01:57:18 +05:30
project : {
_ _typename : 'Project' ,
id : '1' ,
fullPath : 'test-project-path' ,
2023-03-17 16:20:25 +05:30
archived : false ,
2022-10-11 01:57:18 +05:30
} ,
2022-08-27 11:52:29 +05:30
confidential : false ,
widgets : [
{
type : 'DESCRIPTION' ,
_ _typename : 'WorkItemWidgetDescription' ,
} ,
{
type : 'HIERARCHY' ,
parent : null ,
2023-03-04 22:38:38 +05:30
hasChildren : true ,
2022-08-27 11:52:29 +05:30
children : {
nodes : [
{
id : 'gid://gitlab/WorkItem/2' ,
2023-03-04 22:38:38 +05:30
iid : '2' ,
2022-08-27 11:52:29 +05:30
workItemType : {
id : 'gid://gitlab/WorkItems::Type/5' ,
2023-03-04 22:38:38 +05:30
name : 'Task' ,
iconName : 'issue-type-task' ,
2022-08-27 11:52:29 +05:30
_ _typename : 'WorkItemType' ,
} ,
title : 'xyz' ,
state : 'OPEN' ,
confidential : false ,
createdAt : '2022-08-03T12:41:54Z' ,
closedAt : null ,
2023-03-04 22:38:38 +05:30
widgets : [
{
type : 'HIERARCHY' ,
hasChildren : false ,
} ,
] ,
2022-08-27 11:52:29 +05:30
_ _typename : 'WorkItem' ,
} ,
] ,
_ _typename : 'WorkItemConnection' ,
} ,
_ _typename : 'WorkItemWidgetHierarchy' ,
} ,
] ,
_ _typename : 'WorkItem' ,
} ,
} ,
} ;
2022-10-11 01:57:18 +05:30
export const workItemTask = {
id : 'gid://gitlab/WorkItem/4' ,
2023-03-04 22:38:38 +05:30
iid : '4' ,
2022-10-11 01:57:18 +05:30
workItemType : {
id : 'gid://gitlab/WorkItems::Type/5' ,
2023-03-04 22:38:38 +05:30
name : 'Task' ,
iconName : 'issue-type-task' ,
2022-10-11 01:57:18 +05:30
_ _typename : 'WorkItemType' ,
} ,
title : 'bar' ,
state : 'OPEN' ,
confidential : false ,
createdAt : '2022-08-03T12:41:54Z' ,
closedAt : null ,
_ _typename : 'WorkItem' ,
} ;
export const confidentialWorkItemTask = {
id : 'gid://gitlab/WorkItem/2' ,
2023-03-04 22:38:38 +05:30
iid : '2' ,
2022-10-11 01:57:18 +05:30
workItemType : {
id : 'gid://gitlab/WorkItems::Type/5' ,
2023-03-04 22:38:38 +05:30
name : 'Task' ,
iconName : 'issue-type-task' ,
2022-10-11 01:57:18 +05:30
_ _typename : 'WorkItemType' ,
} ,
title : 'xyz' ,
state : 'OPEN' ,
confidential : true ,
createdAt : '2022-08-03T12:41:54Z' ,
closedAt : null ,
_ _typename : 'WorkItem' ,
} ;
export const closedWorkItemTask = {
id : 'gid://gitlab/WorkItem/3' ,
2023-03-04 22:38:38 +05:30
iid : '3' ,
2022-10-11 01:57:18 +05:30
workItemType : {
id : 'gid://gitlab/WorkItems::Type/5' ,
2023-03-04 22:38:38 +05:30
name : 'Task' ,
iconName : 'issue-type-task' ,
2022-10-11 01:57:18 +05:30
_ _typename : 'WorkItemType' ,
} ,
title : 'abc' ,
state : 'CLOSED' ,
confidential : false ,
createdAt : '2022-08-03T12:41:54Z' ,
closedAt : '2022-08-12T13:07:52Z' ,
_ _typename : 'WorkItem' ,
} ;
2023-03-04 22:38:38 +05:30
export const childrenWorkItems = [
confidentialWorkItemTask ,
closedWorkItemTask ,
workItemTask ,
{
id : 'gid://gitlab/WorkItem/5' ,
iid : '5' ,
workItemType : {
id : 'gid://gitlab/WorkItems::Type/5' ,
name : 'Task' ,
iconName : 'issue-type-task' ,
_ _typename : 'WorkItemType' ,
} ,
title : 'foobar' ,
state : 'OPEN' ,
confidential : false ,
createdAt : '2022-08-03T12:41:54Z' ,
closedAt : null ,
_ _typename : 'WorkItem' ,
} ,
] ;
2022-07-23 23:45:48 +05:30
export const workItemHierarchyResponse = {
data : {
workItem : {
id : 'gid://gitlab/WorkItem/1' ,
2023-03-04 22:38:38 +05:30
iid : '1' ,
2022-07-23 23:45:48 +05:30
workItemType : {
id : 'gid://gitlab/WorkItems::Type/6' ,
2023-03-04 22:38:38 +05:30
name : 'Objective' ,
iconName : 'issue-type-objective' ,
_ _typename : 'WorkItemType' ,
} ,
title : 'New title' ,
userPermissions : {
deleteWorkItem : true ,
updateWorkItem : true ,
} ,
confidential : false ,
project : {
_ _typename : 'Project' ,
id : '1' ,
fullPath : 'test-project-path' ,
2023-03-17 16:20:25 +05:30
archived : false ,
2023-03-04 22:38:38 +05:30
} ,
widgets : [
{
type : 'DESCRIPTION' ,
_ _typename : 'WorkItemWidgetDescription' ,
} ,
{
type : 'HIERARCHY' ,
parent : null ,
hasChildren : true ,
children : {
nodes : childrenWorkItems ,
_ _typename : 'WorkItemConnection' ,
} ,
_ _typename : 'WorkItemWidgetHierarchy' ,
} ,
] ,
_ _typename : 'WorkItem' ,
} ,
} ,
} ;
2023-03-17 16:20:25 +05:30
export const workItemObjectiveMetadataWidgets = {
ASSIGNEES : {
type : 'ASSIGNEES' ,
_ _typename : 'WorkItemWidgetAssignees' ,
canInviteMembers : true ,
allowsMultipleAssignees : true ,
assignees : {
_ _typename : 'UserCoreConnection' ,
nodes : mockAssignees ,
} ,
} ,
HEALTH _STATUS : {
type : 'HEALTH_STATUS' ,
_ _typename : 'WorkItemWidgetHealthStatus' ,
healthStatus : 'onTrack' ,
} ,
LABELS : {
type : 'LABELS' ,
_ _typename : 'WorkItemWidgetLabels' ,
allowsScopedLabels : true ,
labels : {
_ _typename : 'LabelConnection' ,
nodes : mockLabels ,
} ,
} ,
MILESTONE : {
type : 'MILESTONE' ,
_ _typename : 'WorkItemWidgetMilestone' ,
milestone : mockMilestone ,
} ,
PROGRESS : {
type : 'PROGRESS' ,
_ _typename : 'WorkItemWidgetProgress' ,
progress : 10 ,
} ,
} ;
2023-03-04 22:38:38 +05:30
export const workItemObjectiveWithChild = {
id : 'gid://gitlab/WorkItem/12' ,
iid : '12' ,
workItemType : {
id : 'gid://gitlab/WorkItems::Type/2411' ,
name : 'Objective' ,
iconName : 'issue-type-objective' ,
_ _typename : 'WorkItemType' ,
} ,
project : {
_ _typename : 'Project' ,
id : '1' ,
fullPath : 'test-project-path' ,
2023-03-17 16:20:25 +05:30
archived : false ,
2023-03-04 22:38:38 +05:30
} ,
userPermissions : {
deleteWorkItem : true ,
updateWorkItem : true ,
} ,
2023-04-23 21:23:45 +05:30
author : {
... mockAssignees [ 0 ] ,
} ,
2023-03-04 22:38:38 +05:30
title : 'Objective' ,
description : 'Objective description' ,
state : 'OPEN' ,
confidential : false ,
createdAt : '2022-08-03T12:41:54Z' ,
2023-04-23 21:23:45 +05:30
updatedAt : null ,
2023-03-04 22:38:38 +05:30
closedAt : null ,
widgets : [
{
type : 'HIERARCHY' ,
hasChildren : true ,
parent : null ,
children : {
nodes : [ ] ,
} ,
_ _typename : 'WorkItemWidgetHierarchy' ,
} ,
2023-03-17 16:20:25 +05:30
workItemObjectiveMetadataWidgets . PROGRESS ,
workItemObjectiveMetadataWidgets . HEALTH _STATUS ,
workItemObjectiveMetadataWidgets . MILESTONE ,
workItemObjectiveMetadataWidgets . ASSIGNEES ,
workItemObjectiveMetadataWidgets . LABELS ,
2023-03-04 22:38:38 +05:30
] ,
_ _typename : 'WorkItem' ,
} ;
export const workItemObjectiveNoMetadata = {
... workItemObjectiveWithChild ,
widgets : [
{
type : 'HIERARCHY' ,
hasChildren : true ,
_ _typename : 'WorkItemWidgetHierarchy' ,
} ,
2023-03-17 16:20:25 +05:30
{
_ _typename : 'WorkItemWidgetProgress' ,
type : 'PROGRESS' ,
progress : null ,
} ,
{
_ _typename : 'WorkItemWidgetMilestone' ,
type : 'MILESTONE' ,
milestone : null ,
} ,
2023-03-04 22:38:38 +05:30
] ,
} ;
export const workItemHierarchyTreeResponse = {
data : {
workItem : {
id : 'gid://gitlab/WorkItem/2' ,
iid : '2' ,
workItemType : {
id : 'gid://gitlab/WorkItems::Type/2411' ,
name : 'Objective' ,
iconName : 'issue-type-objective' ,
2022-07-23 23:45:48 +05:30
_ _typename : 'WorkItemType' ,
} ,
title : 'New title' ,
2022-08-27 11:52:29 +05:30
userPermissions : {
deleteWorkItem : true ,
updateWorkItem : true ,
} ,
confidential : false ,
2022-10-11 01:57:18 +05:30
project : {
_ _typename : 'Project' ,
id : '1' ,
fullPath : 'test-project-path' ,
2023-03-17 16:20:25 +05:30
archived : false ,
2022-10-11 01:57:18 +05:30
} ,
2022-07-23 23:45:48 +05:30
widgets : [
{
type : 'DESCRIPTION' ,
_ _typename : 'WorkItemWidgetDescription' ,
} ,
{
type : 'HIERARCHY' ,
parent : null ,
2023-03-04 22:38:38 +05:30
hasChildren : true ,
2022-07-23 23:45:48 +05:30
children : {
nodes : [
{
2023-03-04 22:38:38 +05:30
id : 'gid://gitlab/WorkItem/13' ,
iid : '13' ,
2022-07-23 23:45:48 +05:30
workItemType : {
2023-03-04 22:38:38 +05:30
id : 'gid://gitlab/WorkItems::Type/2411' ,
name : 'Objective' ,
iconName : 'issue-type-objective' ,
2022-07-23 23:45:48 +05:30
_ _typename : 'WorkItemType' ,
} ,
2023-03-04 22:38:38 +05:30
title : 'Objective 2' ,
2022-07-23 23:45:48 +05:30
state : 'OPEN' ,
2022-08-27 11:52:29 +05:30
confidential : false ,
createdAt : '2022-08-03T12:41:54Z' ,
closedAt : null ,
2023-03-04 22:38:38 +05:30
widgets : [
{
type : 'HIERARCHY' ,
hasChildren : true ,
_ _typename : 'WorkItemWidgetHierarchy' ,
} ,
] ,
2022-07-23 23:45:48 +05:30
_ _typename : 'WorkItem' ,
} ,
] ,
_ _typename : 'WorkItemConnection' ,
} ,
_ _typename : 'WorkItemWidgetHierarchy' ,
} ,
] ,
_ _typename : 'WorkItem' ,
} ,
} ,
} ;
2022-08-13 15:12:31 +05:30
2023-03-04 22:38:38 +05:30
export const workItemHierarchyTreeFailureResponse = {
data : { } ,
errors : [
{
message : 'Something went wrong' ,
} ,
] ,
} ;
2022-08-13 15:12:31 +05:30
export const changeWorkItemParentMutationResponse = {
data : {
workItemUpdate : {
workItem : {
2022-08-27 11:52:29 +05:30
_ _typename : 'WorkItem' ,
2022-08-13 15:12:31 +05:30
workItemType : {
_ _typename : 'WorkItemType' ,
2022-08-27 11:52:29 +05:30
id : 'gid://gitlab/WorkItems::Type/1' ,
name : 'Issue' ,
iconName : 'issue-type-issue' ,
2022-08-13 15:12:31 +05:30
} ,
2022-08-27 11:52:29 +05:30
userPermissions : {
deleteWorkItem : true ,
updateWorkItem : true ,
} ,
description : null ,
id : 'gid://gitlab/WorkItem/2' ,
2023-01-13 00:05:48 +05:30
iid : '2' ,
2022-08-13 15:12:31 +05:30
state : 'OPEN' ,
2022-08-27 11:52:29 +05:30
title : 'Foo' ,
confidential : false ,
createdAt : '2022-08-03T12:41:54Z' ,
2023-04-23 21:23:45 +05:30
updatedAt : null ,
2022-08-27 11:52:29 +05:30
closedAt : null ,
2023-04-23 21:23:45 +05:30
author : {
... mockAssignees [ 0 ] ,
} ,
2022-10-11 01:57:18 +05:30
project : {
_ _typename : 'Project' ,
id : '1' ,
fullPath : 'test-project-path' ,
2023-03-17 16:20:25 +05:30
archived : false ,
2022-10-11 01:57:18 +05:30
} ,
2022-08-27 11:52:29 +05:30
widgets : [
{
_ _typename : 'WorkItemWidgetHierarchy' ,
type : 'HIERARCHY' ,
parent : null ,
2023-03-04 22:38:38 +05:30
hasChildren : false ,
2022-08-27 11:52:29 +05:30
children : {
nodes : [ ] ,
} ,
} ,
] ,
2022-08-13 15:12:31 +05:30
} ,
errors : [ ] ,
_ _typename : 'WorkItemUpdatePayload' ,
} ,
} ,
} ;
export const availableWorkItemsResponse = {
data : {
workspace : {
_ _typename : 'Project' ,
id : 'gid://gitlab/Project/2' ,
workItems : {
2023-01-13 00:05:48 +05:30
nodes : [
2022-08-13 15:12:31 +05:30
{
2023-01-13 00:05:48 +05:30
id : 'gid://gitlab/WorkItem/458' ,
title : 'Task 1' ,
state : 'OPEN' ,
createdAt : '2022-08-03T12:41:54Z' ,
2023-03-17 16:20:25 +05:30
confidential : false ,
2023-01-13 00:05:48 +05:30
_ _typename : 'WorkItem' ,
2022-08-13 15:12:31 +05:30
} ,
{
2023-01-13 00:05:48 +05:30
id : 'gid://gitlab/WorkItem/459' ,
title : 'Task 2' ,
state : 'OPEN' ,
createdAt : '2022-08-03T12:41:54Z' ,
2023-03-17 16:20:25 +05:30
confidential : false ,
_ _typename : 'WorkItem' ,
} ,
{
id : 'gid://gitlab/WorkItem/460' ,
title : 'Task 3' ,
state : 'OPEN' ,
createdAt : '2022-08-03T12:41:54Z' ,
confidential : true ,
2023-01-13 00:05:48 +05:30
_ _typename : 'WorkItem' ,
2022-08-13 15:12:31 +05:30
} ,
] ,
} ,
} ,
} ,
} ;
export const projectMembersResponseWithCurrentUser = {
data : {
workspace : {
id : '1' ,
_ _typename : 'Project' ,
users : {
nodes : [
{
id : 'user-2' ,
user : {
_ _typename : 'UserCore' ,
id : 'gid://gitlab/User/5' ,
avatarUrl : '/avatar2' ,
name : 'rookie' ,
username : 'rookie' ,
webUrl : 'rookie' ,
status : null ,
} ,
} ,
{
id : 'user-1' ,
user : {
_ _typename : 'UserCore' ,
id : 'gid://gitlab/User/1' ,
avatarUrl :
'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon' ,
name : 'Administrator' ,
username : 'root' ,
webUrl : '/root' ,
status : null ,
} ,
} ,
] ,
2022-10-11 01:57:18 +05:30
pageInfo : {
hasNextPage : false ,
endCursor : null ,
startCursor : null ,
} ,
} ,
} ,
} ,
} ;
export const projectMembersResponseWithCurrentUserWithNextPage = {
data : {
workspace : {
id : '1' ,
_ _typename : 'Project' ,
users : {
nodes : [
{
id : 'user-2' ,
user : {
_ _typename : 'UserCore' ,
id : 'gid://gitlab/User/5' ,
avatarUrl : '/avatar2' ,
name : 'rookie' ,
username : 'rookie' ,
webUrl : 'rookie' ,
status : null ,
} ,
} ,
{
id : 'user-1' ,
user : {
_ _typename : 'UserCore' ,
id : 'gid://gitlab/User/1' ,
avatarUrl :
'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon' ,
name : 'Administrator' ,
username : 'root' ,
webUrl : '/root' ,
status : null ,
} ,
} ,
] ,
pageInfo : {
hasNextPage : true ,
endCursor : 'endCursor' ,
startCursor : 'startCursor' ,
} ,
} ,
} ,
} ,
} ;
export const projectMembersResponseWithNoMatchingUsers = {
data : {
workspace : {
id : '1' ,
_ _typename : 'Project' ,
users : {
nodes : [ ] ,
pageInfo : {
endCursor : null ,
hasNextPage : false ,
startCursor : null ,
} ,
2022-08-13 15:12:31 +05:30
} ,
} ,
} ,
} ;
export const projectMembersResponseWithoutCurrentUser = {
data : {
workspace : {
id : '1' ,
_ _typename : 'Project' ,
users : {
nodes : [
{
id : 'user-2' ,
user : {
_ _typename : 'UserCore' ,
id : 'gid://gitlab/User/5' ,
avatarUrl : '/avatar2' ,
name : 'rookie' ,
username : 'rookie' ,
webUrl : 'rookie' ,
status : null ,
} ,
} ,
] ,
} ,
} ,
} ,
} ;
export const currentUserResponse = {
data : {
currentUser : {
_ _typename : 'UserCore' ,
id : 'gid://gitlab/User/1' ,
avatarUrl :
'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon' ,
name : 'Administrator' ,
username : 'root' ,
webUrl : '/root' ,
} ,
} ,
} ;
export const currentUserNullResponse = {
data : {
currentUser : null ,
} ,
} ;
export const projectLabelsResponse = {
data : {
workspace : {
id : '1' ,
_ _typename : 'Project' ,
labels : {
nodes : mockLabels ,
} ,
} ,
} ,
} ;
2022-11-25 23:54:43 +05:30
export const mockIterationWidgetResponse = {
description : 'Iteration description' ,
dueDate : '2022-07-19' ,
id : 'gid://gitlab/Iteration/1124' ,
iid : '91' ,
startDate : '2022-06-22' ,
title : 'Iteration title widget' ,
} ;
export const groupIterationsResponse = {
data : {
workspace : {
id : 'gid://gitlab/Group/22' ,
attributes : {
nodes : [
{
id : 'gid://gitlab/Iteration/1124' ,
title : null ,
startDate : '2022-06-22' ,
dueDate : '2022-07-19' ,
webUrl : 'http://127.0.0.1:3000/groups/gitlab-org/-/iterations/1124' ,
iterationCadence : {
id : 'gid://gitlab/Iterations::Cadence/1101' ,
title : 'Quod voluptates quidem ea eaque eligendi ex corporis.' ,
_ _typename : 'IterationCadence' ,
} ,
_ _typename : 'Iteration' ,
state : 'current' ,
} ,
{
id : 'gid://gitlab/Iteration/1185' ,
title : null ,
startDate : '2022-07-06' ,
dueDate : '2022-07-19' ,
webUrl : 'http://127.0.0.1:3000/groups/gitlab-org/-/iterations/1185' ,
iterationCadence : {
id : 'gid://gitlab/Iterations::Cadence/1144' ,
title : 'Quo velit perspiciatis saepe aut omnis voluptas ab eos.' ,
_ _typename : 'IterationCadence' ,
} ,
_ _typename : 'Iteration' ,
state : 'current' ,
} ,
{
id : 'gid://gitlab/Iteration/1194' ,
title : null ,
startDate : '2022-07-06' ,
dueDate : '2022-07-19' ,
webUrl : 'http://127.0.0.1:3000/groups/gitlab-org/-/iterations/1194' ,
iterationCadence : {
id : 'gid://gitlab/Iterations::Cadence/1152' ,
title :
'Minima aut consequatur magnam vero doloremque accusamus maxime repellat voluptatem qui.' ,
_ _typename : 'IterationCadence' ,
} ,
_ _typename : 'Iteration' ,
state : 'current' ,
} ,
] ,
_ _typename : 'IterationConnection' ,
} ,
_ _typename : 'Group' ,
} ,
} ,
} ;
export const groupIterationsResponseWithNoIterations = {
data : {
workspace : {
id : 'gid://gitlab/Group/22' ,
attributes : {
nodes : [ ] ,
_ _typename : 'IterationConnection' ,
} ,
_ _typename : 'Group' ,
} ,
} ,
} ;
export const mockMilestoneWidgetResponse = {
2023-01-13 00:05:48 +05:30
state : 'active' ,
2022-11-25 23:54:43 +05:30
expired : false ,
id : 'gid://gitlab/Milestone/30' ,
title : 'v4.0' ,
} ;
export const projectMilestonesResponse = {
data : {
workspace : {
id : 'gid://gitlab/Project/1' ,
attributes : {
nodes : [
{
id : 'gid://gitlab/Milestone/5' ,
title : 'v4.0' ,
webUrl : '/gitlab-org/gitlab-test/-/milestones/5' ,
dueDate : null ,
expired : false ,
_ _typename : 'Milestone' ,
state : 'active' ,
} ,
{
id : 'gid://gitlab/Milestone/4' ,
title : 'v3.0' ,
webUrl : '/gitlab-org/gitlab-test/-/milestones/4' ,
dueDate : null ,
expired : false ,
_ _typename : 'Milestone' ,
state : 'active' ,
} ,
] ,
_ _typename : 'MilestoneConnection' ,
} ,
_ _typename : 'Project' ,
} ,
} ,
} ;
export const projectMilestonesResponseWithNoMilestones = {
data : {
workspace : {
id : 'gid://gitlab/Project/1' ,
attributes : {
nodes : [ ] ,
_ _typename : 'MilestoneConnection' ,
} ,
_ _typename : 'Project' ,
} ,
} ,
} ;
2023-01-13 00:05:48 +05:30
export const projectWorkItemResponse = {
data : {
workspace : {
id : 'gid://gitlab/Project/1' ,
workItems : {
nodes : [ workItemQueryResponse . data . workItem ] ,
} ,
} ,
} ,
} ;
2023-03-04 22:38:38 +05:30
export const mockWorkItemNotesResponse = {
data : {
workItem : {
2023-04-23 21:23:45 +05:30
id : 'gid://gitlab/WorkItem/1' ,
2023-03-04 22:38:38 +05:30
iid : '60' ,
widgets : [
{
_ _typename : 'WorkItemWidgetIteration' ,
} ,
{
_ _typename : 'WorkItemWidgetWeight' ,
} ,
{
_ _typename : 'WorkItemWidgetAssignees' ,
} ,
{
_ _typename : 'WorkItemWidgetLabels' ,
} ,
{
_ _typename : 'WorkItemWidgetDescription' ,
} ,
{
_ _typename : 'WorkItemWidgetHierarchy' ,
} ,
{
_ _typename : 'WorkItemWidgetStartAndDueDate' ,
} ,
{
_ _typename : 'WorkItemWidgetMilestone' ,
} ,
{
type : 'NOTES' ,
discussions : {
pageInfo : {
hasNextPage : false ,
hasPreviousPage : false ,
startCursor : null ,
endCursor : null ,
_ _typename : 'PageInfo' ,
} ,
nodes : [
{
2023-04-23 21:23:45 +05:30
id : 'gid://gitlab/Discussion/8bbc4890b6ff0f2cde93a5a0947cd2b8a13d3b6e' ,
2023-03-04 22:38:38 +05:30
notes : {
nodes : [
{
id : 'gid://gitlab/Note/2428' ,
2023-04-23 21:23:45 +05:30
body : 'added #31 as parent issue' ,
2023-03-04 22:38:38 +05:30
bodyHtml :
'<p data-sourcepos="1:1-1:25" dir="auto">added <a href="/flightjs/Flight/-/issues/31" data-reference-type="issue" data-original="#31" data-link="false" data-link-reference="false" data-project="6" data-issue="224" data-project-path="flightjs/Flight" data-iid="31" data-issue-type="issue" data-container=body data-placement="top" title="Perferendis est quae totam quia laborum tempore ut voluptatem." class="gfm gfm-issue">#31</a> as parent issue</p>' ,
systemNoteIconName : 'link' ,
createdAt : '2022-11-14T04:18:59Z' ,
2023-04-23 21:23:45 +05:30
lastEditedAt : null ,
lastEditedBy : null ,
2023-03-17 16:20:25 +05:30
system : true ,
internal : false ,
2023-04-23 21:23:45 +05:30
discussion : {
id : 'gid://gitlab/Discussion/9c17769ca29798eddaed539d010da12723561234' ,
} ,
2023-03-17 16:20:25 +05:30
userPermissions : {
adminNote : false ,
2023-04-23 21:23:45 +05:30
awardEmoji : true ,
readNote : true ,
createNote : true ,
resolveNote : true ,
repositionNote : true ,
2023-03-17 16:20:25 +05:30
_ _typename : 'NotePermissions' ,
} ,
2023-03-04 22:38:38 +05:30
author : {
avatarUrl :
'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon' ,
id : 'gid://gitlab/User/1' ,
name : 'Administrator' ,
username : 'root' ,
webUrl : 'http://127.0.0.1:3000/root' ,
_ _typename : 'UserCore' ,
} ,
_ _typename : 'Note' ,
} ,
] ,
_ _typename : 'NoteConnection' ,
} ,
_ _typename : 'Discussion' ,
} ,
{
2023-04-23 21:23:45 +05:30
id : 'gid://gitlab/Discussion/7b08b89a728a5ceb7de8334246837ba1d07270dc' ,
2023-03-04 22:38:38 +05:30
notes : {
nodes : [
{
2023-03-17 16:20:25 +05:30
id : 'gid://gitlab/MilestoneNote/0f2f195ec0d1ef95ee9d5b10446b8e96a7d83864' ,
2023-04-23 21:23:45 +05:30
body : 'changed milestone to %v4.0' ,
2023-03-04 22:38:38 +05:30
bodyHtml :
'<p data-sourcepos="1:1-1:23" dir="auto">changed milestone to <a href="/flightjs/Flight/-/milestones/5" data-reference-type="milestone" data-original="%5" data-link="false" data-link-reference="false" data-project="6" data-milestone="30" data-container=body data-placement="top" title="" class="gfm gfm-milestone has-tooltip">%v4.0</a></p>' ,
systemNoteIconName : 'clock' ,
createdAt : '2022-11-14T04:18:59Z' ,
2023-04-23 21:23:45 +05:30
lastEditedAt : null ,
lastEditedBy : null ,
2023-03-17 16:20:25 +05:30
system : true ,
internal : false ,
2023-04-23 21:23:45 +05:30
discussion : {
id : 'gid://gitlab/Discussion/9c17769ca29798eddaed539d010da12723565678' ,
} ,
2023-03-17 16:20:25 +05:30
userPermissions : {
adminNote : false ,
2023-04-23 21:23:45 +05:30
awardEmoji : true ,
readNote : true ,
createNote : true ,
resolveNote : true ,
repositionNote : true ,
2023-03-17 16:20:25 +05:30
_ _typename : 'NotePermissions' ,
} ,
2023-03-04 22:38:38 +05:30
author : {
avatarUrl :
'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon' ,
id : 'gid://gitlab/User/1' ,
name : 'Administrator' ,
username : 'root' ,
webUrl : 'http://127.0.0.1:3000/root' ,
_ _typename : 'UserCore' ,
} ,
_ _typename : 'Note' ,
} ,
] ,
_ _typename : 'NoteConnection' ,
} ,
_ _typename : 'Discussion' ,
} ,
{
2023-04-23 21:23:45 +05:30
id : 'gid://gitlab/Discussion/0f2f195ec0d1ef95ee9d5b10446b8e96a7d83864' ,
2023-03-04 22:38:38 +05:30
notes : {
nodes : [
{
2023-03-17 16:20:25 +05:30
id : 'gid://gitlab/WeightNote/0f2f195ec0d1ef95ee9d5b10446b8e96a9883864' ,
2023-04-23 21:23:45 +05:30
body : 'changed weight to **89**' ,
2023-03-04 22:38:38 +05:30
bodyHtml : '<p dir="auto">changed weight to <strong>89</strong></p>' ,
systemNoteIconName : 'weight' ,
createdAt : '2022-11-25T07:16:20Z' ,
2023-04-23 21:23:45 +05:30
lastEditedAt : null ,
lastEditedBy : null ,
2023-03-17 16:20:25 +05:30
system : true ,
internal : false ,
2023-04-23 21:23:45 +05:30
discussion : {
id : 'gid://gitlab/Discussion/9c17769ca29798eddaed539d010da12723560987' ,
} ,
2023-03-17 16:20:25 +05:30
userPermissions : {
adminNote : false ,
2023-04-23 21:23:45 +05:30
awardEmoji : true ,
readNote : true ,
createNote : true ,
resolveNote : true ,
repositionNote : true ,
2023-03-17 16:20:25 +05:30
_ _typename : 'NotePermissions' ,
} ,
2023-03-04 22:38:38 +05:30
author : {
avatarUrl :
'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon' ,
id : 'gid://gitlab/User/1' ,
name : 'Administrator' ,
username : 'root' ,
webUrl : 'http://127.0.0.1:3000/root' ,
_ _typename : 'UserCore' ,
} ,
_ _typename : 'Note' ,
} ,
] ,
_ _typename : 'NoteConnection' ,
} ,
_ _typename : 'Discussion' ,
} ,
] ,
_ _typename : 'DiscussionConnection' ,
} ,
_ _typename : 'WorkItemWidgetNotes' ,
} ,
] ,
_ _typename : 'WorkItem' ,
} ,
} ,
} ;
export const mockWorkItemNotesByIidResponse = {
data : {
workspace : {
id : 'gid://gitlab/Project/6' ,
workItems : {
nodes : [
{
id : 'gid://gitlab/WorkItem/600' ,
iid : '51' ,
widgets : [
{
_ _typename : 'WorkItemWidgetIteration' ,
} ,
{
_ _typename : 'WorkItemWidgetWeight' ,
} ,
{
_ _typename : 'WorkItemWidgetHealthStatus' ,
} ,
{
_ _typename : 'WorkItemWidgetAssignees' ,
} ,
{
_ _typename : 'WorkItemWidgetLabels' ,
} ,
{
_ _typename : 'WorkItemWidgetDescription' ,
} ,
{
_ _typename : 'WorkItemWidgetHierarchy' ,
} ,
{
_ _typename : 'WorkItemWidgetStartAndDueDate' ,
} ,
{
_ _typename : 'WorkItemWidgetMilestone' ,
} ,
{
type : 'NOTES' ,
discussions : {
pageInfo : {
hasNextPage : true ,
hasPreviousPage : false ,
startCursor : null ,
endCursor :
'eyJjcmVhdGVkX2F0IjoiMjAyMi0xMS0xNCAwNDoxOTowMC4wOTkxMTcwMDAgKzAwMDAiLCJpZCI6IjQyNyIsIl9rZCI6Im4ifQ==' ,
_ _typename : 'PageInfo' ,
} ,
nodes : [
{
2023-04-23 21:23:45 +05:30
id : 'gid://gitlab/Discussion/8bbc4890b6ff0f2cde93a5a0947cd2b8a13d3b6e' ,
2023-03-04 22:38:38 +05:30
notes : {
nodes : [
{
id : 'gid://gitlab/Note/2428' ,
2023-04-23 21:23:45 +05:30
body : 'added as parent issue' ,
2023-03-04 22:38:38 +05:30
bodyHtml :
'\u003cp data-sourcepos="1:1-1:25" dir="auto"\u003eadded \u003ca href="/flightjs/Flight/-/issues/31" data-reference-type="issue" data-original="#31" data-link="false" data-link-reference="false" data-project="6" data-issue="224" data-project-path="flightjs/Flight" data-iid="31" data-issue-type="issue" data-container="body" data-placement="top" title="Perferendis est quae totam quia laborum tempore ut voluptatem." class="gfm gfm-issue"\u003e#31\u003c/a\u003e as parent issue\u003c/p\u003e' ,
systemNoteIconName : 'link' ,
createdAt : '2022-11-14T04:18:59Z' ,
2023-04-23 21:23:45 +05:30
lastEditedAt : null ,
lastEditedBy : null ,
2023-03-17 16:20:25 +05:30
system : true ,
internal : false ,
2023-04-23 21:23:45 +05:30
discussion : {
id :
'gid://gitlab/Discussion/9c17769ca29798eddaed539d010da12723561234' ,
} ,
2023-03-17 16:20:25 +05:30
userPermissions : {
adminNote : false ,
2023-04-23 21:23:45 +05:30
awardEmoji : true ,
readNote : true ,
createNote : true ,
resolveNote : true ,
repositionNote : true ,
2023-03-17 16:20:25 +05:30
_ _typename : 'NotePermissions' ,
} ,
2023-03-04 22:38:38 +05:30
author : {
id : 'gid://gitlab/User/1' ,
avatarUrl :
'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon' ,
name : 'Administrator' ,
username : 'root' ,
webUrl : 'http://127.0.0.1:3000/root' ,
_ _typename : 'UserCore' ,
} ,
_ _typename : 'Note' ,
} ,
] ,
_ _typename : 'NoteConnection' ,
} ,
_ _typename : 'Discussion' ,
} ,
{
2023-04-23 21:23:45 +05:30
id : 'gid://gitlab/Discussion/7b08b89a728a5ceb7de8334246837ba1d07270dc' ,
2023-03-04 22:38:38 +05:30
notes : {
nodes : [
{
id :
'gid://gitlab/MilestoneNote/7b08b89a728a5ceb7de8334246837ba1d07270dc' ,
2023-04-23 21:23:45 +05:30
body : 'changed milestone to %v4.0' ,
2023-03-04 22:38:38 +05:30
bodyHtml :
'\u003cp data-sourcepos="1:1-1:23" dir="auto"\u003echanged milestone to \u003ca href="/flightjs/Flight/-/milestones/5" data-reference-type="milestone" data-original="%5" data-link="false" data-link-reference="false" data-project="6" data-milestone="30" data-container="body" data-placement="top" title="" class="gfm gfm-milestone has-tooltip"\u003e%v4.0\u003c/a\u003e\u003c/p\u003e' ,
systemNoteIconName : 'clock' ,
createdAt : '2022-11-14T04:18:59Z' ,
2023-04-23 21:23:45 +05:30
lastEditedAt : null ,
lastEditedBy : null ,
2023-03-17 16:20:25 +05:30
system : true ,
internal : false ,
2023-04-23 21:23:45 +05:30
discussion : {
id :
'gid://gitlab/Discussion/9c17769ca29798eddaed539d010da12723568765' ,
} ,
2023-03-17 16:20:25 +05:30
userPermissions : {
adminNote : false ,
2023-04-23 21:23:45 +05:30
awardEmoji : true ,
readNote : true ,
createNote : true ,
resolveNote : true ,
repositionNote : true ,
2023-03-17 16:20:25 +05:30
_ _typename : 'NotePermissions' ,
} ,
2023-03-04 22:38:38 +05:30
author : {
id : 'gid://gitlab/User/1' ,
avatarUrl :
'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon' ,
name : 'Administrator' ,
username : 'root' ,
webUrl : 'http://127.0.0.1:3000/root' ,
_ _typename : 'UserCore' ,
} ,
_ _typename : 'Note' ,
} ,
] ,
_ _typename : 'NoteConnection' ,
} ,
_ _typename : 'Discussion' ,
} ,
{
2023-04-23 21:23:45 +05:30
id : 'gid://gitlab/Discussion/addbc177f7664699a135130ab05ffb78c57e4db3' ,
2023-03-04 22:38:38 +05:30
notes : {
nodes : [
{
id :
'gid://gitlab/IterationNote/addbc177f7664699a135130ab05ffb78c57e4db3' ,
2023-04-23 21:23:45 +05:30
body :
'changed iteration to Et autem debitis nam suscipit eos ut. Jul 13, 2022 - Jul 19, 2022' ,
2023-03-04 22:38:38 +05:30
bodyHtml :
'\u003cp data-sourcepos="1:1-1:36" dir="auto"\u003echanged iteration to \u003ca href="/groups/flightjs/-/iterations/5352" data-reference-type="iteration" data-original="*iteration:5352" data-link="false" data-link-reference="false" data-project="6" data-iteration="5352" data-container="body" data-placement="top" title="Iteration" class="gfm gfm-iteration has-tooltip"\u003eEt autem debitis nam suscipit eos ut. Jul 13, 2022 - Jul 19, 2022\u003c/a\u003e\u003c/p\u003e' ,
systemNoteIconName : 'iteration' ,
createdAt : '2022-11-14T04:19:00Z' ,
2023-04-23 21:23:45 +05:30
lastEditedAt : null ,
lastEditedBy : null ,
2023-03-17 16:20:25 +05:30
system : true ,
internal : false ,
2023-04-23 21:23:45 +05:30
discussion : {
id :
'gid://gitlab/Discussion/9c17769ca29798eddaed539d010da12723569876' ,
} ,
2023-03-17 16:20:25 +05:30
userPermissions : {
adminNote : false ,
2023-04-23 21:23:45 +05:30
awardEmoji : true ,
readNote : true ,
createNote : true ,
resolveNote : true ,
repositionNote : true ,
2023-03-17 16:20:25 +05:30
_ _typename : 'NotePermissions' ,
} ,
2023-03-04 22:38:38 +05:30
author : {
id : 'gid://gitlab/User/1' ,
avatarUrl :
'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon' ,
name : 'Administrator' ,
username : 'root' ,
webUrl : 'http://127.0.0.1:3000/root' ,
_ _typename : 'UserCore' ,
} ,
_ _typename : 'Note' ,
} ,
] ,
_ _typename : 'NoteConnection' ,
} ,
_ _typename : 'Discussion' ,
} ,
] ,
_ _typename : 'DiscussionConnection' ,
} ,
_ _typename : 'WorkItemWidgetNotes' ,
} ,
] ,
_ _typename : 'WorkItem' ,
} ,
] ,
_ _typename : 'WorkItemConnection' ,
} ,
_ _typename : 'Project' ,
} ,
} ,
} ;
2023-03-17 16:20:25 +05:30
export const mockMoreWorkItemNotesResponse = {
data : {
workItem : {
id : 'gid://gitlab/WorkItem/600' ,
iid : '60' ,
widgets : [
{
_ _typename : 'WorkItemWidgetIteration' ,
} ,
{
_ _typename : 'WorkItemWidgetWeight' ,
} ,
{
_ _typename : 'WorkItemWidgetAssignees' ,
} ,
{
_ _typename : 'WorkItemWidgetLabels' ,
} ,
{
_ _typename : 'WorkItemWidgetDescription' ,
} ,
{
_ _typename : 'WorkItemWidgetHierarchy' ,
} ,
{
_ _typename : 'WorkItemWidgetStartAndDueDate' ,
} ,
{
_ _typename : 'WorkItemWidgetMilestone' ,
} ,
{
type : 'NOTES' ,
discussions : {
pageInfo : {
hasNextPage : true ,
hasPreviousPage : false ,
startCursor : null ,
endCursor : 'endCursor' ,
_ _typename : 'PageInfo' ,
} ,
nodes : [
{
2023-04-23 21:23:45 +05:30
id : 'gid://gitlab/Discussion/8bbc4890b6ff0f2cde93a5a0947cd2b8a13d3b6e' ,
2023-03-17 16:20:25 +05:30
notes : {
nodes : [
{
id : 'gid://gitlab/Note/2428' ,
2023-04-23 21:23:45 +05:30
body : 'added #31 as parent issue' ,
2023-03-17 16:20:25 +05:30
bodyHtml :
'<p data-sourcepos="1:1-1:25" dir="auto">added <a href="/flightjs/Flight/-/issues/31" data-reference-type="issue" data-original="#31" data-link="false" data-link-reference="false" data-project="6" data-issue="224" data-project-path="flightjs/Flight" data-iid="31" data-issue-type="issue" data-container=body data-placement="top" title="Perferendis est quae totam quia laborum tempore ut voluptatem." class="gfm gfm-issue">#31</a> as parent issue</p>' ,
systemNoteIconName : 'link' ,
createdAt : '2022-11-14T04:18:59Z' ,
2023-04-23 21:23:45 +05:30
lastEditedAt : null ,
lastEditedBy : null ,
2023-03-17 16:20:25 +05:30
system : true ,
internal : false ,
2023-04-23 21:23:45 +05:30
discussion : {
id : 'gid://gitlab/Discussion/9c17769ca29798eddaed539d010da1112356a59e' ,
} ,
2023-03-17 16:20:25 +05:30
userPermissions : {
adminNote : false ,
2023-04-23 21:23:45 +05:30
awardEmoji : true ,
readNote : true ,
createNote : true ,
resolveNote : true ,
repositionNote : true ,
2023-03-17 16:20:25 +05:30
_ _typename : 'NotePermissions' ,
} ,
author : {
avatarUrl :
'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon' ,
id : 'gid://gitlab/User/1' ,
name : 'Administrator' ,
username : 'root' ,
webUrl : 'http://127.0.0.1:3000/root' ,
_ _typename : 'UserCore' ,
} ,
_ _typename : 'Note' ,
} ,
] ,
_ _typename : 'NoteConnection' ,
} ,
_ _typename : 'Discussion' ,
} ,
{
2023-04-23 21:23:45 +05:30
id : 'gid://gitlab/Discussion/7b08b89a728a5ceb7de8334246837ba1d07270dc' ,
2023-03-17 16:20:25 +05:30
notes : {
nodes : [
{
id : 'gid://gitlab/MilestoneNote/0f2f195ec0d1ef95ee9d5b10446b8e96a7d83823' ,
2023-04-23 21:23:45 +05:30
body : 'changed milestone to %v4.0' ,
2023-03-17 16:20:25 +05:30
bodyHtml :
'<p data-sourcepos="1:1-1:23" dir="auto">changed milestone to <a href="/flightjs/Flight/-/milestones/5" data-reference-type="milestone" data-original="%5" data-link="false" data-link-reference="false" data-project="6" data-milestone="30" data-container=body data-placement="top" title="" class="gfm gfm-milestone has-tooltip">%v4.0</a></p>' ,
systemNoteIconName : 'clock' ,
createdAt : '2022-11-14T04:18:59Z' ,
2023-04-23 21:23:45 +05:30
lastEditedAt : null ,
lastEditedBy : null ,
2023-03-17 16:20:25 +05:30
system : true ,
internal : false ,
2023-04-23 21:23:45 +05:30
discussion : {
id : 'gid://gitlab/Discussion/9c17769ca29798eddaed539d010da1272356a59e' ,
} ,
2023-03-17 16:20:25 +05:30
userPermissions : {
adminNote : false ,
2023-04-23 21:23:45 +05:30
awardEmoji : true ,
readNote : true ,
createNote : true ,
resolveNote : true ,
repositionNote : true ,
2023-03-17 16:20:25 +05:30
_ _typename : 'NotePermissions' ,
} ,
author : {
avatarUrl :
'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon' ,
id : 'gid://gitlab/User/1' ,
name : 'Administrator' ,
username : 'root' ,
webUrl : 'http://127.0.0.1:3000/root' ,
_ _typename : 'UserCore' ,
} ,
_ _typename : 'Note' ,
} ,
] ,
_ _typename : 'NoteConnection' ,
} ,
_ _typename : 'Discussion' ,
} ,
{
2023-04-23 21:23:45 +05:30
id : 'gid://gitlab/Discussion/0f2f195ec0d1ef95ee9d5b10446b8e96a7d83864' ,
2023-03-17 16:20:25 +05:30
notes : {
nodes : [
{
id : 'gid://gitlab/WeightNote/0f2f195ec0d1ef95ee9d5b10446b8e96a7d83864' ,
2023-04-23 21:23:45 +05:30
body : 'changed weight to **89**' ,
2023-03-17 16:20:25 +05:30
bodyHtml : '<p dir="auto">changed weight to <strong>89</strong></p>' ,
systemNoteIconName : 'weight' ,
createdAt : '2022-11-25T07:16:20Z' ,
2023-04-23 21:23:45 +05:30
lastEditedAt : null ,
lastEditedBy : null ,
2023-03-17 16:20:25 +05:30
system : true ,
internal : false ,
2023-04-23 21:23:45 +05:30
discussion : {
id : 'gid://gitlab/Discussion/9c17769ca29798eddaed539d010da12723569876' ,
} ,
2023-03-17 16:20:25 +05:30
userPermissions : {
adminNote : false ,
2023-04-23 21:23:45 +05:30
awardEmoji : true ,
readNote : true ,
createNote : true ,
resolveNote : true ,
repositionNote : true ,
2023-03-17 16:20:25 +05:30
_ _typename : 'NotePermissions' ,
} ,
author : {
avatarUrl :
'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon' ,
id : 'gid://gitlab/User/1' ,
name : 'Administrator' ,
username : 'root' ,
webUrl : 'http://127.0.0.1:3000/root' ,
_ _typename : 'UserCore' ,
} ,
_ _typename : 'Note' ,
} ,
] ,
_ _typename : 'NoteConnection' ,
} ,
_ _typename : 'Discussion' ,
} ,
] ,
_ _typename : 'DiscussionConnection' ,
} ,
_ _typename : 'WorkItemWidgetNotes' ,
} ,
] ,
_ _typename : 'WorkItem' ,
} ,
} ,
} ;
export const createWorkItemNoteResponse = {
data : {
createNote : {
errors : [ ] ,
2023-04-23 21:23:45 +05:30
note : {
id : 'gid://gitlab/Note/569' ,
discussion : {
id : 'gid://gitlab/Discussion/c872ba2d7d3eb780d2255138d67ca8b04f65b122' ,
notes : {
nodes : [
{
id : 'gid://gitlab/Note/569' ,
body : 'Main comment' ,
bodyHtml : '<p data-sourcepos="1:1-1:9" dir="auto">Main comment</p>' ,
system : false ,
internal : false ,
systemNoteIconName : null ,
createdAt : '2023-01-25T04:49:46Z' ,
lastEditedAt : null ,
lastEditedBy : null ,
discussion : {
id : 'gid://gitlab/Discussion/c872ba2d7d3eb780d2255138d67ca8b04f65b122' ,
_ _typename : 'Discussion' ,
} ,
author : {
id : 'gid://gitlab/User/1' ,
avatarUrl :
'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon' ,
name : 'Administrator' ,
username : 'root' ,
webUrl : 'http://127.0.0.1:3000/root' ,
_ _typename : 'UserCore' ,
} ,
userPermissions : {
adminNote : true ,
awardEmoji : true ,
readNote : true ,
createNote : true ,
resolveNote : true ,
repositionNote : true ,
_ _typename : 'NotePermissions' ,
} ,
_ _typename : 'Note' ,
} ,
] ,
_ _typename : 'NoteConnection' ,
} ,
_ _typename : 'Discussion' ,
} ,
body : 'Latest 22' ,
bodyHtml : '<p data-sourcepos="1:1-1:9" dir="auto">Latest 22</p>' ,
_ _typename : 'Note' ,
} ,
2023-03-17 16:20:25 +05:30
_ _typename : 'CreateNotePayload' ,
} ,
} ,
} ;
export const mockWorkItemCommentNote = {
id : 'gid://gitlab/Note/158' ,
2023-04-23 21:23:45 +05:30
body : 'How are you ? what do you think about this ?' ,
2023-03-17 16:20:25 +05:30
bodyHtml :
'<p data-sourcepos="1:1-1:76" dir="auto"><gl-emoji title="waving hand sign" data-name="wave" data-unicode-version="6.0">👋</gl-emoji> Hi <a href="/fredda.brekke" data-reference-type="user" data-user="3" data-container="body" data-placement="top" class="gfm gfm-project_member js-user-link" title="Sherie Nitzsche">@fredda.brekke</a> How are you ? what do you think about this ? <gl-emoji title="person with folded hands" data-name="pray" data-unicode-version="6.0">🙏</gl-emoji></p>' ,
systemNoteIconName : false ,
createdAt : '2022-11-25T07:16:20Z' ,
2023-04-23 21:23:45 +05:30
lastEditedAt : null ,
lastEditedBy : null ,
2023-03-17 16:20:25 +05:30
system : false ,
internal : false ,
2023-04-23 21:23:45 +05:30
discussion : {
id : 'gid://gitlab/Discussion/9c17769ca29798eddaed539d010da12723569876' ,
} ,
2023-03-17 16:20:25 +05:30
userPermissions : {
adminNote : false ,
2023-04-23 21:23:45 +05:30
awardEmoji : true ,
readNote : true ,
createNote : true ,
resolveNote : true ,
repositionNote : true ,
2023-03-17 16:20:25 +05:30
_ _typename : 'NotePermissions' ,
} ,
author : {
avatarUrl : 'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon' ,
id : 'gid://gitlab/User/1' ,
name : 'Administrator' ,
username : 'root' ,
webUrl : 'http://127.0.0.1:3000/root' ,
_ _typename : 'UserCore' ,
} ,
} ;
2023-04-23 21:23:45 +05:30
export const mockWorkItemNotesResponseWithComments = {
data : {
workItem : {
id : 'gid://gitlab/WorkItem/600' ,
iid : '60' ,
widgets : [
{
_ _typename : 'WorkItemWidgetIteration' ,
} ,
{
_ _typename : 'WorkItemWidgetWeight' ,
} ,
{
_ _typename : 'WorkItemWidgetAssignees' ,
} ,
{
_ _typename : 'WorkItemWidgetLabels' ,
} ,
{
_ _typename : 'WorkItemWidgetDescription' ,
} ,
{
_ _typename : 'WorkItemWidgetHierarchy' ,
} ,
{
_ _typename : 'WorkItemWidgetStartAndDueDate' ,
} ,
{
_ _typename : 'WorkItemWidgetMilestone' ,
} ,
{
type : 'NOTES' ,
discussions : {
pageInfo : {
hasNextPage : false ,
hasPreviousPage : false ,
startCursor : null ,
endCursor : null ,
_ _typename : 'PageInfo' ,
} ,
nodes : [
{
id : 'gid://gitlab/Discussion/8bbc4890b6ff0f2cde93a5a0947cd2b8a13d3b6e' ,
notes : {
nodes : [
{
id : 'gid://gitlab/DiscussionNote/174' ,
body : 'Separate thread' ,
bodyHtml : '<p data-sourcepos="1:1-1:15" dir="auto">Separate thread</p>' ,
system : false ,
internal : false ,
systemNoteIconName : null ,
createdAt : '2023-01-12T07:47:40Z' ,
lastEditedAt : null ,
lastEditedBy : null ,
discussion : {
id : 'gid://gitlab/Discussion/2bb1162fd0d39297d1a68fdd7d4083d3780af0f3' ,
_ _typename : 'Discussion' ,
} ,
author : {
id : 'gid://gitlab/User/1' ,
avatarUrl :
'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon' ,
name : 'Administrator' ,
username : 'root' ,
webUrl : 'http://127.0.0.1:3000/root' ,
_ _typename : 'UserCore' ,
} ,
userPermissions : {
adminNote : true ,
awardEmoji : true ,
readNote : true ,
createNote : true ,
resolveNote : true ,
repositionNote : true ,
_ _typename : 'NotePermissions' ,
} ,
_ _typename : 'Note' ,
} ,
{
id : 'gid://gitlab/DiscussionNote/235' ,
body : 'Thread comment' ,
bodyHtml : '<p data-sourcepos="1:1-1:15" dir="auto">Thread comment</p>' ,
system : false ,
internal : false ,
systemNoteIconName : null ,
createdAt : '2023-01-18T09:09:54Z' ,
lastEditedAt : null ,
lastEditedBy : null ,
discussion : {
id : 'gid://gitlab/Discussion/2bb1162fd0d39297d1a68fdd7d4083d3780af0f3' ,
_ _typename : 'Discussion' ,
} ,
author : {
id : 'gid://gitlab/User/1' ,
avatarUrl :
'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon' ,
name : 'Administrator' ,
username : 'root' ,
webUrl : 'http://127.0.0.1:3000/root' ,
_ _typename : 'UserCore' ,
} ,
userPermissions : {
adminNote : true ,
awardEmoji : true ,
readNote : true ,
createNote : true ,
resolveNote : true ,
repositionNote : true ,
_ _typename : 'NotePermissions' ,
} ,
_ _typename : 'Note' ,
} ,
] ,
_ _typename : 'NoteConnection' ,
} ,
_ _typename : 'Discussion' ,
} ,
{
id : 'gid://gitlab/Discussion/0f2f195ec0d1ef95ee9d5b10446b8e96a7d83864' ,
notes : {
nodes : [
{
id : 'gid://gitlab/WeightNote/0f2f195ec0d1ef95ee9d5b10446b8e96a9883864' ,
body : 'Main thread 2' ,
bodyHtml : '<p data-sourcepos="1:1-1:15" dir="auto">Main thread 2</p>' ,
systemNoteIconName : 'weight' ,
createdAt : '2022-11-25T07:16:20Z' ,
lastEditedAt : null ,
lastEditedBy : null ,
system : false ,
internal : false ,
discussion : {
id : 'gid://gitlab/Discussion/9c17769ca29798eddaed539d010da12723560987' ,
} ,
userPermissions : {
adminNote : false ,
awardEmoji : true ,
readNote : true ,
createNote : true ,
resolveNote : true ,
repositionNote : true ,
_ _typename : 'NotePermissions' ,
} ,
author : {
avatarUrl :
'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon' ,
id : 'gid://gitlab/User/1' ,
name : 'Administrator' ,
username : 'root' ,
webUrl : 'http://127.0.0.1:3000/root' ,
_ _typename : 'UserCore' ,
} ,
_ _typename : 'Note' ,
} ,
] ,
_ _typename : 'NoteConnection' ,
} ,
_ _typename : 'Discussion' ,
} ,
] ,
_ _typename : 'DiscussionConnection' ,
} ,
_ _typename : 'WorkItemWidgetNotes' ,
} ,
] ,
_ _typename : 'WorkItem' ,
} ,
} ,
} ;