diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 12:26:25 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 12:26:25 +0000 |
commit | a09983ae35713f5a2bbb100981116d31ce99826e (patch) | |
tree | 2ee2af7bd104d57086db360a7e6d8c9d5d43667a /qa/qa/specs/features/browser_ui/3_create/repository/ssh_key_support_spec.rb | |
parent | 18c5ab32b738c0b6ecb4d0df3994000482f34bd8 (diff) | |
download | gitlab-ce-a09983ae35713f5a2bbb100981116d31ce99826e.tar.gz |
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'qa/qa/specs/features/browser_ui/3_create/repository/ssh_key_support_spec.rb')
-rw-r--r-- | qa/qa/specs/features/browser_ui/3_create/repository/ssh_key_support_spec.rb | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/ssh_key_support_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/ssh_key_support_spec.rb new file mode 100644 index 00000000000..d67e4a4ea83 --- /dev/null +++ b/qa/qa/specs/features/browser_ui/3_create/repository/ssh_key_support_spec.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +module QA + RSpec.describe 'SSH keys support', :smoke do + key_title = "key for ssh tests #{Time.now.to_f}" + key = nil + + before do + Flow::Login.sign_in + end + + it 'user can add an SSH key' do + key = Resource::SSHKey.fabricate_via_browser_ui! do |resource| + resource.title = key_title + end + + expect(page).to have_content(key.title) + expect(page).to have_content(key.md5_fingerprint) + end + + # Note this context ensures that the example it contains is executed after the example above. Be aware of the order of execution if you add new examples in either context. + context 'after adding an ssh key' do + it 'can delete an ssh key' do + Page::Main::Menu.perform(&:click_settings_link) + Page::Profile::Menu.perform(&: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.md5_fingerprint) + end + end + end +end |