summaryrefslogtreecommitdiff
path: root/qa/qa/specs/features
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-10-08 15:31:57 -0700
committerStan Hu <stanhu@gmail.com>2018-10-12 06:07:41 -0700
commitbf4568811a5eb62aa51f7f7b4f9835112bd787e4 (patch)
tree33693816a747cea0816acee9c56717734a8aaacb /qa/qa/specs/features
parenta5ecb5bbdac05c3b1a96ecb918ce6a4ceed37d75 (diff)
downloadgitlab-ce-bf4568811a5eb62aa51f7f7b4f9835112bd787e4.tar.gz
Add GitLab QA spec for adding a deploy token
Diffstat (limited to 'qa/qa/specs/features')
-rw-r--r--qa/qa/specs/features/browser_ui/6_release/deploy_token/add_deploy_token_spec.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/qa/qa/specs/features/browser_ui/6_release/deploy_token/add_deploy_token_spec.rb b/qa/qa/specs/features/browser_ui/6_release/deploy_token/add_deploy_token_spec.rb
new file mode 100644
index 00000000000..e521597e07f
--- /dev/null
+++ b/qa/qa/specs/features/browser_ui/6_release/deploy_token/add_deploy_token_spec.rb
@@ -0,0 +1,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