Commit d2d49419 authored by Matija Čupić's avatar Matija Čupić

Match updated clusters/show in feature specs

parent 9812d8c2
......@@ -81,14 +81,14 @@ feature 'Gcp Cluster', :js do
end
it 'user sees a cluster details page' do
expect(page).to have_button('Save')
expect(page).to have_button('Save changes')
expect(page.find(:css, '.cluster-name').value).to eq(cluster.name)
end
context 'when user disables the cluster' do
before do
page.find(:css, '.js-toggle-cluster').click
click_button 'Save'
page.within('#cluster-integration') { click_button 'Save changes' }
end
it 'user sees the successful message' do
......@@ -99,7 +99,7 @@ feature 'Gcp Cluster', :js do
context 'when user changes cluster parameters' do
before do
fill_in 'cluster_platform_kubernetes_attributes_namespace', with: 'my-namespace'
click_button 'Save changes'
page.within('#js-cluster-details') { click_button 'Save changes' }
end
it 'user sees the successful message' do
......
......@@ -29,7 +29,7 @@ feature 'User Cluster', :js do
end
it 'user sees a cluster details page' do
expect(page).to have_content('Enable cluster integration')
expect(page).to have_content('Cluster integration')
expect(page.find_field('cluster[name]').value).to eq('dev-cluster')
expect(page.find_field('cluster[platform_kubernetes_attributes][api_url]').value)
.to have_content('http://example.com')
......@@ -57,14 +57,14 @@ feature 'User Cluster', :js do
end
it 'user sees a cluster details page' do
expect(page).to have_button('Save')
expect(page).to have_button('Save changes')
end
context 'when user disables the cluster' do
before do
page.find(:css, '.js-toggle-cluster').click
fill_in 'cluster_name', with: 'dev-cluster'
click_button 'Save'
page.within('#cluster-integration') { click_button 'Save changes' }
end
it 'user sees the successful message' do
......@@ -76,7 +76,7 @@ feature 'User Cluster', :js do
before do
fill_in 'cluster_name', with: 'my-dev-cluster'
fill_in 'cluster_platform_kubernetes_attributes_namespace', with: 'my-namespace'
click_button 'Save changes'
page.within('#js-cluster-details') { click_button 'Save changes' }
end
it 'user sees the successful message' do
......
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