diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-11 15:09:37 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-11 15:09:37 +0000 |
commit | a210c43e0aca0311cc1d3d381763b25979ec72dc (patch) | |
tree | 0325d173da7a6e7bd6c2cdf450d0aa1c4e142d0f /qa/qa/specs | |
parent | c9687bdf58e9d4a9c3942f587bd4841f42e3b5de (diff) | |
download | gitlab-ce-a210c43e0aca0311cc1d3d381763b25979ec72dc.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa/qa/specs')
3 files changed, 7 insertions, 15 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 index c3379d41ff2..25866e12185 100644 --- 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 @@ -8,7 +8,7 @@ module QA it 'user adds and then removes an SSH key', :smoke do Flow::Login.sign_in - key = Resource::SSHKey.fabricate! do |resource| + key = Resource::SSHKey.fabricate_via_browser_ui! do |resource| resource.title = key_title end diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb index a9e9380cac4..e845c3ca8ea 100644 --- a/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb @@ -11,29 +11,24 @@ module QA let(:key_title) { "key for ssh tests #{Time.now.to_f}" } let(:ssh_key) do - Resource::SSHKey.fabricate! do |resource| + Resource::SSHKey.fabricate_via_api! do |resource| resource.title = key_title end end around do |example| - # Create an SSH key to be used with Git + # Create an SSH key to be used with Git, then remove it after the test Flow::Login.sign_in ssh_key example.run - # Remove the SSH key - Flow::Login.sign_in - 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 + ssh_key.remove_via_api! + + Page::Main::Menu.perform(&:sign_out_if_signed_in) end it 'user pushes to the repository' do - # Create a project to push to project = Resource::Project.fabricate_via_api! do |project| project.name = 'git-protocol-project' end @@ -68,11 +63,8 @@ module QA project.visit! project.wait_for_push_new_branch - # Check that the push worked expect(page).to have_content(file_name) expect(page).to have_content(file_content) - - # And check that the correct Git protocol was used expect(git_protocol_reported).to eq(git_protocol) end end diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/use_ssh_key_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/use_ssh_key_spec.rb index ab60ee33c1e..1a3c6d03098 100644 --- a/qa/qa/specs/features/browser_ui/3_create/repository/use_ssh_key_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/repository/use_ssh_key_spec.rb @@ -11,7 +11,7 @@ module QA it 'user adds an ssh key and pushes code to the repository' do Flow::Login.sign_in - key = Resource::SSHKey.fabricate! do |resource| + key = Resource::SSHKey.fabricate_via_api! do |resource| resource.title = key_title end |