export const mockEvents = [ { action: 'comment', author: { __typename: 'UserCore', id: 'gid://gitlab/User/1', name: 'Administrator', username: 'root', }, createdAt: '2022-03-22T15:59:08Z', id: 'gid://gitlab/IncidentManagement::TimelineEvent/132', note: 'Dummy event 1', noteHtml: '

Dummy event 1

', occurredAt: '2022-03-22T15:59:00Z', updatedAt: '2022-03-22T15:59:08Z', __typename: 'TimelineEventType', }, { action: 'comment', author: { __typename: 'UserCore', id: 'gid://gitlab/User/1', name: 'Administrator', username: 'root', }, createdAt: '2022-03-23T14:57:08Z', id: 'gid://gitlab/IncidentManagement::TimelineEvent/131', note: 'Dummy event 2', noteHtml: '

Dummy event 2

', occurredAt: '2022-03-23T14:57:00Z', updatedAt: '2022-03-23T14:57:08Z', __typename: 'TimelineEventType', }, { action: 'comment', author: { __typename: 'UserCore', id: 'gid://gitlab/User/1', name: 'Administrator', username: 'root', }, createdAt: '2022-03-23T15:59:08Z', id: 'gid://gitlab/IncidentManagement::TimelineEvent/132', note: 'Dummy event 3', noteHtml: '

Dummy event 3

', occurredAt: '2022-03-23T15:59:00Z', updatedAt: '2022-03-23T15:59:08Z', __typename: 'TimelineEventType', }, ]; export const timelineEventsQueryListResponse = { data: { project: { id: 'gid://gitlab/Project/8', incidentManagementTimelineEvents: { nodes: mockEvents, }, }, }, }; export const timelineEventsQueryEmptyResponse = { data: { project: { id: 'gid://gitlab/Project/8', incidentManagementTimelineEvents: { nodes: [], }, }, }, }; export const timelineEventsCreateEventResponse = { data: { timelineEventCreate: { timelineEvent: { ...mockEvents[0], }, errors: [], }, }, }; export const timelineEventsCreateEventError = { data: { timelineEventCreate: { timelineEvent: { ...mockEvents[0], }, errors: ['Create error'], }, }, }; const timelineEventDeleteData = (errors = []) => { return { data: { timelineEventDestroy: { timelineEvent: { ...mockEvents[0] }, errors, }, }, }; }; export const timelineEventsDeleteEventResponse = timelineEventDeleteData(); export const timelineEventsDeleteEventError = timelineEventDeleteData(['Item does not exist']); export const mockGetTimelineData = { project: { id: 'gid://gitlab/Project/19', incidentManagementTimelineEvents: { nodes: [ { id: 'gid://gitlab/IncidentManagement::TimelineEvent/8', note: 'another one2', noteHtml: '

another one2

', action: 'comment', occurredAt: '2022-07-01T12:47:00Z', createdAt: '2022-07-20T12:47:40Z', }, ], }, }, };