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
4b1da850
Commit
4b1da850
authored
Jan 22, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Also test if the fingerprint is correct
parent
05d98606
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
8 deletions
+44
-8
app/assets/javascripts/deploy_keys/components/key.vue
app/assets/javascripts/deploy_keys/components/key.vue
+2
-2
qa/qa/factory/resource/deploy_key.rb
qa/qa/factory/resource/deploy_key.rb
+6
-0
qa/qa/page/base.rb
qa/qa/page/base.rb
+15
-1
qa/qa/page/project/settings/deploy_keys.rb
qa/qa/page/project/settings/deploy_keys.rb
+18
-4
qa/qa/specs/features/project/add_deploy_key_spec.rb
qa/qa/specs/features/project/add_deploy_key_spec.rb
+3
-1
No files found.
app/assets/javascripts/deploy_keys/components/key.vue
View file @
4b1da850
...
...
@@ -53,10 +53,10 @@
</i>
</div>
<div
class=
"deploy-key-content key-list-item-info"
>
<strong
class=
"title"
>
<strong
class=
"title
qa-key-title
"
>
{{
deployKey
.
title
}}
</strong>
<div
class=
"description"
>
<div
class=
"description
qa-key-fingerprint
"
>
{{
deployKey
.
fingerprint
}}
</div>
</div>
...
...
qa/qa/factory/resource/deploy_key.rb
View file @
4b1da850
...
...
@@ -10,6 +10,12 @@ module QA
end
end
product
:fingerprint
do
Page
::
Project
::
Settings
::
Repository
.
act
do
expand_deploy_keys
(
&
:key_fingerprint
)
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/base.rb
View file @
4b1da850
...
...
@@ -41,7 +41,21 @@ module QA
end
def
click_element
(
name
)
find
(
Page
::
Element
.
new
(
name
).
selector_css
).
click
find_element
(
name
).
click
end
def
find_element
(
name
)
find
(
element_selector_css
(
name
))
end
def
within_element
(
name
)
page
.
within
(
element_selector_css
(
name
))
do
yield
end
end
def
element_selector_css
(
name
)
Page
::
Element
.
new
(
name
).
selector_css
end
def
self
.
path
...
...
qa/qa/page/project/settings/deploy_keys.rb
View file @
4b1da850
...
...
@@ -14,8 +14,8 @@ module QA
end
view
'app/assets/javascripts/deploy_keys/components/key.vue'
do
element
:key_title
,
/class=".*title.*"/
element
:key_
title_field
,
'{{ deployKey.title }}'
element
:key_title
,
/class=".*
qa-key-
title.*"/
element
:key_
fingerprint
,
/class=".*qa-key-fingerprint.*"/
end
def
fill_key_title
(
title
)
...
...
@@ -31,8 +31,22 @@ module QA
end
def
key_title
page
.
within
(
'.qa-project-deploy-keys'
)
do
page
.
find
(
'.title'
).
text
within_project_deploy_keys
do
find_element
(
:key_title
).
text
end
end
def
key_fingerprint
within_project_deploy_keys
do
find_element
(
:key_fingerprint
).
text
end
end
private
def
within_project_deploy_keys
within_element
(
:project_deploy_keys
)
do
yield
end
end
end
...
...
qa/qa/specs/features/project/add_deploy_key_spec.rb
View file @
4b1da850
module
QA
feature
'deploy keys support'
,
:core
do
given
(
:key
)
{
Runtime
::
RSAKey
.
new
}
given
(
:deploy_key_title
)
{
'deploy key title'
}
given
(
:deploy_key_value
)
{
Runtime
::
RSAKey
.
new
.
public_key
}
given
(
:deploy_key_value
)
{
key
.
public_key
}
scenario
'user adds a deploy key'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
...
...
@@ -13,6 +14,7 @@ module QA
end
expect
(
deploy_key
.
title
).
to
eq
(
deploy_key_title
)
expect
(
deploy_key
.
fingerprint
).
to
eq
(
key
.
fingerprint
)
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