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
1571d468
Commit
1571d468
authored
Nov 16, 2016
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken url for stop action
parent
9c3f9d84
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
app/assets/javascripts/environments/components/environment_stop.js.es6
...vascripts/environments/components/environment_stop.js.es6
+9
-3
spec/features/environments_spec.rb
spec/features/environments_spec.rb
+6
-1
No files found.
app/assets/javascripts/environments/components/environment_stop.js.es6
View file @
1571d468
...
...
@@ -13,6 +13,12 @@
},
},
computed: {
stopUrl() {
return `${this.stop_url}/stop`;
},
},
methods: {
openConfirmDialog() {
return window.confirm('Are you sure you want to stop this environment?'); // eslint-disable-line
...
...
@@ -22,9 +28,9 @@
template: `
<a v-on:click="openConfirmDialog"
class="btn stop-env-link"
:href="stop
_u
rl"
method="post"
rel="nofollow">
:href="stop
U
rl"
data-
method="post"
data-
rel="nofollow">
<i class="fa fa-stop stop-env-icon"></i>
</a>
`,
...
...
spec/features/environments_spec.rb
View file @
1571d468
...
...
@@ -59,6 +59,7 @@ feature 'Environments', feature: true, js: true do
given
(
:deployment
)
{
create
(
:deployment
,
environment:
environment
)
}
scenario
'does show deployment SHA'
do
# TODO: Fix me!
expect
(
page
).
to
have_link
(
deployment
.
short_sha
)
end
...
...
@@ -73,11 +74,15 @@ feature 'Environments', feature: true, js: true do
given
(
:manual
)
{
create
(
:ci_build
,
:manual
,
pipeline:
pipeline
,
name:
'deploy to production'
)
}
scenario
'does show a play button'
do
# TODO: Fix me!
binding
.
pry
expect
(
page
).
to
have_link
(
manual
.
name
.
humanize
)
end
scenario
'does allow to play manual action'
do
expect
(
manual
).
to
be_skipped
# TODO: Fix me!
binding
.
pry
expect
{
click_link
(
manual
.
name
.
humanize
)
}.
not_to
change
{
Ci
::
Pipeline
.
count
}
expect
(
page
).
to
have_content
(
manual
.
name
)
expect
(
manual
.
reload
).
to
be_pending
...
...
@@ -114,7 +119,7 @@ feature 'Environments', feature: true, js: true do
end
scenario
'starts build when stop button clicked'
do
page
.
find
(
'.stop-env-link'
).
click
find
(
'.stop-env-link'
).
click
expect
(
page
).
to
have_content
(
'close_app'
)
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