Commit 77d70b2a authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'qa-add-deploy-key-view-elements' into 'master'

Add view elements to deploy keys pages

See merge request gitlab-org/gitlab-ce!16464
parents 4be30572 d56f059c
......@@ -3,9 +3,9 @@ module QA
module Project
module Settings
module Common
def expand(selector)
def expand(element_name)
page.within('#content-body') do
find(selector).click
click_element(element_name)
yield
end
......
......@@ -3,12 +3,19 @@ module QA
module Project
module Settings
class DeployKeys < Page::Base
##
# TODO, define all selectors required by this page object
#
# See gitlab-org/gitlab-qa#154
#
view 'app/views/projects/deploy_keys/edit.html.haml'
view 'app/views/projects/deploy_keys/_form.html.haml' do
element :deploy_key_title, 'text_field :title'
element :deploy_key_key, 'text_area :key'
end
view 'app/assets/javascripts/deploy_keys/components/app.vue' do
element :deploy_keys_section, /class=".*deploy\-keys.*"/
end
view 'app/assets/javascripts/deploy_keys/components/key.vue' do
element :key_title, /class=".*title.*"/
element :key_title_field, '{{ deployKey.title }}'
end
def fill_key_title(title)
fill_in 'deploy_key_title', with: title
......
......@@ -5,15 +5,12 @@ module QA
class Repository < Page::Base
include Common
##
# TODO, define all selectors required by this page object
#
# See gitlab-org/gitlab-qa#154
#
view 'app/views/projects/settings/repository/show.html.haml'
view 'app/views/projects/deploy_keys/_index.html.haml' do
element :expand_deploy_keys
end
def expand_deploy_keys(&block)
expand('.qa-expand-deploy-keys') do
expand(:expand_deploy_keys) do
DeployKeys.perform(&block)
end
end
......
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