diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-28 21:09:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-28 21:09:07 +0300 |
commit | 1c8fa70f9d0818e2a82089c8643a6e455bca47fd (patch) | |
tree | f339f97de0425270bdd909e2f4d378927b6e0a18 /qa | |
parent | 736d36d8597d0d1ec1b47644e6d091c3f4a78f45 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/page/project/settings/ci_cd.rb | 10 | ||||
-rw-r--r-- | qa/qa/page/project/settings/deploy_tokens.rb | 4 | ||||
-rw-r--r-- | qa/qa/page/project/settings/repository.rb | 6 | ||||
-rw-r--r-- | qa/qa/resource/deploy_token.rb | 16 |
4 files changed, 19 insertions, 17 deletions
diff --git a/qa/qa/page/project/settings/ci_cd.rb b/qa/qa/page/project/settings/ci_cd.rb index 46f93fad61e..01f7ab43d27 100644 --- a/qa/qa/page/project/settings/ci_cd.rb +++ b/qa/qa/page/project/settings/ci_cd.rb @@ -13,6 +13,16 @@ module QA element :variables_settings_content end + view 'app/views/shared/deploy_tokens/_index.html.haml' do + element :deploy_tokens_settings + end + + def expand_deploy_tokens(&block) + expand_section(:deploy_tokens_settings) do + Settings::DeployTokens.perform(&block) + end + end + def expand_runners_settings(&block) expand_section(:runners_settings_content) do Settings::Runners.perform(&block) diff --git a/qa/qa/page/project/settings/deploy_tokens.rb b/qa/qa/page/project/settings/deploy_tokens.rb index 3173752d40a..3c3ed4f8716 100644 --- a/qa/qa/page/project/settings/deploy_tokens.rb +++ b/qa/qa/page/project/settings/deploy_tokens.rb @@ -5,7 +5,7 @@ module QA module Project module Settings class DeployTokens < Page::Base - view 'app/views/projects/deploy_tokens/_form.html.haml' do + view 'app/views/shared/deploy_tokens/_form.html.haml' do element :deploy_token_name element :deploy_token_expires_at element :deploy_token_read_repository @@ -13,7 +13,7 @@ module QA element :create_deploy_token end - view 'app/views/projects/deploy_tokens/_new_deploy_token.html.haml' do + view 'app/views/shared/deploy_tokens/_new_deploy_token.html.haml' do element :created_deploy_token_section element :deploy_token_user element :deploy_token diff --git a/qa/qa/page/project/settings/repository.rb b/qa/qa/page/project/settings/repository.rb index 58ed37870b7..7875a38dcf3 100644 --- a/qa/qa/page/project/settings/repository.rb +++ b/qa/qa/page/project/settings/repository.rb @@ -31,12 +31,6 @@ module QA end end - def expand_deploy_tokens(&block) - expand_section(:deploy_tokens_settings) do - DeployTokens.perform(&block) - end - end - def expand_mirroring_repositories(&block) expand_section(:mirroring_repositories_settings_section) do MirroringRepositories.perform(&block) diff --git a/qa/qa/resource/deploy_token.rb b/qa/qa/resource/deploy_token.rb index f97e76cc322..b4baaa47349 100644 --- a/qa/qa/resource/deploy_token.rb +++ b/qa/qa/resource/deploy_token.rb @@ -6,16 +6,16 @@ module QA attr_accessor :name, :expires_at attribute :username do - Page::Project::Settings::Repository.perform do |repository_page| - repository_page.expand_deploy_tokens do |token| + Page::Project::Settings::CICD.perform do |cicd_page| + cicd_page.expand_deploy_tokens do |token| token.token_username end end end attribute :password do - Page::Project::Settings::Repository.perform do |repository_page| - repository_page.expand_deploy_tokens do |token| + Page::Project::Settings::CICD.perform do |cicd_page| + cicd_page.expand_deploy_tokens do |token| token.token_password end end @@ -31,12 +31,10 @@ module QA def fabricate! project.visit! - Page::Project::Menu.act do - go_to_repository_settings - end + Page::Project::Menu.perform(&:go_to_ci_cd_settings) - Page::Project::Settings::Repository.perform do |setting| - setting.expand_deploy_tokens do |page| + Page::Project::Settings::CICD.perform do |cicd| + cicd.expand_deploy_tokens do |page| page.fill_token_name(name) page.fill_token_expires_at(expires_at) page.fill_scopes(read_repository: true, read_registry: false) |