summaryrefslogtreecommitdiff
path: root/spec/frontend/packages/list/coming_soon/mock_data.js
blob: bb4568e4bd5a7607d604f99579d80bc0aabe9c70 (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
export const fakeIssues = [
  {
    id: 1,
    iid: 1,
    title: 'issue one',
    webUrl: 'foo',
  },
  {
    id: 2,
    iid: 2,
    title: 'issue two',
    labels: [{ title: 'Accepting merge requests', color: '#69d100' }],
    milestone: {
      title: '12.10',
    },
    webUrl: 'foo',
  },
  {
    id: 3,
    iid: 3,
    title: 'issue three',
    labels: [{ title: 'workflow::In dev', color: '#428bca' }],
    webUrl: 'foo',
  },
  {
    id: 4,
    iid: 4,
    title: 'issue four',
    labels: [
      { title: 'Accepting merge requests', color: '#69d100' },
      { title: 'workflow::In dev', color: '#428bca' },
    ],
    webUrl: 'foo',
  },
];

export const asGraphQLResponse = {
  project: {
    issues: {
      nodes: fakeIssues.map(x => ({
        ...x,
        labels: {
          nodes: x.labels,
        },
      })),
    },
  },
};

export const asViewModel = [
  {
    ...fakeIssues[0],
    labels: [],
  },
  {
    ...fakeIssues[1],
    labels: [
      {
        title: 'Accepting merge requests',
        color: '#69d100',
        scoped: false,
      },
    ],
  },
  {
    ...fakeIssues[2],
    labels: [
      {
        title: 'workflow::In dev',
        color: '#428bca',
        scoped: true,
      },
    ],
  },
  {
    ...fakeIssues[3],
    labels: [
      {
        title: 'workflow::In dev',
        color: '#428bca',
        scoped: true,
      },
      {
        title: 'Accepting merge requests',
        color: '#69d100',
        scoped: false,
      },
    ],
  },
];