diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-06 09:09:17 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-06 09:09:17 +0000 |
commit | eaea945e0355826c58c3dcf887496ea91064f85c (patch) | |
tree | 0f20e03304d35e68375e99a606b9b94483e37ee5 /spec/support | |
parent | cce8cf03d3bebe8b05375e4db0004328f84b28a2 (diff) | |
download | gitlab-ce-eaea945e0355826c58c3dcf887496ea91064f85c.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/shared_contexts/project_service_shared_context.rb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/spec/support/shared_contexts/project_service_shared_context.rb b/spec/support/shared_contexts/project_service_shared_context.rb new file mode 100644 index 00000000000..89b196e7039 --- /dev/null +++ b/spec/support/shared_contexts/project_service_shared_context.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +shared_context 'project service activation' do + let(:project) { create(:project) } + let(:user) { create(:user) } + + before do + project.add_maintainer(user) + sign_in(user) + end + + def visit_project_integrations + visit project_settings_integrations_path(project) + end + + def visit_project_integration(name) + visit_project_integrations + click_link(name) + end + + def click_test_integration + click_button('Test settings and save changes') + end + + def click_test_then_save_integration + click_test_integration + + expect(page).to have_content('Test failed.') + + click_link('Save anyway') + end +end |