summaryrefslogtreecommitdiff
path: root/spec/javascripts/pipelines/graph
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2017-05-09 22:30:58 +0000
committerFatih Acet <acetfatih@gmail.com>2017-05-09 22:30:58 +0000
commitb2fc6326f2b893c67c2ed33ebbbfe113ecef1641 (patch)
tree3fa191fb7437b9cfe4e9ff26c266adf7b7d0c76b /spec/javascripts/pipelines/graph
parenta353c96661e29f0e41937db8d937bccf705fffd2 (diff)
parent0c3abe3ef92fe4d982b780397e8ace37a51aca45 (diff)
downloadgitlab-ce-b2fc6326f2b893c67c2ed33ebbbfe113ecef1641.tar.gz
Merge branch '31053-pipeline-ux' into 'master'
Adds left connector class to the rendered graph Closes #31053 See merge request !11179
Diffstat (limited to 'spec/javascripts/pipelines/graph')
-rw-r--r--spec/javascripts/pipelines/graph/graph_component_spec.js62
1 files changed, 62 insertions, 0 deletions
diff --git a/spec/javascripts/pipelines/graph/graph_component_spec.js b/spec/javascripts/pipelines/graph/graph_component_spec.js
index 4acf71d8b4b..024426acf05 100644
--- a/spec/javascripts/pipelines/graph/graph_component_spec.js
+++ b/spec/javascripts/pipelines/graph/graph_component_spec.js
@@ -66,6 +66,56 @@ describe('graph component', () => {
},
},
}],
+ },
+ {
+ 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',
+ },
+ },
+ }],
+ }],
}],
}],
},
@@ -91,6 +141,18 @@ describe('graph component', () => {
setTimeout(() => {
expect(component.$el.classList.contains('js-pipeline-graph')).toEqual(true);
+ expect(
+ component.$el.querySelector('.stage-column:first-child').classList.contains('no-margin'),
+ ).toEqual(true);
+
+ expect(
+ component.$el.querySelector('.stage-column:nth-child(2)').classList.contains('left-margin'),
+ ).toEqual(true);
+
+ expect(
+ component.$el.querySelector('.stage-column:nth-child(2) .build:nth-child(1)').classList.contains('left-connector'),
+ ).toEqual(true);
+
expect(component.$el.querySelector('loading-icon')).toBe(null);
expect(component.$el.querySelector('.stage-column-list')).toBeDefined();