summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/views/profiles/keys/_key_table.html.haml2
-rw-r--r--app/views/projects/wikis/show.html.haml2
-rw-r--r--qa/qa/page/profile/ssh_keys.rb8
-rw-r--r--qa/qa/page/project/wiki/show.rb10
-rw-r--r--qa/qa/resource/repository/wiki_push.rb11
5 files changed, 31 insertions, 2 deletions
diff --git a/app/views/profiles/keys/_key_table.html.haml b/app/views/profiles/keys/_key_table.html.haml
index 4a6d8a1870d..8b862522645 100644
--- a/app/views/profiles/keys/_key_table.html.haml
+++ b/app/views/profiles/keys/_key_table.html.haml
@@ -1,7 +1,7 @@
- is_admin = local_assigns.fetch(:admin, false)
- 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 }
- else
%p.settings-message.text-center
diff --git a/app/views/projects/wikis/show.html.haml b/app/views/projects/wikis/show.html.haml
index 51b7f2dd4b4..ebd99cf8605 100644
--- a/app/views/projects/wikis/show.html.haml
+++ b/app/views/projects/wikis/show.html.haml
@@ -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
.prepend-top-default.append-bottom-default
- .md.md-file
+ .md.md-file{ data: { qa_selector: 'wiki_page_content' } }
= render_wiki_content(@page)
= render 'sidebar'
diff --git a/qa/qa/page/profile/ssh_keys.rb b/qa/qa/page/profile/ssh_keys.rb
index ce1813b14d0..082202f91ca 100644
--- a/qa/qa/page/profile/ssh_keys.rb
+++ b/qa/qa/page/profile/ssh_keys.rb
@@ -14,6 +14,10 @@ module QA
element :delete_key_button
end
+ view 'app/views/profiles/keys/_key_table.html.haml' do
+ element :ssh_keys_list
+ end
+
def add_key(public_key, title)
fill_element :key_public_key_field, public_key
fill_element :key_title_field, title
@@ -28,6 +32,10 @@ module QA
click_element :delete_key_button
end
end
+
+ def keys_list
+ find_element(:ssh_keys_list).text
+ end
end
end
end
diff --git a/qa/qa/page/project/wiki/show.rb b/qa/qa/page/project/wiki/show.rb
index f79ad510084..44619d177b1 100644
--- a/qa/qa/page/project/wiki/show.rb
+++ b/qa/qa/page/project/wiki/show.rb
@@ -11,11 +11,21 @@ module QA
element :clone_repository_link, 'Clone repository' # rubocop:disable QA/ElementWithPattern
end
+ view 'app/views/projects/wikis/show.html.haml' do
+ element :wiki_page_content
+ end
+
def click_clone_repository
click_on 'Clone repository'
end
+
+ def wiki_text
+ find_element(:wiki_page_content).text
+ end
end
end
end
end
end
+
+QA::Page::Project::Wiki::Show.prepend_if_ee('QA::EE::Page::Project::Wiki::Show')
diff --git a/qa/qa/resource/repository/wiki_push.rb b/qa/qa/resource/repository/wiki_push.rb
index 95712300854..06cca85cbb2 100644
--- a/qa/qa/resource/repository/wiki_push.rb
+++ b/qa/qa/resource/repository/wiki_push.rb
@@ -31,6 +31,17 @@ module QA
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!
super
wiki.visit!