diff --git a/app/views/profiles/keys/_key_table.html.haml b/app/views/profiles/keys/_key_table.html.haml index 4a6d8a1870da26397264d83c3943df8a952cba17..8b8625226451afc1170da76cfa28d36a85f1979f 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 51b7f2dd4b4cc0b6888e425a204ca6624a9a5fa4..ebd99cf8605ebfe6f5aeafa2f7418df7c091e959 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 ce1813b14d054db2611e52919d8209675268eafd..082202f91cae2b8f5bf38aff680c2d4c23709038 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 f79ad510084ed59f4c7882d314ad0bce005006a8..44619d177b1dd04d4478b04e34dfef373f04654d 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 957123008548bdefd0ea0b190ae32db0f9dae666..06cca85cbb2cc0d6bb34b41d84dbe60f8b749974 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!