Match updated clusters/show in feature specs

This commit is contained in:
Matija Čupić 2017-12-18 19:22:53 +01:00
parent 9812d8c283
commit d2d494196d
No known key found for this signature in database
GPG key ID: 4BAF84FFACD2E5DE
2 changed files with 7 additions and 7 deletions

View file

@ -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

View file

@ -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