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
b2aaaa15
Commit
b2aaaa15
authored
May 21, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
90b4abd9
bb5bbbaa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
2 deletions
+40
-2
qa/qa/resource/ci_variable.rb
qa/qa/resource/ci_variable.rb
+27
-0
qa/qa/resource/project.rb
qa/qa/resource/project.rb
+1
-0
qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_ci_variable_spec.rb
...s/browser_ui/4_verify/ci_variable/add_ci_variable_spec.rb
+12
-2
No files found.
qa/qa/resource/ci_variable.rb
View file @
b2aaaa15
...
...
@@ -25,6 +25,33 @@ module QA
end
end
end
def
fabricate_via_api!
resource_web_url
(
api_get
)
rescue
ResourceNotFoundError
super
end
def
resource_web_url
(
resource
)
super
rescue
ResourceURLMissingError
# this particular resource does not expose a web_url property
end
def
api_get_path
"/projects/
#{
project
.
id
}
/variables/
#{
key
}
"
end
def
api_post_path
"/projects/
#{
project
.
id
}
/variables"
end
def
api_post_body
{
key:
key
,
value:
value
}
end
end
end
end
qa/qa/resource/project.rb
View file @
b2aaaa15
...
...
@@ -7,6 +7,7 @@ module QA
class
Project
<
Base
include
Events
::
Project
attribute
:id
attribute
:name
attribute
:description
...
...
qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_ci_variable_spec.rb
View file @
b2aaaa15
...
...
@@ -3,15 +3,25 @@
module
QA
context
'Verify'
do
describe
'CI variable support'
do
it
'user adds a CI variable'
do
it
'user adds a CI variable'
,
:smoke
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
Page
::
Main
::
Login
.
perform
(
&
:sign_in_using_credentials
)
project
=
Resource
::
Project
.
fabricate!
do
|
project
|
project
.
name
=
'project-with-ci-variables'
project
.
description
=
'project with CI variables'
end
Resource
::
CiVariable
.
fabricate!
do
|
resource
|
resource
.
project
=
project
resource
.
key
=
'VARIABLE_KEY'
resource
.
value
=
'some_CI_variable'
end
project
.
visit!
Page
::
Project
::
Menu
.
perform
(
&
:go_to_ci_cd_settings
)
Page
::
Project
::
Settings
::
CICD
.
perform
do
|
settings
|
settings
.
expand_ci_variables
do
|
page
|
expect
(
page
).
to
have_field
(
with:
'VARIABLE_KEY'
)
...
...
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