gitlab-org--gitlab-foss/spec/javascripts/ide/mock_data.js

198 lines
3.3 KiB
JavaScript
Raw Normal View History

2018-04-17 15:27:46 +00:00
export const projectData = {
id: 1,
name: 'abcproject',
web_url: '',
avatar_url: '',
path: '',
name_with_namespace: 'namespace/abcproject',
2018-04-17 15:27:46 +00:00
branches: {
master: {
treeId: 'abcproject/master',
2018-06-25 10:22:46 +00:00
can_push: true,
commit: {
id: '123',
},
2018-04-17 15:27:46 +00:00
},
},
2018-05-03 14:12:56 +00:00
mergeRequests: {},
merge_requests_enabled: true,
2018-04-17 15:27:46 +00:00
};
2018-05-11 16:27:09 +00:00
export const pipelines = [
{
id: 1,
ref: 'master',
sha: '123',
2018-05-29 12:09:19 +00:00
details: {
status: {
icon: 'status_failed',
group: 'failed',
text: 'Failed',
},
},
2018-05-29 09:35:13 +00:00
commit: { id: '123' },
2018-05-11 16:27:09 +00:00
},
{
id: 2,
ref: 'master',
sha: '213',
2018-05-29 12:09:19 +00:00
details: {
status: {
icon: 'status_failed',
group: 'failed',
text: 'Failed',
},
},
2018-05-29 09:35:13 +00:00
commit: { id: '213' },
2018-05-11 16:27:09 +00:00
},
];
2018-05-24 14:07:09 +00:00
export const stages = [
{
2018-05-29 12:09:19 +00:00
dropdown_path: `${gl.TEST_HOST}/testing`,
2018-05-24 14:07:09 +00:00
name: 'build',
status: {
icon: 'status_failed',
group: 'failed',
2018-05-29 12:09:19 +00:00
text: 'failed',
2018-05-24 14:07:09 +00:00
},
},
{
dropdown_path: 'testing',
name: 'test',
status: {
icon: 'status_failed',
group: 'failed',
2018-05-29 12:09:19 +00:00
text: 'failed',
2018-05-24 14:07:09 +00:00
},
2018-05-11 16:27:09 +00:00
},
];
export const jobs = [
{
id: 1,
name: 'test',
2018-05-29 12:09:19 +00:00
path: 'testing',
status: {
2018-07-18 16:56:19 +00:00
icon: 'status_success',
2018-05-29 12:09:19 +00:00
text: 'passed',
},
2018-05-11 16:27:09 +00:00
stage: 'test',
duration: 1,
2018-06-01 13:44:22 +00:00
started: new Date(),
2018-05-11 16:27:09 +00:00
},
{
id: 2,
name: 'test 2',
2018-05-29 12:09:19 +00:00
path: 'testing2',
status: {
2018-07-18 16:56:19 +00:00
icon: 'status_success',
2018-05-29 12:09:19 +00:00
text: 'passed',
},
2018-05-11 16:27:09 +00:00
stage: 'test',
duration: 1,
2018-06-01 13:44:22 +00:00
started: new Date(),
2018-05-11 16:27:09 +00:00
},
{
id: 3,
name: 'test 3',
2018-05-29 12:09:19 +00:00
path: 'testing3',
status: {
2018-07-18 16:56:19 +00:00
icon: 'status_success',
2018-05-29 12:09:19 +00:00
text: 'passed',
},
2018-05-11 16:27:09 +00:00
stage: 'test',
duration: 1,
2018-06-01 13:44:22 +00:00
started: new Date(),
2018-05-11 16:27:09 +00:00
},
2018-05-14 15:30:52 +00:00
{
id: 4,
2018-05-29 12:09:19 +00:00
name: 'test 4',
path: 'testing4',
status: {
icon: 'status_failed',
text: 'failed',
},
2018-05-14 15:30:52 +00:00
stage: 'build',
duration: 1,
2018-06-01 13:44:22 +00:00
started: new Date(),
2018-05-14 15:30:52 +00:00
},
2018-05-11 16:27:09 +00:00
];
export const fullPipelinesResponse = {
data: {
count: {
all: 2,
},
pipelines: [
{
id: '51',
2018-05-25 15:00:00 +00:00
path: 'test',
commit: {
2018-05-25 15:00:00 +00:00
id: '123',
},
details: {
status: {
icon: 'status_failed',
text: 'failed',
},
2018-05-25 15:00:00 +00:00
stages: [...stages],
},
},
{
id: '50',
commit: {
id: 'abc123def456ghi789jkl',
},
details: {
status: {
2018-07-18 16:56:19 +00:00
icon: 'status_success',
text: 'passed',
},
2018-05-25 15:00:00 +00:00
stages: [...stages],
},
},
],
},
};
export const mergeRequests = [
{
id: 1,
iid: 1,
title: 'Test merge request',
project_id: 1,
web_url: `${gl.TEST_HOST}/namespace/project-path/merge_requests/1`,
},
];
2018-08-07 15:15:56 +00:00
export const branches = [
{
id: 1,
name: 'master',
commit: {
message: 'Update master branch',
committed_date: '2018-08-01T00:20:05Z',
},
can_push: true,
},
{
id: 2,
name: 'feature/lorem-ipsum',
commit: {
message: 'Update some stuff',
committed_date: '2018-08-02T00:00:05Z',
},
can_push: true,
},
{
id: 3,
name: 'feature/dolar-amit',
commit: {
message: 'Update some more stuff',
committed_date: '2018-06-30T00:20:05Z',
},
can_push: true,
},
];