debian-mirror-gitlab/spec/frontend/issues/new/mock_data.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
599 B
JavaScript
Raw Normal View History

2021-03-08 18:12:59 +05:30
import { TEST_HOST } from 'helpers/test_constants';
2020-07-28 23:09:34 +05:30
2019-02-15 15:39:39 +05:30
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,
2020-07-28 23:09:34 +05:30
webUrl: `${TEST_HOST}/test/issue/1`,
2019-02-15 15:39:39 +05:30
title: 'Test issue',
author: {
2020-07-28 23:09:34 +05:30
avatarUrl: `${TEST_HOST}/avatar`,
2019-02-15 15:39:39 +05:30
name: 'Author Name',
username: 'author.username',
2020-07-28 23:09:34 +05:30
webUrl: `${TEST_HOST}/author`,
2019-02-15 15:39:39 +05:30
},
});