Fix test failure in job vue componenFix test failure in job vue componentt
This commit is contained in:
parent
387b44103c
commit
4ff6cec29a
1 changed files with 46 additions and 28 deletions
|
@ -19,34 +19,49 @@ describe('graph component', () => {
|
|||
});
|
||||
|
||||
describe('with a successfull response', () => {
|
||||
const interceptor = (request, next) => {
|
||||
next(request.respondWith(JSON.stringify({
|
||||
const graphJSON = {
|
||||
details: {
|
||||
stages: [{
|
||||
name: 'test',
|
||||
title: 'test: passed',
|
||||
status: {
|
||||
icon: 'icon_status_success',
|
||||
text: 'passed',
|
||||
label: 'passed',
|
||||
details_path: '/root/ci-mock/pipelines/123#test',
|
||||
},
|
||||
path: '/root/ci-mock/pipelines/123#test',
|
||||
name: 'review',
|
||||
title: 'review: passed',
|
||||
groups: [{
|
||||
name: 'test',
|
||||
name: 'review_1',
|
||||
size: 1,
|
||||
jobs: [{
|
||||
id: 4153,
|
||||
name: 'test',
|
||||
status: {
|
||||
icon: 'icon_status_success',
|
||||
text: 'passed',
|
||||
label: 'passed',
|
||||
details_path: '/root/ci-mock/builds/4153',
|
||||
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/ci-mock/builds/4153/retry',
|
||||
path: '/root/review-app/builds/4374/retry',
|
||||
method: 'post',
|
||||
},
|
||||
},
|
||||
jobs: [{
|
||||
id: 4374,
|
||||
name: 'review_1',
|
||||
build_path: '/root/review-app/builds/4374',
|
||||
retry_path: '/root/review-app/builds/4374/retry',
|
||||
playable: false,
|
||||
created_at: '2017-05-08T14:57:39.880Z',
|
||||
updated_at: '2017-05-08T14:57:52.639Z',
|
||||
status: {
|
||||
icon: 'icon_status_success',
|
||||
text: 'passed',
|
||||
label: 'passed',
|
||||
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',
|
||||
},
|
||||
},
|
||||
|
@ -54,7 +69,10 @@ describe('graph component', () => {
|
|||
}],
|
||||
}],
|
||||
},
|
||||
}), {
|
||||
};
|
||||
|
||||
const interceptor = (request, next) => {
|
||||
next(request.respondWith(JSON.stringify(graphJSON), {
|
||||
status: 200,
|
||||
}));
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue