Commit 53118659 authored by Alex Kalderimis's avatar Alex Kalderimis

Merge branch 'ld-move-integrations-specs' into 'master'

Move Integrations feature specs from /services to /integrations

See merge request gitlab-org/gitlab!80130
parents 43d680b3 3616ac8f
...@@ -5,7 +5,7 @@ require 'spec_helper' ...@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec.describe 'Prometheus custom metrics', :js do RSpec.describe 'Prometheus custom metrics', :js do
include PrometheusHelpers include PrometheusHelpers
include_context 'project service activation' include_context 'project integration activation'
let!(:prometheus_metric) { create(:prometheus_metric, project: project) } let!(:prometheus_metric) { create(:prometheus_metric, project: project) }
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe 'User activates GitHub Service' do RSpec.describe 'User activates GitHub integration' do
include_context 'project service activation' include_context 'project integration activation'
context 'without a license' do context 'without a license' do
it "is excluded from the integrations index" do it "is excluded from the integrations index" do
...@@ -12,7 +12,7 @@ RSpec.describe 'User activates GitHub Service' do ...@@ -12,7 +12,7 @@ RSpec.describe 'User activates GitHub Service' do
expect(page).not_to have_link('GitHub') expect(page).not_to have_link('GitHub')
end end
it 'renders 404 when trying to access service settings directly' do it 'renders 404 when trying to access integration settings directly' do
visit edit_project_integration_path(project, :github) visit edit_project_integration_path(project, :github)
expect(page).to have_gitlab_http_status(:not_found) expect(page).to have_gitlab_http_status(:not_found)
...@@ -33,7 +33,7 @@ RSpec.describe 'User activates GitHub Service' do ...@@ -33,7 +33,7 @@ RSpec.describe 'User activates GitHub Service' do
fill_in "Repository URL", with: 'https://github.com/h5bp/html5-boilerplate' fill_in "Repository URL", with: 'https://github.com/h5bp/html5-boilerplate'
end end
it 'activates service' do it 'activates integration' do
click_button('Save') click_button('Save')
expect(page).to have_content('GitHub settings saved and active.') expect(page).to have_content('GitHub settings saved and active.')
...@@ -47,7 +47,7 @@ RSpec.describe 'User activates GitHub Service' do ...@@ -47,7 +47,7 @@ RSpec.describe 'User activates GitHub Service' do
let(:pipeline) { create(:ci_pipeline) } let(:pipeline) { create(:ci_pipeline) }
let(:project) { create(:project, ci_pipelines: [pipeline])} let(:project) { create(:project, ci_pipelines: [pipeline])}
it 'tests service before save' do it 'tests integration before save' do
stub_request(:post, "https://api.github.com/repos/h5bp/html5-boilerplate/statuses/#{pipeline.sha}").to_return( stub_request(:post, "https://api.github.com/repos/h5bp/html5-boilerplate/statuses/#{pipeline.sha}").to_return(
body: { context: {} }.to_json, body: { context: {} }.to_json,
headers: { 'Content-Type' => 'application/json' } headers: { 'Content-Type' => 'application/json' }
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe 'User activates Jira', :js do RSpec.describe 'User activates Jira', :js do
include_context 'project service activation' include_context 'project integration activation'
include_context 'project service Jira context' include_context 'project integration Jira context'
describe 'user sets and activates Jira Service' do describe 'user sets and activates Jira integration' do
before do before do
server_info = { key: 'value' }.to_json server_info = { key: 'value' }.to_json
stub_request(:get, test_url).with(basic_auth: %w(username password)).to_return(body: server_info) stub_request(:get, test_url).with(basic_auth: %w(username password)).to_return(body: server_info)
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe 'Disable individual triggers', :js do RSpec.describe 'Disable individual triggers', :js do
include_context 'project service activation' include_context 'project integration activation'
let(:checkbox_selector) { 'input[name$="_events]"]' } let(:checkbox_selector) { 'input[name$="_events]"]' }
before do before do
visit_project_integration(service_name) visit_project_integration(integration_name)
end end
context 'service has multiple supported events' do context 'integration has multiple supported events' do
let(:service_name) { 'Jenkins' } let(:integration_name) { 'Jenkins' }
it 'shows trigger checkboxes' do it 'shows trigger checkboxes' do
event_count = Integrations::Jenkins.supported_events.count event_count = Integrations::Jenkins.supported_events.count
...@@ -22,8 +22,8 @@ RSpec.describe 'Disable individual triggers', :js do ...@@ -22,8 +22,8 @@ RSpec.describe 'Disable individual triggers', :js do
end end
end end
context 'services only has one supported event' do context 'integrations only has one supported event' do
let(:service_name) { 'Asana' } let(:integration_name) { 'Asana' }
it "doesn't show unnecessary Trigger checkboxes" do it "doesn't show unnecessary Trigger checkboxes" do
expect(page).not_to have_content "Trigger" expect(page).not_to have_content "Trigger"
......
...@@ -4,7 +4,7 @@ require 'spec_helper' ...@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec.describe 'Integrations settings form', :js do RSpec.describe 'Integrations settings form', :js do
include IntegrationsHelper include IntegrationsHelper
include_context 'project service activation' include_context 'project integration activation'
# Github integration is EE, so let's remove it here. # Github integration is EE, so let's remove it here.
integration_names = Integration.available_integration_names - %w[github] integration_names = Integration.available_integration_names - %w[github]
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe 'Prometheus external alerts', :js do RSpec.describe 'Prometheus external alerts', :js do
include_context 'project service activation' include_context 'project integration activation'
let(:alerts_section_selector) { '.js-prometheus-alerts' } let(:alerts_section_selector) { '.js-prometheus-alerts' }
let(:alerts_section) { page.find(alerts_section_selector) } let(:alerts_section) { page.find(alerts_section_selector) }
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe 'User activates Asana' do RSpec.describe 'User activates Asana' do
include_context 'project service activation' include_context 'project integration activation'
it 'activates service', :js do it 'activates integration', :js do
visit_project_integration('Asana') visit_project_integration('Asana')
fill_in('API key', with: 'verySecret') fill_in('API key', with: 'verySecret')
fill_in('Restrict to branch', with: 'verySecret') fill_in('Restrict to branch', with: 'verySecret')
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe 'User activates Assembla' do RSpec.describe 'User activates Assembla' do
include_context 'project service activation' include_context 'project integration activation'
before do before do
stub_request(:post, /.*atlas.assembla.com.*/) stub_request(:post, /.*atlas.assembla.com.*/)
end end
it 'activates service', :js do it 'activates integration', :js do
visit_project_integration('Assembla') visit_project_integration('Assembla')
fill_in('Token', with: 'verySecret') fill_in('Token', with: 'verySecret')
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe 'User activates Atlassian Bamboo CI' do RSpec.describe 'User activates Atlassian Bamboo CI' do
include_context 'project service activation' include_context 'project integration activation'
before do before do
stub_request(:get, /.*bamboo.example.com.*/) stub_request(:get, /.*bamboo.example.com.*/)
end end
it 'activates service', :js do it 'activates integration', :js do
visit_project_integration('Atlassian Bamboo') visit_project_integration('Atlassian Bamboo')
fill_in('Bamboo URL', with: 'http://bamboo.example.com') fill_in('Bamboo URL', with: 'http://bamboo.example.com')
fill_in('Build key', with: 'KEY') fill_in('Build key', with: 'KEY')
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe 'User activates Emails on push' do RSpec.describe 'User activates Emails on push' do
include_context 'project service activation' include_context 'project integration activation'
it 'activates service', :js do it 'activates integration', :js do
visit_project_integration('Emails on push') visit_project_integration('Emails on push')
fill_in('Recipients', with: 'qa@company.name') fill_in('Recipients', with: 'qa@company.name')
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe 'User activates Flowdock' do RSpec.describe 'User activates Flowdock' do
include_context 'project service activation' do include_context 'project integration activation' do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
end end
...@@ -11,7 +11,7 @@ RSpec.describe 'User activates Flowdock' do ...@@ -11,7 +11,7 @@ RSpec.describe 'User activates Flowdock' do
stub_request(:post, /.*api.flowdock.com.*/) stub_request(:post, /.*api.flowdock.com.*/)
end end
it 'activates service', :js do it 'activates integration', :js do
visit_project_integration('Flowdock') visit_project_integration('Flowdock')
fill_in('Token', with: 'verySecret') fill_in('Token', with: 'verySecret')
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe 'User activates irker (IRC gateway)' do RSpec.describe 'User activates irker (IRC gateway)' do
include_context 'project service activation' include_context 'project integration activation'
it 'activates service', :js do it 'activates integration', :js do
visit_project_integration('irker (IRC gateway)') visit_project_integration('irker (IRC gateway)')
check('Colorize messages') check('Colorize messages')
fill_in('Recipients', with: 'irc://chat.freenode.net/#commits') fill_in('Recipients', with: 'irc://chat.freenode.net/#commits')
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe 'User activates issue tracker', :js do RSpec.describe 'User activates issue tracker', :js do
include_context 'project service activation' include_context 'project integration activation'
let(:url) { 'http://tracker.example.com' } let(:url) { 'http://tracker.example.com' }
...@@ -17,7 +17,7 @@ RSpec.describe 'User activates issue tracker', :js do ...@@ -17,7 +17,7 @@ RSpec.describe 'User activates issue tracker', :js do
end end
shared_examples 'external issue tracker activation' do |tracker:, skip_new_issue_url: false, skip_test: false| shared_examples 'external issue tracker activation' do |tracker:, skip_new_issue_url: false, skip_test: false|
describe 'user sets and activates the Service' do describe 'user sets and activates the integration' do
context 'when the connection test succeeds' do context 'when the connection test succeeds' do
before do before do
stub_request(:head, url).to_return(headers: { 'Content-Type' => 'application/json' }) stub_request(:head, url).to_return(headers: { 'Content-Type' => 'application/json' })
...@@ -32,7 +32,7 @@ RSpec.describe 'User activates issue tracker', :js do ...@@ -32,7 +32,7 @@ RSpec.describe 'User activates issue tracker', :js do
end end
end end
it 'activates the service' do it 'activates the integration' do
expect(page).to have_content("#{tracker} settings saved and active.") expect(page).to have_content("#{tracker} settings saved and active.")
expect(current_path).to eq(edit_project_integration_path(project, tracker.parameterize(separator: '_'))) expect(current_path).to eq(edit_project_integration_path(project, tracker.parameterize(separator: '_')))
end end
...@@ -45,7 +45,7 @@ RSpec.describe 'User activates issue tracker', :js do ...@@ -45,7 +45,7 @@ RSpec.describe 'User activates issue tracker', :js do
end end
context 'when the connection test fails' do context 'when the connection test fails' do
it 'activates the service' do it 'activates the integration' do
stub_request(:head, url).to_raise(Gitlab::HTTP::Error) stub_request(:head, url).to_raise(Gitlab::HTTP::Error)
visit_project_integration(tracker) visit_project_integration(tracker)
...@@ -63,7 +63,7 @@ RSpec.describe 'User activates issue tracker', :js do ...@@ -63,7 +63,7 @@ RSpec.describe 'User activates issue tracker', :js do
end end
end end
describe 'user disables the service' do describe 'user disables the integration' do
before do before do
visit_project_integration(tracker) visit_project_integration(tracker)
fill_form(disable: true, skip_new_issue_url: skip_new_issue_url) fill_form(disable: true, skip_new_issue_url: skip_new_issue_url)
...@@ -71,7 +71,7 @@ RSpec.describe 'User activates issue tracker', :js do ...@@ -71,7 +71,7 @@ RSpec.describe 'User activates issue tracker', :js do
click_button('Save changes') click_button('Save changes')
end end
it 'saves but does not activate the service' do it 'saves but does not activate the integration' do
expect(page).to have_content("#{tracker} settings saved, but not active.") expect(page).to have_content("#{tracker} settings saved, but not active.")
expect(current_path).to eq(edit_project_integration_path(project, tracker.parameterize(separator: '_'))) expect(current_path).to eq(edit_project_integration_path(project, tracker.parameterize(separator: '_')))
end end
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe 'User activates JetBrains TeamCity CI' do RSpec.describe 'User activates JetBrains TeamCity CI' do
include_context 'project service activation' include_context 'project integration activation'
before do before do
stub_request(:post, /.*teamcity.example.com.*/) stub_request(:post, /.*teamcity.example.com.*/)
end end
it 'activates service', :js do it 'activates integration', :js do
visit_project_integration('JetBrains TeamCity') visit_project_integration('JetBrains TeamCity')
check('Push') check('Push')
check('Merge Request') check('Merge Request')
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe 'User activates Jira', :js do RSpec.describe 'User activates Jira', :js do
include_context 'project service activation' include_context 'project integration activation'
include_context 'project service Jira context' include_context 'project integration Jira context'
before do before do
stub_request(:get, test_url).to_return(body: { key: 'value' }.to_json) stub_request(:get, test_url).to_return(body: { key: 'value' }.to_json)
end end
describe 'user tests Jira Service' do describe 'user tests Jira integration' do
context 'when Jira connection test succeeds' do context 'when Jira connection test succeeds' do
before do before do
visit_project_integration('Jira') visit_project_integration('Jira')
...@@ -18,7 +18,7 @@ RSpec.describe 'User activates Jira', :js do ...@@ -18,7 +18,7 @@ RSpec.describe 'User activates Jira', :js do
click_test_then_save_integration(expect_test_to_fail: false) click_test_then_save_integration(expect_test_to_fail: false)
end end
it 'activates the Jira service' do it 'activates the Jira integration' do
expect(page).to have_content('Jira settings saved and active.') expect(page).to have_content('Jira settings saved and active.')
expect(current_path).to eq(edit_project_integration_path(project, :jira)) expect(current_path).to eq(edit_project_integration_path(project, :jira))
end end
...@@ -46,7 +46,7 @@ RSpec.describe 'User activates Jira', :js do ...@@ -46,7 +46,7 @@ RSpec.describe 'User activates Jira', :js do
end end
end end
it 'activates the Jira service' do it 'activates the Jira integration' do
stub_request(:get, test_url).with(basic_auth: %w(username password)) stub_request(:get, test_url).with(basic_auth: %w(username password))
.to_raise(JIRA::HTTPError.new(double(message: 'message'))) .to_raise(JIRA::HTTPError.new(double(message: 'message')))
...@@ -60,7 +60,7 @@ RSpec.describe 'User activates Jira', :js do ...@@ -60,7 +60,7 @@ RSpec.describe 'User activates Jira', :js do
end end
end end
describe 'user disables the Jira Service' do describe 'user disables the Jira integration' do
include JiraServiceHelper include JiraServiceHelper
before do before do
...@@ -70,7 +70,7 @@ RSpec.describe 'User activates Jira', :js do ...@@ -70,7 +70,7 @@ RSpec.describe 'User activates Jira', :js do
click_save_integration click_save_integration
end end
it 'saves but does not activate the Jira service' do it 'saves but does not activate the Jira integration' do
expect(page).to have_content('Jira settings saved, but not active.') expect(page).to have_content('Jira settings saved, but not active.')
expect(current_path).to eq(edit_project_integration_path(project, :jira)) expect(current_path).to eq(edit_project_integration_path(project, :jira))
end end
......
...@@ -4,14 +4,14 @@ require 'spec_helper' ...@@ -4,14 +4,14 @@ require 'spec_helper'
RSpec.describe 'Set up Mattermost slash commands', :js do RSpec.describe 'Set up Mattermost slash commands', :js do
describe 'user visits the mattermost slash command config page' do describe 'user visits the mattermost slash command config page' do
include_context 'project service activation' include_context 'project integration activation'
before do before do
stub_mattermost_setting(enabled: mattermost_enabled) stub_mattermost_setting(enabled: mattermost_enabled)
visit_project_integration('Mattermost slash commands') visit_project_integration('Mattermost slash commands')
end end
context 'mattermost service is enabled' do context 'mattermost integration is enabled' do
let(:mattermost_enabled) { true } let(:mattermost_enabled) { true }
describe 'activation' do describe 'activation' do
...@@ -84,7 +84,9 @@ RSpec.describe 'Set up Mattermost slash commands', :js do ...@@ -84,7 +84,9 @@ RSpec.describe 'Set up Mattermost slash commands', :js do
end end
it 'shows an error alert with the error message if there is an error requesting teams' do it 'shows an error alert with the error message if there is an error requesting teams' do
allow_any_instance_of(Integrations::MattermostSlashCommands).to receive(:list_teams) { [[], 'test mattermost error message'] } allow_next_instance_of(Integrations::MattermostSlashCommands) do |integration|
allow(integration).to receive(:list_teams).and_return([[], 'test mattermost error message'])
end
click_link 'Add to Mattermost' click_link 'Add to Mattermost'
...@@ -113,7 +115,9 @@ RSpec.describe 'Set up Mattermost slash commands', :js do ...@@ -113,7 +115,9 @@ RSpec.describe 'Set up Mattermost slash commands', :js do
def stub_teams(count: 0) def stub_teams(count: 0)
teams = create_teams(count) teams = create_teams(count)
allow_any_instance_of(Integrations::MattermostSlashCommands).to receive(:list_teams) { [teams, nil] } allow_next_instance_of(Integrations::MattermostSlashCommands) do |integration|
allow(integration).to receive(:list_teams).and_return([teams, nil])
end
teams teams
end end
...@@ -129,7 +133,7 @@ RSpec.describe 'Set up Mattermost slash commands', :js do ...@@ -129,7 +133,7 @@ RSpec.describe 'Set up Mattermost slash commands', :js do
end end
end end
context 'mattermost service is not enabled' do context 'mattermost integration is not enabled' do
let(:mattermost_enabled) { false } let(:mattermost_enabled) { false }
it 'shows the correct trigger url' do it 'shows the correct trigger url' do
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe 'User activates Packagist' do RSpec.describe 'User activates Packagist' do
include_context 'project service activation' include_context 'project integration activation'
before do before do
stub_request(:post, /.*packagist.org.*/) stub_request(:post, /.*packagist.org.*/)
end end
it 'activates service', :js do it 'activates integration', :js do
visit_project_integration('Packagist') visit_project_integration('Packagist')
fill_in('Username', with: 'theUser') fill_in('Username', with: 'theUser')
fill_in('Token', with: 'verySecret') fill_in('Token', with: 'verySecret')
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe 'User activates PivotalTracker' do RSpec.describe 'User activates PivotalTracker' do
include_context 'project service activation' include_context 'project integration activation'
before do before do
stub_request(:post, /.*www.pivotaltracker.com.*/) stub_request(:post, /.*www.pivotaltracker.com.*/)
end end
it 'activates service', :js do it 'activates integration', :js do
visit_project_integration('Pivotal Tracker') visit_project_integration('Pivotal Tracker')
fill_in('Token', with: 'verySecret') fill_in('Token', with: 'verySecret')
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe 'User activates Prometheus' do RSpec.describe 'User activates Prometheus' do
include_context 'project service activation' include_context 'project integration activation'
before do before do
stub_request(:get, /.*prometheus.example.com.*/) stub_request(:get, /.*prometheus.example.com.*/)
end end
it 'does not activate service and informs about deprecation', :js do it 'does not activate integration and informs about deprecation', :js do
visit_project_integration('Prometheus') visit_project_integration('Prometheus')
check('Active') check('Active')
fill_in('API URL', with: 'http://prometheus.example.com') fill_in('API URL', with: 'http://prometheus.example.com')
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe 'User activates Pushover' do RSpec.describe 'User activates Pushover' do
include_context 'project service activation' include_context 'project integration activation'
before do before do
stub_request(:post, /.*api.pushover.net.*/) stub_request(:post, /.*api.pushover.net.*/)
end end
it 'activates service', :js do it 'activates integration', :js do
visit_project_integration('Pushover') visit_project_integration('Pushover')
fill_in('API key', with: 'verySecret') fill_in('API key', with: 'verySecret')
fill_in('User key', with: 'verySecret') fill_in('User key', with: 'verySecret')
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe 'User activates Slack notifications', :js do RSpec.describe 'User activates Slack notifications', :js do
include_context 'project service activation' include_context 'project integration activation'
context 'when service is not configured yet' do context 'when integration is not configured yet' do
before do before do
visit_project_integration('Slack notifications') visit_project_integration('Slack notifications')
end end
it 'activates service' do it 'activates integration' do
fill_in('Webhook', with: 'https://hooks.slack.com/services/SVRWFV0VVAR97N/B02R25XN3/ZBqu7xMupaEEICInN685') fill_in('Webhook', with: 'https://hooks.slack.com/services/SVRWFV0VVAR97N/B02R25XN3/ZBqu7xMupaEEICInN685')
click_test_then_save_integration click_test_then_save_integration
...@@ -19,7 +19,7 @@ RSpec.describe 'User activates Slack notifications', :js do ...@@ -19,7 +19,7 @@ RSpec.describe 'User activates Slack notifications', :js do
end end
end end
context 'when service is already configured' do context 'when integration is already configured' do
let(:integration) { Integrations::Slack.new } let(:integration) { Integrations::Slack.new }
let(:project) { create(:project, slack_integration: integration) } let(:project) { create(:project, slack_integration: integration) }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe 'Slack slash commands', :js do RSpec.describe 'Slack slash commands', :js do
include_context 'project service activation' include_context 'project integration activation'
before do before do
visit_project_integration('Slack slash commands') visit_project_integration('Slack slash commands')
......
...@@ -5,7 +5,7 @@ require 'spec_helper' ...@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec.describe 'User uses inherited settings', :js do RSpec.describe 'User uses inherited settings', :js do
include JiraServiceHelper include JiraServiceHelper
include_context 'project service activation' include_context 'project integration activation'
before do before do
stub_jira_integration_test stub_jira_integration_test
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe 'User views services', :js do RSpec.describe 'User views integrations', :js do
include_context 'project service activation' include_context 'project integration activation'
it 'shows the list of available services' do it 'shows the list of available integrations' do
visit_project_integrations visit_project_integrations
expect(page).to have_content('Integrations') expect(page).to have_content('Integrations')
......
# frozen_string_literal: true # frozen_string_literal: true
RSpec.shared_context 'project service Jira context' do RSpec.shared_context 'project integration Jira context' do
let(:url) { 'https://jira.example.com' } let(:url) { 'https://jira.example.com' }
let(:test_url) { 'https://jira.example.com/rest/api/2/serverInfo' } let(:test_url) { 'https://jira.example.com/rest/api/2/serverInfo' }
......
# frozen_string_literal: true # frozen_string_literal: true
RSpec.shared_context 'project service activation' do RSpec.shared_context 'project integration activation' do
include_context 'integration activation' include_context 'integration activation'
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment