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
Jérome Perrin
gitlab-ce
Commits
d037a2e9
Commit
d037a2e9
authored
Apr 04, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix typo
Adds tests
parent
3db1b959
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
4 deletions
+47
-4
app/assets/javascripts/environments/components/environment_actions.js
...avascripts/environments/components/environment_actions.js
+1
-1
app/assets/javascripts/vue_pipelines_index/components/pipelines_actions.js
...ripts/vue_pipelines_index/components/pipelines_actions.js
+3
-3
spec/factories/ci/builds.rb
spec/factories/ci/builds.rb
+5
-0
spec/factories/environments.rb
spec/factories/environments.rb
+5
-0
spec/features/projects/environments/environments_spec.rb
spec/features/projects/environments/environments_spec.rb
+15
-0
spec/features/projects/pipelines/pipelines_spec.rb
spec/features/projects/pipelines/pipelines_spec.rb
+18
-0
No files found.
app/assets/javascripts/environments/components/environment_actions.js
View file @
d037a2e9
...
...
@@ -69,7 +69,7 @@ export default {
type="button"
@click="onClickAction(action.play_path)"
class="js-manual-action-link no-btn btn"
:class="{ 'disabled': !action
s
.playable }"
:class="{ 'disabled': !action.playable }"
:disabled="!action.playable">
${
playIconSvg
}
<span>
...
...
app/assets/javascripts/vue_pipelines_index/components/pipelines_actions.js
View file @
d037a2e9
...
...
@@ -49,7 +49,7 @@ export default {
data-toggle="dropdown"
data-placement="top"
aria-label="Manual job"
:disabled="is
Disabled
">
:disabled="is
Loading
">
${
playIconSvg
}
<i class="fa fa-caret-down" aria-hidden="true"></i>
<i v-if="isLoading" class="fa fa-spinner fa-spin" aria-hidden="true"></i>
...
...
@@ -60,9 +60,9 @@ export default {
<button
type="button"
class="js-pipeline-action-link no-btn btn"
:class="{ 'disabled': !action
s
.playable }"
:class="{ 'disabled': !action.playable }"
@click="onClickAction(action.path)"
:disabled="!action
s
.playable">
:disabled="!action.playable">
${
playIconSvg
}
<span>{{action.name}}</span>
</button>
...
...
spec/factories/ci/builds.rb
View file @
d037a2e9
...
...
@@ -192,5 +192,10 @@ FactoryGirl.define do
trait
:no_options
do
options
{
{}
}
end
trait
:non_playable
do
status
'created'
self
.
when
'manual'
end
end
end
spec/factories/environments.rb
View file @
d037a2e9
...
...
@@ -32,5 +32,10 @@ FactoryGirl.define do
environment
.
update_attribute
(
:deployments
,
[
deployment
])
end
end
trait
:non_playable
do
status
'created'
self
.
when
'manual'
end
end
end
spec/features/projects/environments/environments_spec.rb
View file @
d037a2e9
...
...
@@ -115,6 +115,21 @@ feature 'Environments page', :feature, :js do
.
not_to
change
{
Ci
::
Pipeline
.
count
}
end
scenario
'when action is non playable'
,
js:
true
do
given
(
:action
)
do
create
(
:ci_build
,
:manual
,
:non_playable
,
pipeline:
pipeline
,
name:
'close_app'
)
end
it
'has disabled button to the manual action'
do
find
(
'.js-dropdown-play-icon-container'
).
click
expect
(
page
).
to
have_button
(
'close_app'
,
disabled:
true
)
end
end
scenario
'does show build name and id'
do
expect
(
page
).
to
have_link
(
"
#{
build
.
name
}
#
#{
build
.
id
}
"
)
end
...
...
spec/features/projects/pipelines/pipelines_spec.rb
View file @
d037a2e9
...
...
@@ -197,6 +197,24 @@ describe 'Pipelines', :feature, :js do
end
end
context
'with non playable manual action'
do
let!
(
:manual
)
do
create
(
:ci_build
,
:manual
,
:non_playable
,
pipeline:
pipeline
,
name:
'manual build'
,
stage:
'test'
,
commands:
'test'
)
end
before
{
visit_project_pipelines
}
it
'has disabled button to the manual action'
do
find
(
'.js-pipeline-dropdown-manual-actions'
).
click
expect
(
page
).
to
have_button
(
'manual build'
,
disabled:
true
)
end
end
context
'for generic statuses'
do
context
'when running'
do
let!
(
:running
)
do
...
...
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