summaryrefslogtreecommitdiff
path: root/qa/qa/specs/features/browser_ui/3_create/repository/add_ssh_key_spec.rb
diff options
context:
space:
mode:
authorMark Lapierre <mlapierre@gmail.com>2018-06-11 18:58:06 -0400
committerMark Lapierre <mlapierre@gitlab.com>2018-09-15 11:09:34 -0400
commit6cf55e51292852975e8cc5df4bb54ca39e5dc727 (patch)
tree97891f89e8d7688b927238d3a6b58ca4f2e0581e /qa/qa/specs/features/browser_ui/3_create/repository/add_ssh_key_spec.rb
parent265b49135436af9b8938c4b21b13462f0cfffdcb (diff)
downloadgitlab-ce-6cf55e51292852975e8cc5df4bb54ca39e5dc727.tar.gz
Add an SSH key and use it to clone and push
Adds 2 end-to-end tests: 1. Add and remove an SSH key 2. Add an SSH key and use it to clone and push Includes changes to factories to allow Git actions via SSH
Diffstat (limited to 'qa/qa/specs/features/browser_ui/3_create/repository/add_ssh_key_spec.rb')
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/add_ssh_key_spec.rb31
1 files changed, 31 insertions, 0 deletions
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/add_ssh_key_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/add_ssh_key_spec.rb
new file mode 100644
index 00000000000..84f663c4866
--- /dev/null
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/add_ssh_key_spec.rb
@@ -0,0 +1,31 @@
+# frozen_string_literal: true
+
+module QA
+ context :create do
+ describe 'SSH keys support' do
+ let(:key_title) { "key for ssh tests #{Time.now.to_f}" }
+
+ it 'user adds and then removes an SSH key' do
+ Runtime::Browser.visit(:gitlab, Page::Main::Login)
+ Page::Main::Login.act { sign_in_using_credentials }
+
+ key = Factory::Resource::SSHKey.fabricate! do |resource|
+ resource.title = key_title
+ end
+
+ expect(page).to have_content("Title: #{key_title}")
+ expect(page).to have_content(key.fingerprint)
+
+ Page::Menu::Main.act { go_to_profile_settings }
+ Page::Menu::Profile.act { click_ssh_keys }
+
+ Page::Profile::SSHKeys.perform do |ssh_keys|
+ ssh_keys.remove_key(key_title)
+ end
+
+ expect(page).not_to have_content("Title: #{key_title}")
+ expect(page).not_to have_content(key.fingerprint)
+ end
+ end
+ end
+end