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
Tatuya Kamada
gitlab-ce
Commits
9b0e7b90
Commit
9b0e7b90
authored
Nov 17, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test case for environments related to deployments
parent
54ee0df7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
spec/features/environments_spec.rb
spec/features/environments_spec.rb
+14
-7
No files found.
spec/features/environments_spec.rb
View file @
9b0e7b90
...
...
@@ -74,24 +74,31 @@ feature 'Environments', feature: true, js: true do
context
'with build and manual actions'
do
given
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
)
}
given
(
:build
)
{
create
(
:ci_build
,
pipeline:
pipeline
)
}
given
(
:deployment
)
{
create
(
:deployment
,
environment:
environment
,
deployable:
build
)
}
given
(
:manual
)
{
create
(
:ci_build
,
:manual
,
pipeline:
pipeline
,
name:
'deploy to production'
)
}
given
(
:manual
)
do
create
(
:ci_build
,
:manual
,
pipeline:
pipeline
,
name:
'deploy to production'
)
end
given
(
:deployment
)
do
create
(
:deployment
,
environment:
environment
,
deployable:
build
,
sha:
project
.
commit
.
id
)
end
scenario
'does show a play button'
do
find
(
'.dropdown-play-icon-container'
).
click
expect
(
page
).
to
have_content
(
manual
.
name
.
humanize
)
end
scenario
'does allow to play manual action'
do
scenario
'does allow to play manual action'
,
js:
true
do
expect
(
manual
).
to
be_skipped
find
(
'.dropdown-play-icon-container'
).
click
play_action
=
find
(
'span'
,
text:
manual
.
name
.
humanize
)
expect
(
page
).
to
have_content
(
manual
.
name
.
humanize
)
expect
{
play_action
.
click
}.
not_to
change
{
Ci
::
Pipeline
.
count
}
# TODO, fix me!
expect
{
click_link
(
manual
.
name
.
humanize
)
}
.
not_to
change
{
Ci
::
Pipeline
.
count
}
expect
(
manual
.
reload
).
to
be_pending
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