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
89222e3e
Commit
89222e3e
authored
Apr 23, 2021
by
Sarah Groff Hennigh-Palermo
Committed by
Phil Hughes
Apr 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add check in linked graphs
parent
2c361e2b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
2 deletions
+25
-2
app/assets/javascripts/pipelines/components/graph/linked_pipelines_column.vue
...ts/pipelines/components/graph/linked_pipelines_column.vue
+5
-2
spec/frontend/pipelines/graph/linked_pipelines_column_spec.js
.../frontend/pipelines/graph/linked_pipelines_column_spec.js
+20
-0
No files found.
app/assets/javascripts/pipelines/components/graph/linked_pipelines_column.vue
View file @
89222e3e
...
...
@@ -3,7 +3,7 @@ import getPipelineDetails from 'shared_queries/pipelines/get_pipeline_details.qu
import
{
LOAD_FAILURE
}
from
'
../../constants
'
;
import
{
reportToSentry
}
from
'
../../utils
'
;
import
{
listByLayers
}
from
'
../parsing_utils
'
;
import
{
ONE_COL_WIDTH
,
UPSTREAM
,
LAYER_VIEW
}
from
'
./constants
'
;
import
{
ONE_COL_WIDTH
,
UPSTREAM
,
LAYER_VIEW
,
STAGE_VIEW
}
from
'
./constants
'
;
import
LinkedPipeline
from
'
./linked_pipeline.vue
'
;
import
{
getQueryHeaders
,
...
...
@@ -80,6 +80,9 @@ export default {
graphPosition
()
{
return
this
.
isUpstream
?
'
left
'
:
'
right
'
;
},
graphViewType
()
{
return
this
.
currentPipeline
?.
usesNeeds
?
this
.
viewType
:
STAGE_VIEW
;
},
isUpstream
()
{
return
this
.
type
===
UPSTREAM
;
},
...
...
@@ -223,7 +226,7 @@ export default {
:pipeline-layers=
"getPipelineLayers(pipeline.id)"
:show-links=
"showLinks"
:is-linked-pipeline=
"true"
:view-type=
"
v
iewType"
:view-type=
"
graphV
iewType"
/>
</div>
</li>
...
...
spec/frontend/pipelines/graph/linked_pipelines_column_spec.js
View file @
89222e3e
...
...
@@ -121,6 +121,26 @@ describe('Linked Pipelines Column', () => {
});
});
describe
(
'
when graph does not use needs
'
,
()
=>
{
beforeEach
(()
=>
{
const
nonNeedsResponse
=
{
...
wrappedPipelineReturn
};
nonNeedsResponse
.
data
.
project
.
pipeline
.
usesNeeds
=
false
;
createComponentWithApollo
({
props
:
{
viewType
:
LAYER_VIEW
,
},
getPipelineDetailsHandler
:
jest
.
fn
().
mockResolvedValue
(
nonNeedsResponse
),
mountFn
:
mount
,
});
});
it
(
'
shows the stage view, even when the main graph view type is layers
'
,
async
()
=>
{
await
clickExpandButtonAndAwaitTimers
();
expect
(
findPipelineGraph
().
props
(
'
viewType
'
)).
toBe
(
STAGE_VIEW
);
});
});
describe
(
'
downstream
'
,
()
=>
{
describe
(
'
when successful
'
,
()
=>
{
beforeEach
(()
=>
{
...
...
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