Commit 523c3082 authored by Justin Ho's avatar Justin Ho

Rename routes for project services

Most of the references to "services" have already
been renamed to "integrations" but the project services
have not been updated yet. This change takes a small step
towards updating them by renaming the route the user
sees to "integrations".

We also need to update all references to paths in HAML
views.

Changelog: changed
parent a38e7b39
...@@ -20,7 +20,7 @@ class Projects::MattermostsController < Projects::ApplicationController ...@@ -20,7 +20,7 @@ class Projects::MattermostsController < Projects::ApplicationController
if result if result
flash[:notice] = 'This service is now configured' flash[:notice] = 'This service is now configured'
redirect_to edit_project_service_path(@project, integration) redirect_to edit_project_integration_path(@project, integration)
else else
flash[:alert] = message || 'Failed to configure service' flash[:alert] = message || 'Failed to configure service'
redirect_to new_project_mattermost_path(@project) redirect_to new_project_mattermost_path(@project)
......
...@@ -66,7 +66,7 @@ module Projects ...@@ -66,7 +66,7 @@ module Projects
) )
if @metric.persisted? if @metric.persisted?
redirect_to edit_project_service_path(project, ::Integrations::Prometheus), redirect_to edit_project_integration_path(project, ::Integrations::Prometheus),
notice: _('Metric was successfully added.') notice: _('Metric was successfully added.')
else else
render 'new' render 'new'
...@@ -77,7 +77,7 @@ module Projects ...@@ -77,7 +77,7 @@ module Projects
@metric = update_metrics_service(prometheus_metric).execute @metric = update_metrics_service(prometheus_metric).execute
if @metric.persisted? if @metric.persisted?
redirect_to edit_project_service_path(project, ::Integrations::Prometheus), redirect_to edit_project_integration_path(project, ::Integrations::Prometheus),
notice: _('Metric was successfully updated.') notice: _('Metric was successfully updated.')
else else
render 'edit' render 'edit'
...@@ -93,7 +93,7 @@ module Projects ...@@ -93,7 +93,7 @@ module Projects
respond_to do |format| respond_to do |format|
format.html do format.html do
redirect_to edit_project_service_path(project, ::Integrations::Prometheus), status: :see_other redirect_to edit_project_integration_path(project, ::Integrations::Prometheus), status: :see_other
end end
format.json do format.json do
head :ok head :ok
......
...@@ -7,7 +7,7 @@ class Projects::ServiceHookLogsController < Projects::HookLogsController ...@@ -7,7 +7,7 @@ class Projects::ServiceHookLogsController < Projects::HookLogsController
def retry def retry
execute_hook execute_hook
redirect_to edit_project_service_path(@project, @integration) redirect_to edit_project_integration_path(@project, @integration)
end end
private private
......
...@@ -66,7 +66,7 @@ class Projects::ServicesController < Projects::ApplicationController ...@@ -66,7 +66,7 @@ class Projects::ServicesController < Projects::ApplicationController
private private
def redirect_path def redirect_path
safe_redirect_path(params[:redirect_to]).presence || edit_project_service_path(project, integration) safe_redirect_path(params[:redirect_to]).presence || edit_project_integration_path(project, integration)
end end
def service_test_response def service_test_response
...@@ -119,7 +119,7 @@ class Projects::ServicesController < Projects::ApplicationController ...@@ -119,7 +119,7 @@ class Projects::ServicesController < Projects::ApplicationController
end end
def redirect_deprecated_prometheus_integration def redirect_deprecated_prometheus_integration
redirect_to edit_project_service_path(project, integration) if integration.is_a?(::Integrations::Prometheus) && Feature.enabled?(:settings_operations_prometheus_service, project) redirect_to edit_project_integration_path(project, integration) if integration.is_a?(::Integrations::Prometheus) && Feature.enabled?(:settings_operations_prometheus_service, project)
end end
def set_deprecation_notice_for_prometheus_integration def set_deprecation_notice_for_prometheus_integration
......
...@@ -5,7 +5,7 @@ module CustomMetricsHelper ...@@ -5,7 +5,7 @@ module CustomMetricsHelper
{ {
'custom-metrics-path' => url_for([project, metric]), 'custom-metrics-path' => url_for([project, metric]),
'metric-persisted' => metric.persisted?.to_s, 'metric-persisted' => metric.persisted?.to_s,
'edit-project-service-path' => edit_project_service_path(project, ::Integrations::Prometheus), 'edit-project-service-path' => edit_project_integration_path(project, ::Integrations::Prometheus),
'validate-query-path' => validate_query_project_prometheus_metrics_path(project), 'validate-query-path' => validate_query_project_prometheus_metrics_path(project),
'title' => metric.title.to_s, 'title' => metric.title.to_s,
'query' => metric.query.to_s, 'query' => metric.query.to_s,
......
...@@ -59,7 +59,7 @@ module EnvironmentsHelper ...@@ -59,7 +59,7 @@ module EnvironmentsHelper
return {} unless project return {} unless project
{ {
'settings_path' => edit_project_service_path(project, 'prometheus'), 'settings_path' => edit_project_integration_path(project, 'prometheus'),
'clusters_path' => project_clusters_path(project), 'clusters_path' => project_clusters_path(project),
'dashboards_endpoint' => project_performance_monitoring_dashboards_path(project, format: :json), 'dashboards_endpoint' => project_performance_monitoring_dashboards_path(project, format: :json),
'default_branch' => project.default_branch, 'default_branch' => project.default_branch,
......
...@@ -29,7 +29,7 @@ module IntegrationsHelper ...@@ -29,7 +29,7 @@ module IntegrationsHelper
def scoped_integration_path(integration, project: nil, group: nil) def scoped_integration_path(integration, project: nil, group: nil)
if project.present? if project.present?
project_service_path(project, integration) project_integration_path(project, integration)
elsif group.present? elsif group.present?
group_settings_integration_path(group, integration) group_settings_integration_path(group, integration)
else else
...@@ -39,7 +39,7 @@ module IntegrationsHelper ...@@ -39,7 +39,7 @@ module IntegrationsHelper
def scoped_edit_integration_path(integration, project: nil, group: nil) def scoped_edit_integration_path(integration, project: nil, group: nil)
if project.present? if project.present?
edit_project_service_path(project, integration) edit_project_integration_path(project, integration)
elsif group.present? elsif group.present?
edit_group_settings_integration_path(group, integration) edit_group_settings_integration_path(group, integration)
else else
...@@ -53,7 +53,7 @@ module IntegrationsHelper ...@@ -53,7 +53,7 @@ module IntegrationsHelper
def scoped_test_integration_path(integration, project: nil, group: nil) def scoped_test_integration_path(integration, project: nil, group: nil)
if project.present? if project.present?
test_project_service_path(project, integration) test_project_integration_path(project, integration)
elsif group.present? elsif group.present?
test_group_settings_integration_path(group, integration) test_group_settings_integration_path(group, integration)
else else
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
%td %td
%strong %strong
- if can?(current_user, :admin_project, project) - if can?(current_user, :admin_project, project)
= link_to integration.title, edit_project_service_path(project, integration) = link_to integration.title, edit_project_integration_path(project, integration)
- else - else
= integration.title = integration.title
%td %td
......
.js-jira-import-root{ data: { project_path: @project.full_path, .js-jira-import-root{ data: { project_path: @project.full_path,
issues_path: project_issues_path(@project), issues_path: project_issues_path(@project),
jira_integration_path: edit_project_service_path(@project, :jira), jira_integration_path: edit_project_integration_path(@project, :jira),
is_jira_configured: @project.jira_integration&.configured?.to_s, is_jira_configured: @project.jira_integration&.configured?.to_s,
in_progress_illustration: image_path('illustrations/export-import.svg'), in_progress_illustration: image_path('illustrations/export-import.svg'),
project_id: @project.id, project_id: @project.id,
......
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
and try again. and try again.
%hr %hr
.clearfix .clearfix
= link_to 'Go back', edit_project_service_path(@project, @integration), class: 'gl-button btn btn-lg float-right' = link_to 'Go back', edit_project_integration_path(@project, @integration), class: 'gl-button btn btn-lg float-right'
...@@ -42,5 +42,5 @@ ...@@ -42,5 +42,5 @@
%hr %hr
.clearfix .clearfix
.float-right .float-right
= link_to _('Cancel'), edit_project_service_path(@project, @integration), class: 'gl-button btn btn-lg' = link_to _('Cancel'), edit_project_integration_path(@project, @integration), class: 'gl-button btn btn-lg'
= f.submit 'Install', class: 'gl-button btn btn-success btn-lg' = f.submit 'Install', class: 'gl-button btn btn-success btn-lg'
- add_to_breadcrumbs _("Settings"), edit_project_path(@project) - add_to_breadcrumbs _("Settings"), edit_project_path(@project)
- add_to_breadcrumbs _("Integrations"), project_settings_integrations_path(@project) - add_to_breadcrumbs _("Integrations"), project_settings_integrations_path(@project)
- add_to_breadcrumbs "Prometheus", edit_project_service_path(@project, ::Integrations::Prometheus) - add_to_breadcrumbs "Prometheus", edit_project_integration_path(@project, ::Integrations::Prometheus)
- breadcrumb_title s_('Metrics|Edit metric') - breadcrumb_title s_('Metrics|Edit metric')
- page_title @metric.title, s_('Metrics|Edit metric') - page_title @metric.title, s_('Metrics|Edit metric')
= render 'form', project: @project, metric: @metric = render 'form', project: @project, metric: @metric
- add_to_breadcrumbs _("Settings"), edit_project_path(@project) - add_to_breadcrumbs _("Settings"), edit_project_path(@project)
- add_to_breadcrumbs _("Integrations"), project_settings_integrations_path(@project) - add_to_breadcrumbs _("Integrations"), project_settings_integrations_path(@project)
- add_to_breadcrumbs "Prometheus", edit_project_service_path(@project, ::Integrations::Prometheus) - add_to_breadcrumbs "Prometheus", edit_project_integration_path(@project, ::Integrations::Prometheus)
- breadcrumb_title s_('Metrics|New metric') - breadcrumb_title s_('Metrics|New metric')
- page_title s_('Metrics|New metric') - page_title s_('Metrics|New metric')
= render 'form', project: @project, metric: @metric = render 'form', project: @project, metric: @metric
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
- if integration.operating? - if integration.operating?
= sprite_icon('check', css_class: 'gl-text-green-500') = sprite_icon('check', css_class: 'gl-text-green-500')
= form_for(integration, as: :service, url: scoped_integration_path(integration, project: @project, group: @group), method: :put, html: { class: 'gl-show-field-errors integration-settings-form js-integration-settings-form', data: { 'test-url' => test_project_service_path(@project, integration) } }) do |form| = form_for(integration, as: :service, url: scoped_integration_path(integration, project: @project, group: @group), method: :put, html: { class: 'gl-show-field-errors integration-settings-form js-integration-settings-form', data: { 'test-url' => test_project_integration_path(@project, integration) } }) do |form|
= render 'shared/service_settings', form: form, integration: integration = render 'shared/service_settings', form: form, integration: integration
%input{ id: 'services_redirect_to', type: 'hidden', name: 'redirect_to', value: request.referer } %input{ id: 'services_redirect_to', type: 'hidden', name: 'redirect_to', value: request.referer }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
= create_link = create_link
- if show_enable_confluence_integration?(@wiki.container) - if show_enable_confluence_integration?(@wiki.container)
= link_to s_('WikiEmpty|Enable the Confluence Wiki integration'), = link_to s_('WikiEmpty|Enable the Confluence Wiki integration'),
edit_project_service_path(@project, :confluence), edit_project_integration_path(@project, :confluence),
class: 'btn gl-button', title: s_('WikiEmpty|Enable the Confluence Wiki integration') class: 'btn gl-button', title: s_('WikiEmpty|Enable the Confluence Wiki integration')
- elsif @project && can?(current_user, :read_issue, @project) - elsif @project && can?(current_user, :read_issue, @project)
......
...@@ -212,7 +212,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do ...@@ -212,7 +212,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
end end
end end
resources :services, constraints: { id: %r{[^/]+} }, only: [:edit, :update] do resources :integrations, controller: :services, constraints: { id: %r{[^/]+} }, only: [:edit, :update] do
member do member do
put :test put :test
end end
......
...@@ -45,7 +45,7 @@ module Projects ...@@ -45,7 +45,7 @@ module Projects
private private
def redirect_to_service_page def redirect_to_service_page
redirect_to edit_project_service_path( redirect_to edit_project_integration_path(
project, project,
project.gitlab_slack_application_integration || project.build_gitlab_slack_application_integration project.gitlab_slack_application_integration || project.build_gitlab_slack_application_integration
) )
......
...@@ -15,7 +15,7 @@ module VulnerabilitiesHelper ...@@ -15,7 +15,7 @@ module VulnerabilitiesHelper
new_issue_url: new_issue_url_for(vulnerability), new_issue_url: new_issue_url_for(vulnerability),
create_jira_issue_url: create_jira_issue_url_for(vulnerability), create_jira_issue_url: create_jira_issue_url_for(vulnerability),
related_jira_issues_path: project_integrations_jira_issues_path(vulnerability.project, vulnerability_ids: [vulnerability.id]), related_jira_issues_path: project_integrations_jira_issues_path(vulnerability.project, vulnerability_ids: [vulnerability.id]),
jira_integration_settings_path: edit_project_service_path(vulnerability.project, ::Integrations::Jira), jira_integration_settings_path: edit_project_integration_path(vulnerability.project, ::Integrations::Jira),
has_mr: !!vulnerability.finding.merge_request_feedback.try(:merge_request_id), has_mr: !!vulnerability.finding.merge_request_feedback.try(:merge_request_id),
create_mr_url: create_vulnerability_feedback_merge_request_path(vulnerability.finding.project), create_mr_url: create_vulnerability_feedback_merge_request_path(vulnerability.finding.project),
discussions_url: discussions_project_security_vulnerability_path(vulnerability.project, vulnerability), discussions_url: discussions_project_security_vulnerability_path(vulnerability.project, vulnerability),
......
...@@ -17,4 +17,4 @@ ...@@ -17,4 +17,4 @@
.footer-block.row-content-block .footer-block.row-content-block
= form.submit _('Save changes'), class: "gl-button btn btn-confirm" = form.submit _('Save changes'), class: "gl-button btn btn-confirm"
&nbsp; &nbsp;
= link_to _('Cancel'), edit_project_service_path(@project, @service), class: 'btn gl-button btn-cancel' = link_to _('Cancel'), edit_project_integration_path(@project, @service), class: 'btn gl-button btn-cancel'
...@@ -13,7 +13,7 @@ RSpec.describe Projects::Settings::SlacksController do ...@@ -13,7 +13,7 @@ RSpec.describe Projects::Settings::SlacksController do
describe 'GET show' do describe 'GET show' do
def redirect_url(project) def redirect_url(project)
edit_project_service_path( edit_project_integration_path(
project, project,
project.build_gitlab_slack_application_integration project.build_gitlab_slack_application_integration
) )
......
...@@ -13,7 +13,7 @@ RSpec.describe 'User activates GitHub Service' do ...@@ -13,7 +13,7 @@ RSpec.describe 'User activates GitHub Service' do
end end
it 'renders 404 when trying to access service settings directly' do it 'renders 404 when trying to access service settings directly' do
visit edit_project_service_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)
end end
......
...@@ -7,7 +7,7 @@ RSpec.describe 'Slack application' do ...@@ -7,7 +7,7 @@ RSpec.describe 'Slack application' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:role) { :developer } let(:role) { :developer }
let(:integration) { create(:gitlab_slack_application_integration, project: project) } let(:integration) { create(:gitlab_slack_application_integration, project: project) }
let(:slack_application_form_path) { edit_project_service_path(project, integration) } let(:slack_application_form_path) { edit_project_integration_path(project, integration) }
before do before do
gitlab_sign_in(user) gitlab_sign_in(user)
......
...@@ -60,9 +60,9 @@ RSpec.describe Projects::MattermostsController do ...@@ -60,9 +60,9 @@ RSpec.describe Projects::MattermostsController do
it 'redirects to the new page' do it 'redirects to the new page' do
subject subject
service = project.integrations.last integration = project.integrations.last
expect(subject).to redirect_to(edit_project_service_url(project, service)) expect(subject).to redirect_to(edit_project_integration_path(project, integration))
end end
end end
end end
......
...@@ -141,7 +141,7 @@ RSpec.describe Projects::Prometheus::MetricsController do ...@@ -141,7 +141,7 @@ RSpec.describe Projects::Prometheus::MetricsController do
expect(flash[:notice]).to include('Metric was successfully added.') expect(flash[:notice]).to include('Metric was successfully added.')
expect(response).to redirect_to(edit_project_service_path(project, ::Integrations::Prometheus)) expect(response).to redirect_to(edit_project_integration_path(project, ::Integrations::Prometheus))
end end
end end
...@@ -164,7 +164,7 @@ RSpec.describe Projects::Prometheus::MetricsController do ...@@ -164,7 +164,7 @@ RSpec.describe Projects::Prometheus::MetricsController do
it 'destroys the metric' do it 'destroys the metric' do
delete :destroy, params: project_params(id: metric.id) delete :destroy, params: project_params(id: metric.id)
expect(response).to redirect_to(edit_project_service_path(project, ::Integrations::Prometheus)) expect(response).to redirect_to(edit_project_integration_path(project, ::Integrations::Prometheus))
expect(PrometheusMetric.find_by(id: metric.id)).to be_nil expect(PrometheusMetric.find_by(id: metric.id)).to be_nil
end end
end end
......
...@@ -44,7 +44,7 @@ RSpec.describe Projects::ServiceHookLogsController do ...@@ -44,7 +44,7 @@ RSpec.describe Projects::ServiceHookLogsController do
it 'executes the hook and redirects to the service form' do it 'executes the hook and redirects to the service form' do
expect_any_instance_of(ServiceHook).to receive(:execute) expect_any_instance_of(ServiceHook).to receive(:execute)
expect_any_instance_of(described_class).to receive(:set_hook_execution_notice) expect_any_instance_of(described_class).to receive(:set_hook_execution_notice)
expect(subject).to redirect_to(edit_project_service_path(project, integration)) expect(subject).to redirect_to(edit_project_integration_path(project, integration))
end end
it 'renders a 404 if the hook does not exist' do it 'renders a 404 if the hook does not exist' do
......
...@@ -183,7 +183,7 @@ RSpec.describe Projects::ServicesController do ...@@ -183,7 +183,7 @@ RSpec.describe Projects::ServicesController do
let(:params) { project_params(service: integration_params) } let(:params) { project_params(service: integration_params) }
let(:message) { 'Jira settings saved and active.' } let(:message) { 'Jira settings saved and active.' }
let(:redirect_url) { edit_project_service_path(project, integration) } let(:redirect_url) { edit_project_integration_path(project, integration) }
before do before do
stub_jira_integration_test stub_jira_integration_test
...@@ -341,7 +341,7 @@ RSpec.describe Projects::ServicesController do ...@@ -341,7 +341,7 @@ RSpec.describe Projects::ServicesController do
it 'redirects user back to edit page with alert' do it 'redirects user back to edit page with alert' do
put :update, params: project_params.merge(service: integration_params) put :update, params: project_params.merge(service: integration_params)
expect(response).to redirect_to(edit_project_service_path(project, integration)) expect(response).to redirect_to(edit_project_integration_path(project, integration))
expected_alert = [ expected_alert = [
"You can now manage your Prometheus settings on the", "You can now manage your Prometheus settings on the",
%(<a href="#{project_settings_operations_path(project)}">Operations</a> page.), %(<a href="#{project_settings_operations_path(project)}">Operations</a> page.),
......
...@@ -20,7 +20,7 @@ RSpec.describe 'User activates Jira', :js do ...@@ -20,7 +20,7 @@ RSpec.describe 'User activates Jira', :js do
it 'activates the Jira service' do it 'activates the Jira service' 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_service_path(project, :jira)) expect(current_path).to eq(edit_project_integration_path(project, :jira))
end end
unless Gitlab.ee? unless Gitlab.ee?
...@@ -55,7 +55,7 @@ RSpec.describe 'User activates Jira', :js do ...@@ -55,7 +55,7 @@ RSpec.describe 'User activates Jira', :js do
click_test_then_save_integration click_test_then_save_integration
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_service_path(project, :jira)) expect(current_path).to eq(edit_project_integration_path(project, :jira))
end end
end end
end end
...@@ -72,7 +72,7 @@ RSpec.describe 'User activates Jira', :js do ...@@ -72,7 +72,7 @@ RSpec.describe 'User activates Jira', :js do
it 'saves but does not activate the Jira service' do it 'saves but does not activate the Jira service' 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_service_path(project, :jira)) expect(current_path).to eq(edit_project_integration_path(project, :jira))
end end
it 'does not show the Jira link in the menu' do it 'does not show the Jira link in the menu' do
......
...@@ -34,7 +34,7 @@ RSpec.describe 'User activates issue tracker', :js do ...@@ -34,7 +34,7 @@ RSpec.describe 'User activates issue tracker', :js do
it 'activates the service' do it 'activates the service' 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_service_path(project, tracker.parameterize(separator: '_'))) expect(current_path).to eq(edit_project_integration_path(project, tracker.parameterize(separator: '_')))
end end
it 'shows the link in the menu' do it 'shows the link in the menu' do
...@@ -58,7 +58,7 @@ RSpec.describe 'User activates issue tracker', :js do ...@@ -58,7 +58,7 @@ RSpec.describe 'User activates issue tracker', :js do
end end
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_service_path(project, tracker.parameterize(separator: '_'))) expect(current_path).to eq(edit_project_integration_path(project, tracker.parameterize(separator: '_')))
end end
end end
end end
...@@ -73,7 +73,7 @@ RSpec.describe 'User activates issue tracker', :js do ...@@ -73,7 +73,7 @@ RSpec.describe 'User activates issue tracker', :js do
it 'saves but does not activate the service' do it 'saves but does not activate the service' 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_service_path(project, tracker.parameterize(separator: '_'))) expect(current_path).to eq(edit_project_integration_path(project, tracker.parameterize(separator: '_')))
end end
it 'does not show the external tracker link in the menu' do it 'does not show the external tracker link in the menu' do
......
...@@ -15,7 +15,7 @@ RSpec.describe 'Set up Mattermost slash commands', :js do ...@@ -15,7 +15,7 @@ RSpec.describe 'Set up Mattermost slash commands', :js do
let(:mattermost_enabled) { true } let(:mattermost_enabled) { true }
describe 'activation' do describe 'activation' do
let(:edit_path) { edit_project_service_path(project, :mattermost_slash_commands) } let(:edit_path) { edit_project_integration_path(project, :mattermost_slash_commands) }
include_examples 'user activates the Mattermost Slash Command integration' include_examples 'user activates the Mattermost Slash Command integration'
end end
......
...@@ -34,7 +34,7 @@ RSpec.describe 'User activates Slack notifications', :js do ...@@ -34,7 +34,7 @@ RSpec.describe 'User activates Slack notifications', :js do
pipeline_channel: 6, pipeline_channel: 6,
wiki_page_channel: 7) wiki_page_channel: 7)
visit(edit_project_service_path(project, integration)) visit(edit_project_integration_path(project, integration))
end end
it 'filters events by channel' do it 'filters events by channel' do
......
...@@ -24,7 +24,7 @@ RSpec.describe 'Slack slash commands', :js do ...@@ -24,7 +24,7 @@ RSpec.describe 'Slack slash commands', :js do
click_active_checkbox click_active_checkbox
click_on 'Save' click_on 'Save'
expect(current_path).to eq(edit_project_service_path(project, :slack_slash_commands)) expect(current_path).to eq(edit_project_integration_path(project, :slack_slash_commands))
expect(page).to have_content('Slack slash commands settings saved, but not active.') expect(page).to have_content('Slack slash commands settings saved, but not active.')
end end
...@@ -32,7 +32,7 @@ RSpec.describe 'Slack slash commands', :js do ...@@ -32,7 +32,7 @@ RSpec.describe 'Slack slash commands', :js do
fill_in 'Token', with: 'token' fill_in 'Token', with: 'token'
click_on 'Save' click_on 'Save'
expect(current_path).to eq(edit_project_service_path(project, :slack_slash_commands)) expect(current_path).to eq(edit_project_integration_path(project, :slack_slash_commands))
expect(page).to have_content('Slack slash commands settings saved and active.') expect(page).to have_content('Slack slash commands settings saved and active.')
end end
......
...@@ -18,7 +18,7 @@ RSpec.describe EnvironmentsHelper do ...@@ -18,7 +18,7 @@ RSpec.describe EnvironmentsHelper do
it 'returns data' do it 'returns data' do
expect(metrics_data).to include( expect(metrics_data).to include(
'settings_path' => edit_project_service_path(project, 'prometheus'), 'settings_path' => edit_project_integration_path(project, 'prometheus'),
'clusters_path' => project_clusters_path(project), 'clusters_path' => project_clusters_path(project),
'metrics_dashboard_base_path' => environment_metrics_path(environment), 'metrics_dashboard_base_path' => environment_metrics_path(environment),
'current_environment_name' => environment.name, 'current_environment_name' => environment.name,
......
...@@ -32,7 +32,7 @@ RSpec.describe OperationsHelper do ...@@ -32,7 +32,7 @@ RSpec.describe OperationsHelper do
expect(subject).to eq( expect(subject).to eq(
'alerts_setup_url' => help_page_path('operations/incident_management/integrations.md', anchor: 'configuration'), 'alerts_setup_url' => help_page_path('operations/incident_management/integrations.md', anchor: 'configuration'),
'alerts_usage_url' => project_alert_management_index_path(project), 'alerts_usage_url' => project_alert_management_index_path(project),
'prometheus_form_path' => project_service_path(project, prometheus_integration), 'prometheus_form_path' => project_integration_path(project, prometheus_integration),
'prometheus_reset_key_path' => reset_alerting_token_project_settings_operations_path(project), 'prometheus_reset_key_path' => reset_alerting_token_project_settings_operations_path(project),
'prometheus_authorization_key' => nil, 'prometheus_authorization_key' => nil,
'prometheus_api_url' => nil, 'prometheus_api_url' => nil,
......
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