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 {
...
@@ -132,8 +132,9 @@ export default {
v-gl-tooltip=
"
{ boundary, placement: 'bottom' }"
v-gl-tooltip=
"
{ boundary, placement: 'bottom' }"
:href="status.details_path"
:href="status.details_path"
:title="tooltipText"
:title="tooltipText"
:class="
cssClassJobName
"
:class="
jobClasses
"
class="js-pipeline-graph-job-link qa-job-link menu-item"
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"
/>
<job-name-component
:name=
"job.name"
:status=
"job.status"
/>
</gl-link>
</gl-link>
...
@@ -142,7 +143,7 @@ export default {
...
@@ -142,7 +143,7 @@ export default {
v-else
v-else
v-gl-tooltip=
"
{ boundary, placement: 'bottom' }"
v-gl-tooltip=
"
{ boundary, placement: 'bottom' }"
:title="tooltipText"
:title="tooltipText"
:class="
jobClasses
"
:class="
cssClassJobName
"
class="js-job-component-tooltip non-details-job-component"
class="js-job-component-tooltip non-details-job-component"
data-testid="job-without-link"
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', () => {
...
@@ -6,6 +6,7 @@ describe('pipeline graph job item', () => {
let
wrapper
;
let
wrapper
;
const
findJobWithoutLink
=
()
=>
wrapper
.
find
(
'
[data-testid="job-without-link"]
'
);
const
findJobWithoutLink
=
()
=>
wrapper
.
find
(
'
[data-testid="job-without-link"]
'
);
const
findJobWithLink
=
()
=>
wrapper
.
find
(
'
[data-testid="job-with-link"]
'
);
const
createWrapper
=
propsData
=>
{
const
createWrapper
=
propsData
=>
{
wrapper
=
mount
(
JobItem
,
{
wrapper
=
mount
(
JobItem
,
{
...
@@ -88,7 +89,6 @@ describe('pipeline graph job item', () => {
...
@@ -88,7 +89,6 @@ describe('pipeline graph job item', () => {
});
});
it
(
'
should apply hover class and provided class name
'
,
()
=>
{
it
(
'
should apply hover class and provided class name
'
,
()
=>
{
expect
(
findJobWithoutLink
().
classes
()).
toContain
(
triggerActiveClass
);
expect
(
findJobWithoutLink
().
classes
()).
toContain
(
'
css-class-job-name
'
);
expect
(
findJobWithoutLink
().
classes
()).
toContain
(
'
css-class-job-name
'
);
});
});
});
});
...
@@ -151,7 +151,7 @@ describe('pipeline graph job item', () => {
...
@@ -151,7 +151,7 @@ describe('pipeline graph job item', () => {
job
:
delayedJobFixture
,
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
}
)`
,
`delayed job - delayed manual action (
${
wrapper
.
vm
.
remainingTime
}
)`
,
);
);
});
});
...
@@ -160,20 +160,20 @@ describe('pipeline graph job item', () => {
...
@@ -160,20 +160,20 @@ describe('pipeline graph job item', () => {
describe
(
'
trigger job highlighting
'
,
()
=>
{
describe
(
'
trigger job highlighting
'
,
()
=>
{
it
(
'
trigger job should stay highlighted when downstream is expanded
'
,
()
=>
{
it
(
'
trigger job should stay highlighted when downstream is expanded
'
,
()
=>
{
createWrapper
({
createWrapper
({
job
:
mockJob
WithoutDetails
,
job
:
mockJob
,
pipelineExpanded
:
{
jobName
:
mockJob
.
name
,
expanded
:
true
},
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
'
,
()
=>
{
it
(
'
trigger job should not be highlighted when downstream is closed
'
,
()
=>
{
createWrapper
({
createWrapper
({
job
:
mockJob
WithoutDetails
,
job
:
mockJob
,
pipelineExpanded
:
{
jobName
:
mockJob
.
name
,
expanded
:
false
},
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