Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
410f0587
Commit
410f0587
authored
Mar 11, 2019
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moves EE specific tests into EE file for mr_widget_pipeline_spec
parent
cfad789e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
39 deletions
+58
-39
ee/spec/javascripts/vue_mr_widget/mr_widget_pipeline_spec.js
ee/spec/javascripts/vue_mr_widget/mr_widget_pipeline_spec.js
+58
-0
spec/javascripts/vue_mr_widget/components/mr_widget_pipeline_spec.js
...ripts/vue_mr_widget/components/mr_widget_pipeline_spec.js
+0
-39
No files found.
ee/spec/javascripts/vue_mr_widget/mr_widget_pipeline_spec.js
0 → 100644
View file @
410f0587
import
Vue
from
'
vue
'
;
import
pipelineComponent
from
'
~/vue_merge_request_widget/components/mr_widget_pipeline.vue
'
;
import
mountComponent
from
'
spec/helpers/vue_mount_component_helper
'
;
import
mockData
from
'
spec/vue_mr_widget/mock_data
'
;
import
mockLinkedPipelines
from
'
ee_spec/pipelines/graph/linked_pipelines_mock_data
'
;
describe
(
'
MRWidgetPipeline
'
,
()
=>
{
let
vm
;
let
Component
;
beforeEach
(()
=>
{
Component
=
Vue
.
extend
(
pipelineComponent
);
});
afterEach
(()
=>
{
vm
.
$destroy
();
});
describe
(
'
computed
'
,
()
=>
{
describe
(
'
when upstream pipelines are passed
'
,
()
=>
{
beforeEach
(()
=>
{
vm
=
mountComponent
(
Component
,
{
pipeline
:
Object
.
assign
({},
mockData
.
pipeline
,
{
triggered_by
:
mockLinkedPipelines
.
triggered_by
,
}),
hasCi
:
true
,
ciStatus
:
'
success
'
,
troubleshootingDocsPath
:
'
help
'
,
});
});
it
(
'
should coerce triggeredBy into a collection
'
,
()
=>
{
expect
(
vm
.
triggeredBy
.
length
).
toBe
(
1
);
});
it
(
'
should render the linked pipelines mini list
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.linked-pipeline-mini-list.is-upstream
'
)).
not
.
toBeNull
();
});
});
describe
(
'
when downstream pipelines are passed
'
,
()
=>
{
beforeEach
(()
=>
{
vm
=
mountComponent
(
Component
,
{
pipeline
:
Object
.
assign
({},
mockData
.
pipeline
,
{
triggered
:
mockLinkedPipelines
.
triggered
,
}),
hasCi
:
true
,
ciStatus
:
'
success
'
,
troubleshootingDocsPath
:
'
help
'
,
});
});
it
(
'
should render the linked pipelines mini list
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.linked-pipeline-mini-list.is-downstream
'
)).
not
.
toBeNull
();
});
});
});
});
spec/javascripts/vue_mr_widget/components/mr_widget_pipeline_spec.js
View file @
410f0587
...
...
@@ -2,7 +2,6 @@ import Vue from 'vue';
import
pipelineComponent
from
'
~/vue_merge_request_widget/components/mr_widget_pipeline.vue
'
;
import
mountComponent
from
'
spec/helpers/vue_mount_component_helper
'
;
import
mockData
from
'
../mock_data
'
;
import
mockLinkedPipelines
from
'
ee_spec/pipelines/graph/linked_pipelines_mock_data
'
;
// eslint-disable-line import/order
describe
(
'
MRWidgetPipeline
'
,
()
=>
{
let
vm
;
...
...
@@ -194,43 +193,5 @@ describe('MRWidgetPipeline', () => {
expect
(
vm
.
$el
.
querySelector
(
'
.js-mini-pipeline-graph
'
)).
toEqual
(
null
);
});
});
describe
(
'
when upstream pipelines are passed
'
,
()
=>
{
beforeEach
(()
=>
{
vm
=
mountComponent
(
Component
,
{
pipeline
:
Object
.
assign
({},
mockData
.
pipeline
,
{
triggered_by
:
mockLinkedPipelines
.
triggered_by
,
}),
hasCi
:
true
,
ciStatus
:
'
success
'
,
troubleshootingDocsPath
:
'
help
'
,
});
});
it
(
'
should coerce triggeredBy into a collection
'
,
()
=>
{
expect
(
vm
.
triggeredBy
.
length
).
toBe
(
1
);
});
it
(
'
should render the linked pipelines mini list
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.linked-pipeline-mini-list.is-upstream
'
)).
not
.
toBeNull
();
});
});
describe
(
'
when downstream pipelines are passed
'
,
()
=>
{
beforeEach
(()
=>
{
vm
=
mountComponent
(
Component
,
{
pipeline
:
Object
.
assign
({},
mockData
.
pipeline
,
{
triggered
:
mockLinkedPipelines
.
triggered
,
}),
hasCi
:
true
,
ciStatus
:
'
success
'
,
troubleshootingDocsPath
:
'
help
'
,
});
});
it
(
'
should render the linked pipelines mini list
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.linked-pipeline-mini-list.is-downstream
'
)).
not
.
toBeNull
();
});
});
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment