summaryrefslogtreecommitdiff
path: root/qa/qa/specs/features/browser_ui/6_release/deploy_token/add_deploy_token_spec.rb
blob: 263ba6a68008f2350e9dcddfb7b7b4d0f5e2fc1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

module QA
  context 'Release' do
    describe 'Deploy token creation' do
      it 'user adds a deploy token' do
        Runtime::Browser.visit(:gitlab, Page::Main::Login)
        Page::Main::Login.act { sign_in_using_credentials }

        deploy_token_name = 'deploy token name'
        deploy_token_expires_at = Date.today + 7 # 1 Week from now

        deploy_token = Factory::Resource::DeployToken.fabricate! do |resource|
          resource.name = deploy_token_name
          resource.expires_at = deploy_token_expires_at
        end

        expect(deploy_token.username.length).to be > 0
        expect(deploy_token.password.length).to be > 0
      end
    end
  end
end