Commit 28981f57 authored by Mark Chao's avatar Mark Chao

Merge branch 'fix-ka-link-on-project' into 'master'

Fix Kubernetes Agent Link on Project page

See merge request gitlab-org/gitlab!77645
parents 47459726 eff9a857
......@@ -364,7 +364,7 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated
if clusters.empty?
AnchorData.new(false,
statistic_icon + _('Add Kubernetes cluster'),
new_project_cluster_path(project))
project_clusters_path(project))
else
cluster_link = clusters.count == 1 ? project_cluster_path(project, clusters.first) : project_clusters_path(project)
......
......@@ -316,7 +316,7 @@ RSpec.describe 'Projects > Show > User sees setup shortcut buttons' do
visit project_path(project)
page.within('.project-buttons') do
expect(page).to have_link('Add Kubernetes cluster', href: new_project_cluster_path(project))
expect(page).to have_link('Add Kubernetes cluster', href: project_clusters_path(project))
end
end
......
......@@ -554,7 +554,7 @@ RSpec.describe ProjectPresenter do
expect(presenter.kubernetes_cluster_anchor_data).to have_attributes(
is_link: false,
label: a_string_including('Add Kubernetes cluster'),
link: presenter.new_project_cluster_path(project)
link: presenter.project_clusters_path(project)
)
end
end
......
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