summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-24 01:43:31 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-24 01:43:31 +0000
commite20a1cde5d740fbc9f4d033786a8cd5ad7eb8b4d (patch)
treecf76b0527f1909eaf1ecac057a4ccc7591cce4f6 /qa
parent5fc725def41e6973e92bc32095774edd60fd154f (diff)
downloadgitlab-ce-e20a1cde5d740fbc9f4d033786a8cd5ad7eb8b4d.tar.gz
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/page/project/settings/ci_cd.rb10
-rw-r--r--qa/qa/page/project/settings/repository.rb10
-rw-r--r--qa/qa/resource/deploy_token.rb14
3 files changed, 17 insertions, 17 deletions
diff --git a/qa/qa/page/project/settings/ci_cd.rb b/qa/qa/page/project/settings/ci_cd.rb
index b3cbf572cb7..c43974c10cb 100644
--- a/qa/qa/page/project/settings/ci_cd.rb
+++ b/qa/qa/page/project/settings/ci_cd.rb
@@ -13,20 +13,10 @@ module QA
element :variables_settings_content
end
- view 'app/views/shared/deploy_tokens/_index.html.haml' do
- element :deploy_tokens_settings
- end
-
view 'app/views/projects/deploy_keys/_index.html.haml' do
element :deploy_keys_settings
end
- def expand_deploy_tokens(&block)
- expand_section(:deploy_tokens_settings) do
- Settings::DeployTokens.perform(&block)
- end
- end
-
def expand_deploy_keys(&block)
expand_section(:deploy_keys_settings) do
Settings::DeployKeys.perform(&block)
diff --git a/qa/qa/page/project/settings/repository.rb b/qa/qa/page/project/settings/repository.rb
index 9b48e62a9f9..97dfc6497a4 100644
--- a/qa/qa/page/project/settings/repository.rb
+++ b/qa/qa/page/project/settings/repository.rb
@@ -15,6 +15,16 @@ module QA
element :mirroring_repositories_settings_section
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_protected_branches(&block)
expand_section(:protected_branches_settings) do
ProtectedBranches.perform(&block)
diff --git a/qa/qa/resource/deploy_token.rb b/qa/qa/resource/deploy_token.rb
index b4baaa47349..0ba8dbbf287 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::CICD.perform do |cicd_page|
- cicd_page.expand_deploy_tokens do |token|
+ Page::Project::Settings::Repository.perform do |repository_page|
+ repository_page.expand_deploy_tokens do |token|
token.token_username
end
end
end
attribute :password do
- Page::Project::Settings::CICD.perform do |cicd_page|
- cicd_page.expand_deploy_tokens do |token|
+ Page::Project::Settings::Repository.perform do |repository_page|
+ repository_page.expand_deploy_tokens do |token|
token.token_password
end
end
@@ -31,10 +31,10 @@ module QA
def fabricate!
project.visit!
- Page::Project::Menu.perform(&:go_to_ci_cd_settings)
+ Page::Project::Menu.perform(&:go_to_repository_settings)
- Page::Project::Settings::CICD.perform do |cicd|
- cicd.expand_deploy_tokens do |page|
+ Page::Project::Settings::Repository.perform do |setting|
+ setting.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)