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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
dd0806d0
Commit
dd0806d0
authored
Oct 11, 2018
by
Filipa Lacerda
Committed by
Mike Greiling
Oct 11, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix erased block not being rendered when job was erased
parent
e5ae0be4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
6 deletions
+23
-6
app/assets/javascripts/jobs/components/job_app.vue
app/assets/javascripts/jobs/components/job_app.vue
+2
-2
changelogs/unreleased/52570-erased-block.yml
changelogs/unreleased/52570-erased-block.yml
+5
-0
spec/features/projects/jobs_spec.rb
spec/features/projects/jobs_spec.rb
+13
-0
spec/javascripts/jobs/components/job_app_spec.js
spec/javascripts/jobs/components/job_app_spec.js
+3
-4
No files found.
app/assets/javascripts/jobs/components/job_app.vue
View file @
dd0806d0
...
...
@@ -87,8 +87,8 @@
/>
<erased-block
v-if=
"job.erased"
class=
"js-job-erased"
v-if=
"job.erased
_at
"
class=
"js-job-erased
-block
"
:user=
"job.erased_by"
:erased-at=
"job.erased_at"
/>
...
...
changelogs/unreleased/52570-erased-block.yml
0 → 100644
View file @
dd0806d0
---
title
:
Fix erased block not being rendered when job was erased
merge_request
:
22294
author
:
type
:
fixed
spec/features/projects/jobs_spec.rb
View file @
dd0806d0
...
...
@@ -663,6 +663,19 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
expect
(
page
).
to
have_content
(
'This job does not have a trace.'
)
end
end
context
'with erased job'
,
:js
do
let
(
:job
)
{
create
(
:ci_build
,
:erased
,
pipeline:
pipeline
)
}
it
'renders erased job warning'
do
visit
project_job_path
(
project
,
job
)
wait_for_requests
page
.
within
(
'.js-job-erased-block'
)
do
expect
(
page
).
to
have_content
(
'Job has been erased'
)
end
end
end
end
describe
"POST /:project/jobs/:id/cancel"
,
:js
do
...
...
spec/javascripts/jobs/components/job_app_spec.js
View file @
dd0806d0
...
...
@@ -223,7 +223,6 @@ describe('Job App ', () => {
store
.
dispatch
(
'
receiveJobSuccess
'
,
Object
.
assign
({},
job
,
{
erased
:
true
,
erased_by
:
{
username
:
'
root
'
,
web_url
:
'
gitlab.com/root
'
,
...
...
@@ -237,18 +236,18 @@ describe('Job App ', () => {
store
,
});
expect
(
vm
.
$el
.
querySelector
(
'
.js-job-erased
'
)).
not
.
toBeNull
();
expect
(
vm
.
$el
.
querySelector
(
'
.js-job-erased
-block
'
)).
not
.
toBeNull
();
});
it
(
'
does not render erased block when `erased` is false
'
,
()
=>
{
store
.
dispatch
(
'
receiveJobSuccess
'
,
Object
.
assign
({},
job
,
{
erased
:
false
}));
store
.
dispatch
(
'
receiveJobSuccess
'
,
Object
.
assign
({},
job
,
{
erased
_at
:
null
}));
vm
=
mountComponentWithStore
(
Component
,
{
props
,
store
,
});
expect
(
vm
.
$el
.
querySelector
(
'
.js-job-erased
'
)).
toBeNull
();
expect
(
vm
.
$el
.
querySelector
(
'
.js-job-erased
-block
'
)).
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