Welcome to mirror list, hosted at ThFree Co, Russian Federation.

mock_data.js « new « issues « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 74b569d9833a2ac744a4509df3fb4765c92af6c9 (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
import { TEST_HOST } from 'helpers/test_constants';

function getDate(daysMinus) {
  const today = new Date();
  today.setDate(today.getDate() - daysMinus);

  return today.toISOString();
}

export default () => ({
  id: 1,
  iid: 1,
  state: 'opened',
  upvotes: 1,
  userNotesCount: 2,
  closedAt: getDate(1),
  createdAt: getDate(3),
  updatedAt: getDate(2),
  confidential: false,
  webUrl: `${TEST_HOST}/test/issue/1`,
  title: 'Test issue',
  author: {
    avatarUrl: `${TEST_HOST}/avatar`,
    name: 'Author Name',
    username: 'author.username',
    webUrl: `${TEST_HOST}/author`,
  },
});