Commit 586045e2 authored by Phil Hughes's avatar Phil Hughes

Merge branch...

Merge branch '43472-remove-environment-scope-field-on-cluster-creation-form-for-core-starter-plans' into 'master'

Resolve "Remove "environment scope" field on cluster creation form for core/starter plans"

Closes #43472

See merge request gitlab-org/gitlab-ce!19643
parents 786cbfa1 7a6da82a
...@@ -3,9 +3,10 @@ ...@@ -3,9 +3,10 @@
.form-group .form-group
= field.label :name, s_('ClusterIntegration|Kubernetes cluster name'), class: 'label-light' = field.label :name, s_('ClusterIntegration|Kubernetes cluster name'), class: 'label-light'
= field.text_field :name, class: 'form-control', placeholder: s_('ClusterIntegration|Kubernetes cluster name') = field.text_field :name, class: 'form-control', placeholder: s_('ClusterIntegration|Kubernetes cluster name')
- if has_multiple_clusters?(@project)
.form-group .form-group
= field.label :environment_scope, s_('ClusterIntegration|Environment scope'), class: 'label-light' = field.label :environment_scope, s_('ClusterIntegration|Environment scope'), class: 'label-light'
= field.text_field :environment_scope, class: 'form-control', readonly: !has_multiple_clusters?(@project), placeholder: s_('ClusterIntegration|Environment scope') = field.text_field :environment_scope, class: 'form-control', placeholder: s_('ClusterIntegration|Environment scope')
= field.fields_for :platform_kubernetes, @cluster.platform_kubernetes do |platform_kubernetes_field| = field.fields_for :platform_kubernetes, @cluster.platform_kubernetes do |platform_kubernetes_field|
.form-group .form-group
......
---
title: Removes the environment scope field for users that cannot edit it
merge_request: 19643
author:
type: changed
...@@ -157,6 +157,19 @@ feature 'Gcp Cluster', :js do ...@@ -157,6 +157,19 @@ feature 'Gcp Cluster', :js do
end end
end end
context 'when a user cannot edit the environment scope' do
before do
visit project_clusters_path(project)
click_link 'Add Kubernetes cluster'
click_link 'Add an existing Kubernetes cluster'
end
it 'user does not see the "Environment scope" field' do
expect(page).not_to have_css('#cluster_environment_scope')
end
end
context 'when user has not dismissed GCP signup offer' do context 'when user has not dismissed GCP signup offer' do
before do before do
visit project_clusters_path(project) visit project_clusters_path(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