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
929824d3
Commit
929824d3
authored
Sep 21, 2021
by
Sam Beckham
Committed by
Miguel Rincon
Sep 21, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevents child pipelines from rendering incorrectly on hover
parent
3777d380
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
4 deletions
+68
-4
app/assets/javascripts/pipelines/components/graph/job_item.vue
...ssets/javascripts/pipelines/components/graph/job_item.vue
+8
-4
spec/frontend/pipelines/graph/job_item_spec.js
spec/frontend/pipelines/graph/job_item_spec.js
+60
-0
No files found.
app/assets/javascripts/pipelines/components/graph/job_item.vue
View file @
929824d3
...
@@ -52,7 +52,7 @@ export default {
...
@@ -52,7 +52,7 @@ export default {
required
:
true
,
required
:
true
,
},
},
cssClassJobName
:
{
cssClassJobName
:
{
type
:
[
String
,
Array
],
type
:
[
String
,
Array
,
Object
],
required
:
false
,
required
:
false
,
default
:
''
,
default
:
''
,
},
},
...
@@ -167,9 +167,13 @@ export default {
...
@@ -167,9 +167,13 @@ export default {
return
this
.
job
.
name
===
this
.
pipelineExpanded
.
jobName
&&
this
.
pipelineExpanded
.
expanded
;
return
this
.
job
.
name
===
this
.
pipelineExpanded
.
jobName
&&
this
.
pipelineExpanded
.
expanded
;
},
},
jobClasses
()
{
jobClasses
()
{
return
this
.
relatedDownstreamHovered
||
this
.
relatedDownstreamExpanded
return
[
?
`
${
this
.
$options
.
hoverClass
}
${
this
.
cssClassJobName
}
`
{
:
this
.
cssClassJobName
;
[
this
.
$options
.
hoverClass
]:
this
.
relatedDownstreamHovered
||
this
.
relatedDownstreamExpanded
,
},
this
.
cssClassJobName
,
];
},
},
},
},
errorCaptured
(
err
,
_vm
,
info
)
{
errorCaptured
(
err
,
_vm
,
info
)
{
...
...
spec/frontend/pipelines/graph/job_item_spec.js
View file @
929824d3
...
@@ -205,4 +205,64 @@ describe('pipeline graph job item', () => {
...
@@ -205,4 +205,64 @@ describe('pipeline graph job item', () => {
},
},
);
);
});
});
describe
(
'
job classes
'
,
()
=>
{
it
(
'
job class is shown
'
,
()
=>
{
createWrapper
({
job
:
mockJob
,
cssClassJobName
:
'
my-class
'
,
});
expect
(
wrapper
.
find
(
'
a
'
).
classes
()).
toContain
(
'
my-class
'
);
expect
(
wrapper
.
find
(
'
a
'
).
classes
()).
not
.
toContain
(
triggerActiveClass
);
});
it
(
'
job class is shown, along with hover
'
,
()
=>
{
createWrapper
({
job
:
mockJob
,
cssClassJobName
:
'
my-class
'
,
sourceJobHovered
:
mockJob
.
name
,
});
expect
(
wrapper
.
find
(
'
a
'
).
classes
()).
toContain
(
'
my-class
'
);
expect
(
wrapper
.
find
(
'
a
'
).
classes
()).
toContain
(
triggerActiveClass
);
});
it
(
'
multiple job classes are shown
'
,
()
=>
{
createWrapper
({
job
:
mockJob
,
cssClassJobName
:
[
'
my-class-1
'
,
'
my-class-2
'
],
});
expect
(
wrapper
.
find
(
'
a
'
).
classes
()).
toContain
(
'
my-class-1
'
);
expect
(
wrapper
.
find
(
'
a
'
).
classes
()).
toContain
(
'
my-class-2
'
);
expect
(
wrapper
.
find
(
'
a
'
).
classes
()).
not
.
toContain
(
triggerActiveClass
);
});
it
(
'
multiple job classes are shown conditionally
'
,
()
=>
{
createWrapper
({
job
:
mockJob
,
cssClassJobName
:
{
'
my-class-1
'
:
true
,
'
my-class-2
'
:
true
},
});
expect
(
wrapper
.
find
(
'
a
'
).
classes
()).
toContain
(
'
my-class-1
'
);
expect
(
wrapper
.
find
(
'
a
'
).
classes
()).
toContain
(
'
my-class-2
'
);
expect
(
wrapper
.
find
(
'
a
'
).
classes
()).
not
.
toContain
(
triggerActiveClass
);
});
it
(
'
multiple job classes are shown, along with a hover
'
,
()
=>
{
createWrapper
({
job
:
mockJob
,
cssClassJobName
:
[
'
my-class-1
'
,
'
my-class-2
'
],
sourceJobHovered
:
mockJob
.
name
,
});
expect
(
wrapper
.
find
(
'
a
'
).
classes
()).
toContain
(
'
my-class-1
'
);
expect
(
wrapper
.
find
(
'
a
'
).
classes
()).
toContain
(
'
my-class-2
'
);
expect
(
wrapper
.
find
(
'
a
'
).
classes
()).
toContain
(
triggerActiveClass
);
});
});
});
});
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