Commit e268575b authored by Lin Jen-Shin's avatar Lin Jen-Shin

Add view elements to deploy keys pages

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