diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-01-15 17:38:15 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-01-15 17:38:15 +0300 |
commit | e268575b08ccaf30a844fdb37898d680d0cbb98d (patch) | |
tree | 8095e9446aadd37feb2904eab2541e3670838966 /qa | |
parent | abae33a8ec5965a236f2e15ce6e6b6dc88d88537 (diff) |
Add view elements to deploy keys pages
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/page/project/settings/common.rb | 4 | ||||
-rw-r--r-- | qa/qa/page/project/settings/deploy_keys.rb | 18 | ||||
-rw-r--r-- | qa/qa/page/project/settings/repository.rb | 11 |
3 files changed, 18 insertions, 15 deletions
diff --git a/qa/qa/page/project/settings/common.rb b/qa/qa/page/project/settings/common.rb index 5d1d5120929..b4ef07e1540 100644 --- a/qa/qa/page/project/settings/common.rb +++ b/qa/qa/page/project/settings/common.rb @@ -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 diff --git a/qa/qa/page/project/settings/deploy_keys.rb b/qa/qa/page/project/settings/deploy_keys.rb index a8d6f09777c..c6a07b59493 100644 --- a/qa/qa/page/project/settings/deploy_keys.rb +++ b/qa/qa/page/project/settings/deploy_keys.rb @@ -3,12 +3,18 @@ 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, 'deploy-keys' + end + + view 'app/assets/javascripts/deploy_keys/components/key.vue' do + element :key_title, 'class="title"' + end def fill_key_title(title) fill_in 'deploy_key_title', with: title diff --git a/qa/qa/page/project/settings/repository.rb b/qa/qa/page/project/settings/repository.rb index 524d87c6be9..6cc68358c8c 100644 --- a/qa/qa/page/project/settings/repository.rb +++ b/qa/qa/page/project/settings/repository.rb @@ -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 |