Commit 615d6bea authored by Mark Lapierre's avatar Mark Lapierre

Merge branch 'qa-wiki-ssh-spec' into 'master'

CE backport of E2E Test wiki SSH push to Geo primary node

See merge request gitlab-org/gitlab-ce!32885
parents fc01371f 5e79e74f
- is_admin = local_assigns.fetch(:admin, false) - is_admin = local_assigns.fetch(:admin, false)
- if @keys.any? - if @keys.any?
%ul.content-list %ul.content-list{ data: { qa_selector: 'ssh_keys_list' } }
= render partial: 'profiles/keys/key', collection: @keys, locals: { is_admin: is_admin } = render partial: 'profiles/keys/key', collection: @keys, locals: { is_admin: is_admin }
- else - else
%p.settings-message.text-center %p.settings-message.text-center
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
= (s_("WikiHistoricalPage|You can view the %{most_recent_link} or browse the %{history_link}.") % { most_recent_link: most_recent_link, history_link: history_link }).html_safe = (s_("WikiHistoricalPage|You can view the %{most_recent_link} or browse the %{history_link}.") % { most_recent_link: most_recent_link, history_link: history_link }).html_safe
.prepend-top-default.append-bottom-default .prepend-top-default.append-bottom-default
.md.md-file .md.md-file{ data: { qa_selector: 'wiki_page_content' } }
= render_wiki_content(@page) = render_wiki_content(@page)
= render 'sidebar' = render 'sidebar'
...@@ -14,6 +14,10 @@ module QA ...@@ -14,6 +14,10 @@ module QA
element :delete_key_button element :delete_key_button
end end
view 'app/views/profiles/keys/_key_table.html.haml' do
element :ssh_keys_list
end
def add_key(public_key, title) def add_key(public_key, title)
fill_element :key_public_key_field, public_key fill_element :key_public_key_field, public_key
fill_element :key_title_field, title fill_element :key_title_field, title
...@@ -28,6 +32,10 @@ module QA ...@@ -28,6 +32,10 @@ module QA
click_element :delete_key_button click_element :delete_key_button
end end
end end
def keys_list
find_element(:ssh_keys_list).text
end
end end
end end
end end
......
...@@ -11,11 +11,21 @@ module QA ...@@ -11,11 +11,21 @@ module QA
element :clone_repository_link, 'Clone repository' # rubocop:disable QA/ElementWithPattern element :clone_repository_link, 'Clone repository' # rubocop:disable QA/ElementWithPattern
end end
view 'app/views/projects/wikis/show.html.haml' do
element :wiki_page_content
end
def click_clone_repository def click_clone_repository
click_on 'Clone repository' click_on 'Clone repository'
end end
def wiki_text
find_element(:wiki_page_content).text
end
end end
end end
end end
end end
end end
QA::Page::Project::Wiki::Show.prepend_if_ee('QA::EE::Page::Project::Wiki::Show')
...@@ -31,6 +31,17 @@ module QA ...@@ -31,6 +31,17 @@ module QA
end end
end end
def repository_ssh_uri
@repository_ssh_uri ||= begin
wiki.visit!
Page::Project::Wiki::Show.act do
click_clone_repository
choose_repository_clone_ssh
repository_location.uri
end
end
end
def fabricate! def fabricate!
super super
wiki.visit! wiki.visit!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment