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
18c5f93c
Commit
18c5f93c
authored
Jan 14, 2020
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix QA spec 'browser_ui/6_release/deploy_key/add_deploy_key_spec.rb'
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
337e1fe2
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
22 additions
and
30 deletions
+22
-30
app/assets/javascripts/deploy_keys/components/key.vue
app/assets/javascripts/deploy_keys/components/key.vue
+2
-4
qa/qa/page/project/settings/deploy_keys.rb
qa/qa/page/project/settings/deploy_keys.rb
+5
-11
qa/qa/resource/deploy_key.rb
qa/qa/resource/deploy_key.rb
+2
-2
qa/qa/resource/ssh_key.rb
qa/qa/resource/ssh_key.rb
+1
-1
qa/qa/runtime/key/base.rb
qa/qa/runtime/key/base.rb
+2
-2
qa/qa/specs/features/browser_ui/3_create/repository/add_ssh_key_spec.rb
...atures/browser_ui/3_create/repository/add_ssh_key_spec.rb
+2
-2
qa/qa/specs/features/browser_ui/6_release/deploy_key/add_deploy_key_spec.rb
...es/browser_ui/6_release/deploy_key/add_deploy_key_spec.rb
+2
-2
qa/qa/specs/features/ee/browser_ui/geo/ssh_push_spec.rb
qa/qa/specs/features/ee/browser_ui/geo/ssh_push_spec.rb
+2
-2
qa/qa/specs/features/ee/browser_ui/geo/ssh_push_to_secondary_spec.rb
.../features/ee/browser_ui/geo/ssh_push_to_secondary_spec.rb
+2
-2
qa/qa/specs/features/ee/browser_ui/geo/wiki_ssh_push_spec.rb
qa/qa/specs/features/ee/browser_ui/geo/wiki_ssh_push_spec.rb
+1
-1
qa/qa/specs/features/ee/browser_ui/geo/wiki_ssh_push_to_secondary_spec.rb
...ures/ee/browser_ui/geo/wiki_ssh_push_to_secondary_spec.rb
+1
-1
No files found.
app/assets/javascripts/deploy_keys/components/key.vue
View file @
18c5f93c
...
...
@@ -115,12 +115,10 @@ export default {
<div
role=
"rowheader"
class=
"table-mobile-header"
>
{{
s__
(
'
DeployKeys|Deploy key
'
)
}}
</div>
<div
class=
"table-mobile-content qa-key"
>
<strong
class=
"title qa-key-title"
>
{{
deployKey
.
title
}}
</strong>
<div
class=
"fingerprint
qa-key-
fingerprint"
>
<div
class=
"fingerprint
"
data-qa-selector=
"key_md5_
fingerprint"
>
{{
__
(
'
MD5
'
)
}}
:
{{
deployKey
.
fingerprint
}}
</div>
<div
class=
"fingerprint qa-key-fingerprint"
>
{{
__
(
'
SHA256
'
)
}}
:
{{
deployKey
.
fingerprint_sha256
}}
</div>
<div
class=
"fingerprint"
>
{{
__
(
'
SHA256
'
)
}}
:
{{
deployKey
.
fingerprint_sha256
}}
</div>
</div>
</div>
<div
class=
"table-section section-30 section-wrap"
>
...
...
qa/qa/page/project/settings/deploy_keys.rb
View file @
18c5f93c
...
...
@@ -18,7 +18,7 @@ module QA
view
'app/assets/javascripts/deploy_keys/components/key.vue'
do
element
:key
element
:key_title
element
:key_fingerprint
element
:key_
md5_
fingerprint
end
def
add_key
...
...
@@ -33,17 +33,17 @@ module QA
fill_in
'deploy_key_key'
,
with:
key
end
def
find_fingerprint
(
title
)
def
find_
md5_
fingerprint
(
title
)
within_project_deploy_keys
do
find_element
(
:key
,
text:
title
)
.
find
(
element_selector_css
(
:key_
fingerprint
)).
text
.
find
(
element_selector_css
(
:key_
md5_fingerprint
)).
text
.
delete_prefix
(
'MD5:'
)
end
end
def
has_key?
(
title
,
fingerprint
)
def
has_key?
(
title
,
md5_
fingerprint
)
within_project_deploy_keys
do
find_element
(
:key
,
text:
title
)
.
has_css?
(
element_selector_css
(
:key_
fingerprint
),
text:
fingerprint
)
.
has_css?
(
element_selector_css
(
:key_
md5_fingerprint
),
text:
"MD5:
#{
md5_fingerprint
}
"
)
end
end
...
...
@@ -53,12 +53,6 @@ module QA
end
end
def
key_fingerprint
within_project_deploy_keys
do
find_element
(
:key_fingerprint
).
text
end
end
private
def
within_project_deploy_keys
...
...
qa/qa/resource/deploy_key.rb
View file @
18c5f93c
...
...
@@ -5,10 +5,10 @@ module QA
class
DeployKey
<
Base
attr_accessor
:title
,
:key
attribute
:fingerprint
do
attribute
:
md5_
fingerprint
do
Page
::
Project
::
Settings
::
Repository
.
perform
do
|
setting
|
setting
.
expand_deploy_keys
do
|
key
|
key
.
find_fingerprint
(
title
)
key
.
find_
md5_
fingerprint
(
title
)
end
end
end
...
...
qa/qa/resource/ssh_key.rb
View file @
18c5f93c
...
...
@@ -7,7 +7,7 @@ module QA
attr_accessor
:title
def_delegators
:key
,
:private_key
,
:public_key
,
:fingerprint
def_delegators
:key
,
:private_key
,
:public_key
,
:
md5_
fingerprint
def
key
@key
||=
Runtime
::
Key
::
RSA
.
new
...
...
qa/qa/runtime/key/base.rb
View file @
18c5f93c
...
...
@@ -4,7 +4,7 @@ module QA
module
Runtime
module
Key
class
Base
attr_reader
:name
,
:bits
,
:private_key
,
:public_key
,
:fingerprint
attr_reader
:name
,
:bits
,
:private_key
,
:public_key
,
:
md5_
fingerprint
def
initialize
(
name
,
bits
)
@name
=
name
...
...
@@ -29,7 +29,7 @@ module QA
def
populate_key_data
(
path
)
@private_key
=
::
File
.
binread
(
path
)
@public_key
=
::
File
.
binread
(
"
#{
path
}
.pub"
)
@fingerprint
=
@
md5_
fingerprint
=
`ssh-keygen -l -E md5 -f
#{
path
}
| cut -d' ' -f2 | cut -d: -f2-`
.
chomp
end
end
...
...
qa/qa/specs/features/browser_ui/3_create/repository/add_ssh_key_spec.rb
View file @
18c5f93c
...
...
@@ -13,7 +13,7 @@ module QA
end
expect
(
page
).
to
have_content
(
"Title:
#{
key_title
}
"
)
expect
(
page
).
to
have_content
(
key
.
fingerprint
)
expect
(
page
).
to
have_content
(
key
.
md5_
fingerprint
)
Page
::
Main
::
Menu
.
perform
(
&
:click_settings_link
)
Page
::
Profile
::
Menu
.
perform
(
&
:click_ssh_keys
)
...
...
@@ -23,7 +23,7 @@ module QA
end
expect
(
page
).
not_to
have_content
(
"Title:
#{
key_title
}
"
)
expect
(
page
).
not_to
have_content
(
key
.
fingerprint
)
expect
(
page
).
not_to
have_content
(
key
.
md5_
fingerprint
)
end
end
end
...
...
qa/qa/specs/features/browser_ui/6_release/deploy_key/add_deploy_key_spec.rb
View file @
18c5f93c
...
...
@@ -15,11 +15,11 @@ module QA
resource
.
key
=
deploy_key_value
end
expect
(
deploy_key
.
fingerprint
).
to
eq
key
.
fingerprint
expect
(
deploy_key
.
md5_fingerprint
).
to
eq
key
.
md5_
fingerprint
Page
::
Project
::
Settings
::
Repository
.
perform
do
|
setting
|
setting
.
expand_deploy_keys
do
|
keys
|
expect
(
keys
).
to
have_key
(
deploy_key_title
,
key
.
fingerprint
)
expect
(
keys
).
to
have_key
(
deploy_key_title
,
key
.
md5_
fingerprint
)
end
end
end
...
...
qa/qa/specs/features/ee/browser_ui/geo/ssh_push_spec.rb
View file @
18c5f93c
...
...
@@ -52,7 +52,7 @@ module QA
Page
::
Profile
::
Menu
.
act
{
click_ssh_keys
}
expect
(
page
).
to
have_content
(
key_title
)
expect
(
page
).
to
have_content
(
key
.
fingerprint
)
expect
(
page
).
to
have_content
(
key
.
md5_
fingerprint
)
# Ensure project has replicated
Page
::
Main
::
Menu
.
perform
{
|
menu
|
menu
.
go_to_projects
}
...
...
@@ -123,7 +123,7 @@ module QA
Page
::
Profile
::
Menu
.
act
{
click_ssh_keys
}
expect
(
page
).
to
have_content
(
key_title
)
expect
(
page
).
to
have_content
(
key
.
fingerprint
)
expect
(
page
).
to
have_content
(
key
.
md5_
fingerprint
)
# Ensure project has replicated
Page
::
Main
::
Menu
.
perform
{
|
menu
|
menu
.
go_to_projects
}
...
...
qa/qa/specs/features/ee/browser_ui/geo/ssh_push_to_secondary_spec.rb
View file @
18c5f93c
...
...
@@ -52,7 +52,7 @@ module QA
end
expect
(
page
).
to
have_content
(
key_title
)
expect
(
page
).
to
have_content
(
key
.
fingerprint
)
expect
(
page
).
to
have_content
(
key
.
md5_
fingerprint
)
# Ensure project has replicated
Page
::
Main
::
Menu
.
perform
(
&
:go_to_projects
)
...
...
@@ -140,7 +140,7 @@ module QA
end
expect
(
page
).
to
have_content
(
key_title
)
expect
(
page
).
to
have_content
(
key
.
fingerprint
)
expect
(
page
).
to
have_content
(
key
.
md5_
fingerprint
)
# Ensure project has replicated
Page
::
Main
::
Menu
.
perform
(
&
:go_to_projects
)
...
...
qa/qa/specs/features/ee/browser_ui/geo/wiki_ssh_push_spec.rb
View file @
18c5f93c
...
...
@@ -58,7 +58,7 @@ module QA
Page
::
Profile
::
SSHKeys
.
perform
do
|
ssh
|
expect
(
ssh
.
keys_list
).
to
have_content
(
key_title
)
expect
(
ssh
.
keys_list
).
to
have_content
(
key
.
fingerprint
)
expect
(
ssh
.
keys_list
).
to
have_content
(
key
.
md5_
fingerprint
)
end
Page
::
Main
::
Menu
.
perform
(
&
:go_to_projects
)
...
...
qa/qa/specs/features/ee/browser_ui/geo/wiki_ssh_push_to_secondary_spec.rb
View file @
18c5f93c
...
...
@@ -47,7 +47,7 @@ module QA
Page
::
Profile
::
SSHKeys
.
perform
do
|
ssh
|
expect
(
ssh
.
keys_list
).
to
have_content
(
key_title
)
expect
(
ssh
.
keys_list
).
to
have_content
(
key
.
fingerprint
)
expect
(
ssh
.
keys_list
).
to
have_content
(
key
.
md5_
fingerprint
)
end
Page
::
Main
::
Menu
.
perform
(
&
:go_to_projects
)
...
...
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