summaryrefslogtreecommitdiff
path: root/spec/frontend/sidebar/components/time_tracking/mock_data.js
blob: 3f1b3fa8ec1920ff7597bff30b06b68ad1c11907 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
export const getIssueTimelogsQueryResponse = {
  data: {
    issuable: {
      __typename: 'Issue',
      id: 'gid://gitlab/Issue/148',
      title:
        'Est perferendis dicta expedita ipsum adipisci laudantium omnis consequatur consequatur et.',
      timelogs: {
        nodes: [
          {
            __typename: 'Timelog',
            timeSpent: 14400,
            user: {
              id: 'user-1',
              name: 'John Doe18',
              __typename: 'UserCore',
            },
            spentAt: '2020-05-01T00:00:00Z',
            note: {
              id: 'note-1',
              body: 'A note',
              __typename: 'Note',
            },
            summary: 'A summary',
          },
          {
            __typename: 'Timelog',
            timeSpent: 1800,
            user: {
              id: 'user-2',
              name: 'Administrator',
              __typename: 'UserCore',
            },
            spentAt: '2021-05-07T13:19:01Z',
            note: null,
            summary: 'A summary',
          },
          {
            __typename: 'Timelog',
            timeSpent: 14400,
            user: {
              id: 'user-2',
              name: 'Administrator',
              __typename: 'UserCore',
            },
            spentAt: '2021-05-01T00:00:00Z',
            note: {
              id: 'note-2',
              body: 'A note',
              __typename: 'Note',
            },
            summary: null,
          },
        ],
        __typename: 'TimelogConnection',
      },
    },
  },
};

export const getMrTimelogsQueryResponse = {
  data: {
    issuable: {
      __typename: 'MergeRequest',
      id: 'gid://gitlab/MergeRequest/29',
      title: 'Esse amet perspiciatis voluptas et sed praesentium debitis repellat.',
      timelogs: {
        nodes: [
          {
            __typename: 'Timelog',
            timeSpent: 1800,
            user: {
              id: 'user-1',
              name: 'Administrator',
              __typename: 'UserCore',
            },
            spentAt: '2021-05-07T14:44:55Z',
            note: {
              id: 'note-1',
              body: 'Thirty minutes!',
              __typename: 'Note',
            },
            summary: null,
          },
          {
            __typename: 'Timelog',
            timeSpent: 3600,
            user: {
              id: 'user-1',
              name: 'Administrator',
              __typename: 'UserCore',
            },
            spentAt: '2021-05-07T14:44:39Z',
            note: null,
            summary: null,
          },
          {
            __typename: 'Timelog',
            timeSpent: 300,
            user: {
              id: 'user-1',
              name: 'Administrator',
              __typename: 'UserCore',
            },
            spentAt: '2021-03-10T00:00:00Z',
            note: {
              id: 'note-2',
              body: 'A note with some time',
              __typename: 'Note',
            },
            summary: null,
          },
        ],
        __typename: 'TimelogConnection',
      },
    },
  },
};