diff options
Diffstat (limited to 'qa/qa/resource/deploy_token.rb')
-rw-r--r-- | qa/qa/resource/deploy_token.rb | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/qa/qa/resource/deploy_token.rb b/qa/qa/resource/deploy_token.rb deleted file mode 100644 index f5d3b87fc2b..00000000000 --- a/qa/qa/resource/deploy_token.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -module QA - module Resource - class DeployToken < Base - attr_accessor :name, :expires_at - attr_writer :scopes - - attribute :username do - 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::Repository.perform do |repository_page| - repository_page.expand_deploy_tokens do |token| - token.token_password - end - end - end - - attribute :project do - Project.fabricate! do |resource| - resource.name = 'project-to-deploy' - resource.description = 'project for adding deploy token test' - end - end - - def fabricate! - project.visit! - - Page::Project::Menu.perform(&:go_to_repository_settings) - - 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(@scopes) - - page.add_token - end - end - end - end - end -end |