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
Hide 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 {
...
@@ -115,12 +115,10 @@ export default {
<div
role=
"rowheader"
class=
"table-mobile-header"
>
{{
s__
(
'
DeployKeys|Deploy key
'
)
}}
</div>
<div
role=
"rowheader"
class=
"table-mobile-header"
>
{{
s__
(
'
DeployKeys|Deploy key
'
)
}}
</div>
<div
class=
"table-mobile-content qa-key"
>
<div
class=
"table-mobile-content qa-key"
>
<strong
class=
"title qa-key-title"
>
{{
deployKey
.
title
}}
</strong>
<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
}}
{{
__
(
'
MD5
'
)
}}
:
{{
deployKey
.
fingerprint
}}
</div>
</div>
<div
class=
"fingerprint qa-key-fingerprint"
>
<div
class=
"fingerprint"
>
{{
__
(
'
SHA256
'
)
}}
:
{{
deployKey
.
fingerprint_sha256
}}
</div>
{{
__
(
'
SHA256
'
)
}}
:
{{
deployKey
.
fingerprint_sha256
}}
</div>
</div>
</div>
</div>
</div>
<div
class=
"table-section section-30 section-wrap"
>
<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
...
@@ -18,7 +18,7 @@ module QA
view
'app/assets/javascripts/deploy_keys/components/key.vue'
do
view
'app/assets/javascripts/deploy_keys/components/key.vue'
do
element
:key
element
:key
element
:key_title
element
:key_title
element
:key_fingerprint
element
:key_
md5_
fingerprint
end
end
def
add_key
def
add_key
...
@@ -33,17 +33,17 @@ module QA
...
@@ -33,17 +33,17 @@ module QA
fill_in
'deploy_key_key'
,
with:
key
fill_in
'deploy_key_key'
,
with:
key
end
end
def
find_fingerprint
(
title
)
def
find_
md5_
fingerprint
(
title
)
within_project_deploy_keys
do
within_project_deploy_keys
do
find_element
(
:key
,
text:
title
)
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
end
end
def
has_key?
(
title
,
fingerprint
)
def
has_key?
(
title
,
md5_
fingerprint
)
within_project_deploy_keys
do
within_project_deploy_keys
do
find_element
(
:key
,
text:
title
)
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
end
end
...
@@ -53,12 +53,6 @@ module QA
...
@@ -53,12 +53,6 @@ module QA
end
end
end
end
def
key_fingerprint
within_project_deploy_keys
do
find_element
(
:key_fingerprint
).
text
end
end
private
private
def
within_project_deploy_keys
def
within_project_deploy_keys
...
...
qa/qa/resource/deploy_key.rb
View file @
18c5f93c
...
@@ -5,10 +5,10 @@ module QA
...
@@ -5,10 +5,10 @@ module QA
class
DeployKey
<
Base
class
DeployKey
<
Base
attr_accessor
:title
,
:key
attr_accessor
:title
,
:key
attribute
:fingerprint
do
attribute
:
md5_
fingerprint
do
Page
::
Project
::
Settings
::
Repository
.
perform
do
|
setting
|
Page
::
Project
::
Settings
::
Repository
.
perform
do
|
setting
|
setting
.
expand_deploy_keys
do
|
key
|
setting
.
expand_deploy_keys
do
|
key
|
key
.
find_fingerprint
(
title
)
key
.
find_
md5_
fingerprint
(
title
)
end
end
end
end
end
end
...
...
qa/qa/resource/ssh_key.rb
View file @
18c5f93c
...
@@ -7,7 +7,7 @@ module QA
...
@@ -7,7 +7,7 @@ module QA
attr_accessor
:title
attr_accessor
:title
def_delegators
:key
,
:private_key
,
:public_key
,
:fingerprint
def_delegators
:key
,
:private_key
,
:public_key
,
:
md5_
fingerprint
def
key
def
key
@key
||=
Runtime
::
Key
::
RSA
.
new
@key
||=
Runtime
::
Key
::
RSA
.
new
...
...
qa/qa/runtime/key/base.rb
View file @
18c5f93c
...
@@ -4,7 +4,7 @@ module QA
...
@@ -4,7 +4,7 @@ module QA
module
Runtime
module
Runtime
module
Key
module
Key
class
Base
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
)
def
initialize
(
name
,
bits
)
@name
=
name
@name
=
name
...
@@ -29,7 +29,7 @@ module QA
...
@@ -29,7 +29,7 @@ module QA
def
populate_key_data
(
path
)
def
populate_key_data
(
path
)
@private_key
=
::
File
.
binread
(
path
)
@private_key
=
::
File
.
binread
(
path
)
@public_key
=
::
File
.
binread
(
"
#{
path
}
.pub"
)
@public_key
=
::
File
.
binread
(
"
#{
path
}
.pub"
)
@fingerprint
=
@
md5_
fingerprint
=
`ssh-keygen -l -E md5 -f
#{
path
}
| cut -d' ' -f2 | cut -d: -f2-`
.
chomp
`ssh-keygen -l -E md5 -f
#{
path
}
| cut -d' ' -f2 | cut -d: -f2-`
.
chomp
end
end
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
...
@@ -13,7 +13,7 @@ module QA
end
end
expect
(
page
).
to
have_content
(
"Title:
#{
key_title
}
"
)
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
::
Main
::
Menu
.
perform
(
&
:click_settings_link
)
Page
::
Profile
::
Menu
.
perform
(
&
:click_ssh_keys
)
Page
::
Profile
::
Menu
.
perform
(
&
:click_ssh_keys
)
...
@@ -23,7 +23,7 @@ module QA
...
@@ -23,7 +23,7 @@ module QA
end
end
expect
(
page
).
not_to
have_content
(
"Title:
#{
key_title
}
"
)
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
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
...
@@ -15,11 +15,11 @@ module QA
resource
.
key
=
deploy_key_value
resource
.
key
=
deploy_key_value
end
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
|
Page
::
Project
::
Settings
::
Repository
.
perform
do
|
setting
|
setting
.
expand_deploy_keys
do
|
keys
|
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
end
end
end
...
...
qa/qa/specs/features/ee/browser_ui/geo/ssh_push_spec.rb
View file @
18c5f93c
...
@@ -52,7 +52,7 @@ module QA
...
@@ -52,7 +52,7 @@ module QA
Page
::
Profile
::
Menu
.
act
{
click_ssh_keys
}
Page
::
Profile
::
Menu
.
act
{
click_ssh_keys
}
expect
(
page
).
to
have_content
(
key_title
)
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
# Ensure project has replicated
Page
::
Main
::
Menu
.
perform
{
|
menu
|
menu
.
go_to_projects
}
Page
::
Main
::
Menu
.
perform
{
|
menu
|
menu
.
go_to_projects
}
...
@@ -123,7 +123,7 @@ module QA
...
@@ -123,7 +123,7 @@ module QA
Page
::
Profile
::
Menu
.
act
{
click_ssh_keys
}
Page
::
Profile
::
Menu
.
act
{
click_ssh_keys
}
expect
(
page
).
to
have_content
(
key_title
)
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
# Ensure project has replicated
Page
::
Main
::
Menu
.
perform
{
|
menu
|
menu
.
go_to_projects
}
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
...
@@ -52,7 +52,7 @@ module QA
end
end
expect
(
page
).
to
have_content
(
key_title
)
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
# Ensure project has replicated
Page
::
Main
::
Menu
.
perform
(
&
:go_to_projects
)
Page
::
Main
::
Menu
.
perform
(
&
:go_to_projects
)
...
@@ -140,7 +140,7 @@ module QA
...
@@ -140,7 +140,7 @@ module QA
end
end
expect
(
page
).
to
have_content
(
key_title
)
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
# Ensure project has replicated
Page
::
Main
::
Menu
.
perform
(
&
:go_to_projects
)
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
...
@@ -58,7 +58,7 @@ module QA
Page
::
Profile
::
SSHKeys
.
perform
do
|
ssh
|
Page
::
Profile
::
SSHKeys
.
perform
do
|
ssh
|
expect
(
ssh
.
keys_list
).
to
have_content
(
key_title
)
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
end
Page
::
Main
::
Menu
.
perform
(
&
:go_to_projects
)
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
...
@@ -47,7 +47,7 @@ module QA
Page
::
Profile
::
SSHKeys
.
perform
do
|
ssh
|
Page
::
Profile
::
SSHKeys
.
perform
do
|
ssh
|
expect
(
ssh
.
keys_list
).
to
have_content
(
key_title
)
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
end
Page
::
Main
::
Menu
.
perform
(
&
:go_to_projects
)
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