summaryrefslogtreecommitdiff
path: root/qa/qa/resource/ssh_key.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-11-02 17:32:28 +0800
committerLin Jen-Shin <godfat@godfat.org>2018-11-05 22:20:57 +0800
commit4d0fd75cd5ceda72692a229d27ab6891fa8082e0 (patch)
tree7448b28ca974c9480e1e96b0d90c1322eeb9f0c7 /qa/qa/resource/ssh_key.rb
parentc12a4a9ac7c04a215adf6062fec7bf31231c7d4a (diff)
downloadgitlab-ce-4d0fd75cd5ceda72692a229d27ab6891fa8082e0.tar.gz
Rename QA::Factory to QA::Resource53224-rename-to-resource-base-qa
* Factory::Base -> Resource::Base, and therefore: * Factory::Resource::Project -> Resource::Project
Diffstat (limited to 'qa/qa/resource/ssh_key.rb')
-rw-r--r--qa/qa/resource/ssh_key.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/qa/qa/resource/ssh_key.rb b/qa/qa/resource/ssh_key.rb
new file mode 100644
index 00000000000..c6c97c8532f
--- /dev/null
+++ b/qa/qa/resource/ssh_key.rb
@@ -0,0 +1,26 @@
+# frozen_string_literal: true
+
+module QA
+ module Resource
+ class SSHKey < Base
+ extend Forwardable
+
+ attr_accessor :title
+
+ def_delegators :key, :private_key, :public_key, :fingerprint
+
+ def key
+ @key ||= Runtime::Key::RSA.new
+ end
+
+ def fabricate!
+ Page::Main::Menu.perform(&:go_to_profile_settings)
+ Page::Profile::Menu.perform(&:click_ssh_keys)
+
+ Page::Profile::SSHKeys.perform do |page|
+ page.add_key(public_key, title)
+ end
+ end
+ end
+ end
+end