Use new logic in project/clusters functional test
This commit is contained in:
parent
98653ba6fa
commit
c544266d4c
|
@ -22,12 +22,16 @@ feature 'Clusters', :js do
|
|||
context 'when user does not have a cluster and visits cluster index page' do
|
||||
before do
|
||||
visit project_clusters_path(project)
|
||||
|
||||
click_link 'Create on GKE'
|
||||
end
|
||||
|
||||
it 'user sees a new page' do
|
||||
expect(page).to have_button('Create cluster')
|
||||
expect(page).to have_button('Add cluster')
|
||||
end
|
||||
|
||||
context 'when user opens opens create on gke page' do
|
||||
before do
|
||||
click_button 'Add cluster'
|
||||
click_link 'Create on GKE'
|
||||
end
|
||||
|
||||
context 'when user filled form with valid parameters' do
|
||||
|
@ -80,6 +84,7 @@ feature 'Clusters', :js do
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when user has a cluster and visits cluster index page' do
|
||||
let!(:cluster) { create(:cluster, :project, :provided_by_gcp) }
|
||||
|
@ -89,6 +94,12 @@ feature 'Clusters', :js do
|
|||
visit project_clusters_path(project)
|
||||
end
|
||||
|
||||
context 'when user clicks on a cluster' do
|
||||
before do
|
||||
# TODO: Replace with Click on cluster after frontend implements list
|
||||
visit project_cluster_path(project, cluster)
|
||||
end
|
||||
|
||||
it 'user sees an cluster details page' do
|
||||
expect(page).to have_button('Save')
|
||||
expect(page.find(:css, '.cluster-name').value).to eq(cluster.name)
|
||||
|
@ -191,11 +202,13 @@ feature 'Clusters', :js do
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when user has not signed in Google' do
|
||||
before do
|
||||
visit project_clusters_path(project)
|
||||
|
||||
click_button 'Add cluster'
|
||||
click_link 'Create on GKE'
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue