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
39a659a1
Commit
39a659a1
authored
Jan 18, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scrap the deploy key title and match it in test
parent
604c9133
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
10 deletions
+14
-10
qa/qa/factory/resource/deploy_key.rb
qa/qa/factory/resource/deploy_key.rb
+6
-0
qa/qa/page/project/settings/deploy_keys.rb
qa/qa/page/project/settings/deploy_keys.rb
+4
-2
qa/qa/specs/features/project/add_deploy_key_spec.rb
qa/qa/specs/features/project/add_deploy_key_spec.rb
+4
-8
No files found.
qa/qa/factory/resource/deploy_key.rb
View file @
39a659a1
...
...
@@ -4,6 +4,12 @@ module QA
class
DeployKey
<
Factory
::
Base
attr_accessor
:title
,
:key
product
:title
do
Page
::
Project
::
Settings
::
Repository
.
act
do
expand_deploy_keys
(
&
:key_title
)
end
end
dependency
Factory
::
Resource
::
Project
,
as: :project
do
|
project
|
project
.
name
=
'project-to-deploy'
project
.
description
=
'project for adding deploy key test'
...
...
qa/qa/page/project/settings/deploy_keys.rb
View file @
39a659a1
...
...
@@ -29,9 +29,11 @@ module QA
click_on
'Add key'
end
def
has_key_title?
(
title
)
def
key_title
page
.
within
(
'.deploy-keys'
)
do
page
.
find
(
'.title'
,
text:
title
)
# The instance might have public keys available, here we want
# the one from the project
page
.
first
(
'.title'
).
text
end
end
end
...
...
qa/qa/specs/features/project/add_deploy_key_spec.rb
View file @
39a659a1
...
...
@@ -7,16 +7,12 @@ module QA
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
Factory
::
Resource
::
DeployKey
.
fabricate!
do
|
deploy_key
|
deploy_key
.
title
=
deploy_key_title
deploy_key
.
key
=
deploy_key_value
deploy_key
=
Factory
::
Resource
::
DeployKey
.
fabricate!
do
|
resource
|
resource
.
title
=
deploy_key_title
resource
.
key
=
deploy_key_value
end
Page
::
Project
::
Settings
::
Repository
.
perform
do
|
setting
|
setting
.
expand_deploy_keys
do
|
page
|
expect
(
page
).
to
have_key_title
(
deploy_key_title
)
end
end
expect
(
deploy_key
.
title
).
to
eq
(
deploy_key_title
)
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