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
3161047b
Commit
3161047b
authored
Sep 03, 2020
by
pburdette
Committed by
Kamil Trzciński
Sep 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change dynamic class
Move dynamic class to job with link and update specs.
parent
616b8ea0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
app/assets/javascripts/pipelines/components/graph/job_item.vue
...ssets/javascripts/pipelines/components/graph/job_item.vue
+3
-2
spec/frontend/pipelines/graph/job_item_spec.js
spec/frontend/pipelines/graph/job_item_spec.js
+6
-6
No files found.
app/assets/javascripts/pipelines/components/graph/job_item.vue
View file @
3161047b
...
...
@@ -132,8 +132,9 @@ export default {
v-gl-tooltip=
"
{ boundary, placement: 'bottom' }"
:href="status.details_path"
:title="tooltipText"
:class="
cssClassJobName
"
:class="
jobClasses
"
class="js-pipeline-graph-job-link qa-job-link menu-item"
data-testid="job-with-link"
>
<job-name-component
:name=
"job.name"
:status=
"job.status"
/>
</gl-link>
...
...
@@ -142,7 +143,7 @@ export default {
v-else
v-gl-tooltip=
"
{ boundary, placement: 'bottom' }"
:title="tooltipText"
:class="
jobClasses
"
:class="
cssClassJobName
"
class="js-job-component-tooltip non-details-job-component"
data-testid="job-without-link"
>
...
...
spec/frontend/pipelines/graph/job_item_spec.js
View file @
3161047b
...
...
@@ -6,6 +6,7 @@ describe('pipeline graph job item', () => {
let
wrapper
;
const
findJobWithoutLink
=
()
=>
wrapper
.
find
(
'
[data-testid="job-without-link"]
'
);
const
findJobWithLink
=
()
=>
wrapper
.
find
(
'
[data-testid="job-with-link"]
'
);
const
createWrapper
=
propsData
=>
{
wrapper
=
mount
(
JobItem
,
{
...
...
@@ -88,7 +89,6 @@ describe('pipeline graph job item', () => {
});
it
(
'
should apply hover class and provided class name
'
,
()
=>
{
expect
(
findJobWithoutLink
().
classes
()).
toContain
(
triggerActiveClass
);
expect
(
findJobWithoutLink
().
classes
()).
toContain
(
'
css-class-job-name
'
);
});
});
...
...
@@ -151,7 +151,7 @@ describe('pipeline graph job item', () => {
job
:
delayedJobFixture
,
});
expect
(
wrapper
.
find
(
'
.js-pipeline-graph-job-link
'
).
attributes
(
'
title
'
)).
toEqual
(
expect
(
findJobWithLink
(
).
attributes
(
'
title
'
)).
toEqual
(
`delayed job - delayed manual action (
${
wrapper
.
vm
.
remainingTime
}
)`
,
);
});
...
...
@@ -160,20 +160,20 @@ describe('pipeline graph job item', () => {
describe
(
'
trigger job highlighting
'
,
()
=>
{
it
(
'
trigger job should stay highlighted when downstream is expanded
'
,
()
=>
{
createWrapper
({
job
:
mockJob
WithoutDetails
,
job
:
mockJob
,
pipelineExpanded
:
{
jobName
:
mockJob
.
name
,
expanded
:
true
},
});
expect
(
findJobWith
out
Link
().
classes
()).
toContain
(
triggerActiveClass
);
expect
(
findJobWithLink
().
classes
()).
toContain
(
triggerActiveClass
);
});
it
(
'
trigger job should not be highlighted when downstream is closed
'
,
()
=>
{
createWrapper
({
job
:
mockJob
WithoutDetails
,
job
:
mockJob
,
pipelineExpanded
:
{
jobName
:
mockJob
.
name
,
expanded
:
false
},
});
expect
(
findJobWith
out
Link
().
classes
()).
not
.
toContain
(
triggerActiveClass
);
expect
(
findJobWithLink
().
classes
()).
not
.
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