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
Léo-Paul Géneau
gitlab-ce
Commits
f851f13f
Commit
f851f13f
authored
Dec 29, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduce expand_deploy_keys
parent
bc5552b3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
18 deletions
+26
-18
qa/qa/page/project/settings/deploy_keys.rb
qa/qa/page/project/settings/deploy_keys.rb
+3
-9
qa/qa/page/project/settings/repository.rb
qa/qa/page/project/settings/repository.rb
+12
-2
qa/qa/specs/features/project/add_deploy_key_spec.rb
qa/qa/specs/features/project/add_deploy_key_spec.rb
+11
-7
No files found.
qa/qa/page/project/settings/deploy_keys.rb
View file @
f851f13f
...
...
@@ -2,18 +2,12 @@ module QA
module
Page
module
Project
module
Settings
class
DeployKeys
<
Repository
def
initialize
super
expand
(
'Deploy Keys'
)
end
def
fill_new_deploy_key_title
(
title
)
class
DeployKeys
<
Page
::
Base
def
fill_key_title
(
title
)
fill_in
'deploy_key_title'
,
with:
title
end
def
fill_
new_deploy_key_key
(
key
)
def
fill_
key_value
(
key
)
fill_in
'deploy_key_key'
,
with:
key
end
...
...
qa/qa/page/project/settings/repository.rb
View file @
f851f13f
...
...
@@ -3,9 +3,19 @@ module QA
module
Project
module
Settings
class
Repository
<
Page
::
Base
def
expand
(
title
)
def
expand_deploy_keys
(
&
block
)
expand
(
'.qa-expand-deploy-keys'
)
do
DeployKeys
.
perform
(
&
block
)
end
end
private
def
expand
(
selector
)
page
.
within
(
'#content-body'
)
do
find
(
'.qa-expand-deploy-keys'
).
click
find
(
selector
).
click
yield
end
end
end
...
...
qa/qa/specs/features/project/add_deploy_key_spec.rb
View file @
f851f13f
...
...
@@ -15,19 +15,23 @@ module QA
end
given
(
:deploy_key_title
)
{
'deploy key title'
}
given
(
:deploy_key_
data
)
{
Runtime
::
User
.
ssh_key
}
given
(
:deploy_key_
value
)
{
Runtime
::
User
.
ssh_key
}
scenario
'user adds a deploy key'
do
Page
::
Project
::
Settings
::
DeployKeys
.
perform
do
|
page
|
page
.
fill_new_deploy_key_title
(
deploy_key_title
)
page
.
fill_new_deploy_key_key
(
deploy_key_data
)
Page
::
Project
::
Settings
::
Repository
.
perform
do
|
setting
|
setting
.
expand_deploy_keys
do
|
page
|
page
.
fill_key_title
(
deploy_key_title
)
page
.
fill_key_value
(
deploy_key_value
)
page
.
add_key
end
end
Page
::
Project
::
Settings
::
DeployKeys
.
perform
do
|
page
|
Page
::
Project
::
Settings
::
Repository
.
perform
do
|
setting
|
setting
.
expand_deploy_keys
do
|
page
|
expect
(
page
).
to
have_key_title
(
deploy_key_title
)
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