Commit 4ff6cec2 authored by Filipa Lacerda's avatar Filipa Lacerda

Fix test failure in job vue componenFix test failure in job vue componentt

parent 387b4410
...@@ -19,42 +19,60 @@ describe('graph component', () => { ...@@ -19,42 +19,60 @@ describe('graph component', () => {
}); });
describe('with a successfull response', () => { describe('with a successfull response', () => {
const interceptor = (request, next) => { const graphJSON = {
next(request.respondWith(JSON.stringify({ details: {
details: { stages: [{
stages: [{ name: 'review',
name: 'test', title: 'review: passed',
title: 'test: passed', groups: [{
name: 'review_1',
size: 1,
status: { status: {
icon: 'icon_status_success', icon: 'icon_status_success',
text: 'passed', text: 'passed',
label: 'passed', label: 'passed',
details_path: '/root/ci-mock/pipelines/123#test', group: 'success',
has_details: true,
details_path: '/root/review-app/builds/4374',
favicon: '/assets/ci_favicons/dev/favicon_status_success-308b4fc054cdd1b68d0865e6cfb7b02e92e3472f201507418f8eddb74ac11a59.ico',
action: {
icon: 'icon_action_retry',
title: 'Retry',
path: '/root/review-app/builds/4374/retry',
method: 'post',
},
}, },
path: '/root/ci-mock/pipelines/123#test', jobs: [{
groups: [{ id: 4374,
name: 'test', name: 'review_1',
size: 1, build_path: '/root/review-app/builds/4374',
jobs: [{ retry_path: '/root/review-app/builds/4374/retry',
id: 4153, playable: false,
name: 'test', created_at: '2017-05-08T14:57:39.880Z',
status: { updated_at: '2017-05-08T14:57:52.639Z',
icon: 'icon_status_success', status: {
text: 'passed', icon: 'icon_status_success',
label: 'passed', text: 'passed',
details_path: '/root/ci-mock/builds/4153', label: 'passed',
action: { group: 'success',
icon: 'icon_action_retry', has_details: true,
title: 'Retry', details_path: '/root/review-app/builds/4374',
path: '/root/ci-mock/builds/4153/retry', favicon: '/assets/ci_favicons/dev/favicon_status_success-308b4fc054cdd1b68d0865e6cfb7b02e92e3472f201507418f8eddb74ac11a59.ico',
method: 'post', action: {
}, icon: 'icon_action_retry',
title: 'Retry',
path: '/root/review-app/builds/4374/retry',
method: 'post',
}, },
}], },
}], }],
}], }],
}, }],
}), { },
};
const interceptor = (request, next) => {
next(request.respondWith(JSON.stringify(graphJSON), {
status: 200, status: 200,
})); }));
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment