summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2017-05-09 22:29:33 +0000
committerFatih Acet <acetfatih@gmail.com>2017-05-09 22:29:33 +0000
commita353c96661e29f0e41937db8d937bccf705fffd2 (patch)
tree649fdfdc3c88404144c606da14984926a5f28463
parentecc6cc8be75b5c66fdf7f5595b71aabf9366a5e1 (diff)
parent4ff6cec29aa42ed03ba9ab6fe5a2c0aa8ed4c4c8 (diff)
downloadgitlab-ce-a353c96661e29f0e41937db8d937bccf705fffd2.tar.gz
Merge branch '32021-job-component-test-failure' into 'master'
Fix test failure in job vue componenFix test failure in job vue componentt Closes #32021 See merge request !11208
-rw-r--r--spec/javascripts/pipelines/graph/graph_component_spec.js74
1 files changed, 46 insertions, 28 deletions
diff --git a/spec/javascripts/pipelines/graph/graph_component_spec.js b/spec/javascripts/pipelines/graph/graph_component_spec.js
index a756617e65e..4acf71d8b4b 100644
--- a/spec/javascripts/pipelines/graph/graph_component_spec.js
+++ b/spec/javascripts/pipelines/graph/graph_component_spec.js
@@ -19,42 +19,60 @@ describe('graph component', () => {
});
describe('with a successfull response', () => {
- const interceptor = (request, next) => {
- next(request.respondWith(JSON.stringify({
- details: {
- stages: [{
- name: 'test',
- title: 'test: passed',
+ const graphJSON = {
+ details: {
+ stages: [{
+ name: 'review',
+ title: 'review: passed',
+ groups: [{
+ name: 'review_1',
+ size: 1,
status: {
icon: 'icon_status_success',
text: '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',
- 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',
- },
+ 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',
},
- }],
+ },
}],
}],
- },
- }), {
+ }],
+ },
+ };
+
+ const interceptor = (request, next) => {
+ next(request.respondWith(JSON.stringify(graphJSON), {
status: 200,
}));
};