diff options
Diffstat (limited to 'spec/javascripts/pipelines/graph/graph_component_spec.js')
-rw-r--r-- | spec/javascripts/pipelines/graph/graph_component_spec.js | 103 |
1 files changed, 1 insertions, 102 deletions
diff --git a/spec/javascripts/pipelines/graph/graph_component_spec.js b/spec/javascripts/pipelines/graph/graph_component_spec.js index 024426acf05..6bd0eb86263 100644 --- a/spec/javascripts/pipelines/graph/graph_component_spec.js +++ b/spec/javascripts/pipelines/graph/graph_component_spec.js @@ -1,5 +1,6 @@ import Vue from 'vue'; import graphComponent from '~/pipelines/components/graph/graph_component.vue'; +import graphJSON from './mock_data'; describe('graph component', () => { preloadFixtures('static/graph.html.raw'); @@ -19,108 +20,6 @@ describe('graph component', () => { }); describe('with a successfull response', () => { - const graphJSON = { - details: { - stages: [{ - name: 'review', - title: 'review: passed', - groups: [{ - name: 'review_1', - size: 1, - 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', - }, - }, - 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', - }, - }, - }], - }, - { - name: 'test_1', - title: 'test_1: 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', - groups: [{ - name: 'test', - size: 1, - jobs: [{ - id: 4153, - name: 'test', - status: { - icon: 'icon_status_success', - text: 'passed', - label: 'passed', - details_path: '/root/ci-mock/builds/4153', - action: { - icon: 'icon_action_retry', - title: 'Retry', - path: '/root/ci-mock/builds/4153/retry', - method: 'post', - }, - }, - }], - }, { - name: 'test', - size: 1, - jobs: [{ - id: 4153, - name: 'test', - status: { - icon: 'icon_status_success', - text: 'passed', - label: 'passed', - details_path: '/root/ci-mock/builds/4153', - action: { - icon: 'icon_action_retry', - title: 'Retry', - path: '/root/ci-mock/builds/4153/retry', - method: 'post', - }, - }, - }], - }], - }], - }], - }, - }; - const interceptor = (request, next) => { next(request.respondWith(JSON.stringify(graphJSON), { status: 200, |