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
f765daa7
Commit
f765daa7
authored
Jan 12, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sets method post for playing action
Removes explanation text for non triggered job Adds tests
parent
f9579df8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
app/views/projects/jobs/_empty_state.html.haml
app/views/projects/jobs/_empty_state.html.haml
+3
-2
app/views/projects/jobs/show.html.haml
app/views/projects/jobs/show.html.haml
+3
-4
spec/features/projects/jobs_spec.rb
spec/features/projects/jobs_spec.rb
+6
-2
No files found.
app/views/projects/jobs/_empty_state.html.haml
View file @
f765daa7
-
illustration
=
local_assigns
.
fetch
(
:illustration
)
-
illustration
=
local_assigns
.
fetch
(
:illustration
)
-
illustration_size
=
local_assigns
.
fetch
(
:illustration_size
)
-
illustration_size
=
local_assigns
.
fetch
(
:illustration_size
)
-
title
=
local_assigns
.
fetch
(
:title
)
-
title
=
local_assigns
.
fetch
(
:title
)
-
content
=
local_assigns
.
fetch
(
:content
)
-
content
=
local_assigns
.
fetch
(
:content
,
nil
)
-
action
=
local_assigns
.
fetch
(
:action
,
nil
)
-
action
=
local_assigns
.
fetch
(
:action
,
nil
)
.row.empty-state
.row.empty-state
...
@@ -11,7 +11,8 @@
...
@@ -11,7 +11,8 @@
.col-xs-12
.col-xs-12
.text-content
.text-content
%h4
.text-center
=
title
%h4
.text-center
=
title
%p
=
content
-
if
content
%p
=
content
-
if
action
-
if
action
.text-center
.text-center
=
action
=
action
app/views/projects/jobs/show.html.haml
View file @
f765daa7
...
@@ -93,14 +93,13 @@
...
@@ -93,14 +93,13 @@
illustration:
'illustrations/manual_action.svg'
,
illustration:
'illustrations/manual_action.svg'
,
illustration_size:
'svg-394'
,
illustration_size:
'svg-394'
,
title:
_
(
'This job requires a manual action'
),
title:
_
(
'This job requires a manual action'
),
content:
_
(
'This job depends on a user to trigger its process. Often they are used to deploy code to production environments
.
'
),
content:
_
(
'This job depends on a user to trigger its process. Often they are used to deploy code to production environments'
),
action:
(
link_to
_
(
'Trigger this manual action'
),
play_project_job_path
(
@project
,
@build
),
class:
'btn btn-primary'
,
title:
_
(
'Trigger this manual action'
)
)
action:
(
link_to
_
(
'Trigger this manual action'
),
play_project_job_path
(
@project
,
@build
),
method: :post
,
class:
'btn btn-primary'
,
title:
_
(
'Trigger this manual action'
)
)
-
else
-
else
=
render
'empty_state'
,
=
render
'empty_state'
,
illustration:
'illustrations/job_not_triggered.svg'
,
illustration:
'illustrations/job_not_triggered.svg'
,
illustration_size:
'svg-306'
,
illustration_size:
'svg-306'
,
title:
_
(
'This job has not been triggered yet'
),
title:
_
(
'This job has not been triggered yet'
)
content:
_
(
'This job depends on upstream jobs that need to succeed in order for this job to be triggered.'
)
=
render
"sidebar"
=
render
"sidebar"
...
...
spec/features/projects/jobs_spec.rb
View file @
f765daa7
...
@@ -383,6 +383,11 @@ feature 'Jobs' do
...
@@ -383,6 +383,11 @@ feature 'Jobs' do
expect
(
page
).
to
have_content
(
'This job depends on a user to trigger its process. Often they are used to deploy code to production environments.'
)
expect
(
page
).
to
have_content
(
'This job depends on a user to trigger its process. Often they are used to deploy code to production environments.'
)
expect
(
page
).
to
have_link
(
'Trigger this manual action'
)
expect
(
page
).
to
have_link
(
'Trigger this manual action'
)
end
end
it
'plays manual action'
do
click_link
'Trigger this manual action'
expect
(
page
).
not_to
have_link
(
'Trigger this manual action'
)
end
end
end
context
'Non triggered job'
do
context
'Non triggered job'
do
...
@@ -392,9 +397,8 @@ feature 'Jobs' do
...
@@ -392,9 +397,8 @@ feature 'Jobs' do
visit
project_job_path
(
project
,
job
)
visit
project_job_path
(
project
,
job
)
end
end
it
'shows
manual action
empty state'
do
it
'shows empty state'
do
expect
(
page
).
to
have_content
(
'This job has not been triggered yet'
)
expect
(
page
).
to
have_content
(
'This job has not been triggered yet'
)
expect
(
page
).
to
have_content
(
'This job depends on upstream jobs that need to succeed in order for this job to be triggered.'
)
end
end
end
end
end
end
...
...
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