diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-12-03 21:48:52 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-12-03 21:48:52 +0100 |
commit | 2353655991ae950e352b7537259e3d0b6dacc766 (patch) | |
tree | bb87753ee4232f7b554fb5116b09c4238b9a0b31 /spec/features | |
parent | 34d8694f1f256eca28f3b5ce5b2fe21d95158142 (diff) | |
download | gitlab-ce-2353655991ae950e352b7537259e3d0b6dacc766.tar.gz |
Yet another specs
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/projects/clusters/gcp_spec.rb | 12 | ||||
-rw-r--r-- | spec/features/projects/clusters/user_spec.rb | 7 |
2 files changed, 16 insertions, 3 deletions
diff --git a/spec/features/projects/clusters/gcp_spec.rb b/spec/features/projects/clusters/gcp_spec.rb index 51da3425782..df568ebaed2 100644 --- a/spec/features/projects/clusters/gcp_spec.rb +++ b/spec/features/projects/clusters/gcp_spec.rb @@ -94,6 +94,18 @@ feature 'Gcp Cluster', :js do expect(page).to have_content('Cluster was successfully updated.') end end + + context 'when user changes cluster parameters' do + before do + fill_in 'cluster_platform_kubernetes_attributes_namespace', with: 'my-namespace' + click_button 'Save changes' + end + + it 'user sees the successful message' do + expect(page).to have_content('Cluster was successfully updated.') + expect(cluster.reload.platform_kubernetes.namespace).to eq('my-namespace') + end + end context 'when user destroy the cluster' do before do diff --git a/spec/features/projects/clusters/user_spec.rb b/spec/features/projects/clusters/user_spec.rb index 2e368387830..fe2f6a293c2 100644 --- a/spec/features/projects/clusters/user_spec.rb +++ b/spec/features/projects/clusters/user_spec.rb @@ -52,7 +52,6 @@ feature 'User Cluster', :js do it 'user sees a cluster details page' do expect(page).to have_button('Save') - expect(page.find(:css, '.cluster-name').value).to eq(cluster.name) end context 'when user disables the cluster' do @@ -67,15 +66,17 @@ feature 'User Cluster', :js do end end - context 'when user changes cluster name' do + context 'when user changes cluster parameters' do before do fill_in 'cluster_name', with: 'my-dev-cluster' - click_button 'Save' + fill_in 'cluster_platform_kubernetes_attributes_namespace', with: 'my-namespace' + click_button 'Save changes' end it 'user sees the successful message' do expect(page).to have_content('Cluster was successfully updated.') expect(cluster.reload.name).to eq('my-dev-cluster') + expect(cluster.reload.platform_kubernetes.namespace).to eq('my-namespace') end end |