summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Griffith <dyl.griffith@gmail.com>2018-02-20 14:47:00 +1100
committerDylan Griffith <dyl.griffith@gmail.com>2018-02-20 14:47:00 +1100
commit7efb28515f4d25120638a7025ebb26afc6114975 (patch)
treef8d5a0e69a9f108b2c09868f9b646ee4a2e01e8d
parent3d3d09fa9d0ea81f0e20037f64bd43b0cd1e5891 (diff)
downloadgitlab-ce-7efb28515f4d25120638a7025ebb26afc6114975.tar.gz
Update feature spec for kubernetes applications ingress IP address (#42643)
-rw-r--r--spec/features/projects/clusters/applications_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/features/projects/clusters/applications_spec.rb b/spec/features/projects/clusters/applications_spec.rb
index 8d1e10b7191..b984bdb5803 100644
--- a/spec/features/projects/clusters/applications_spec.rb
+++ b/spec/features/projects/clusters/applications_spec.rb
@@ -72,6 +72,7 @@ feature 'Clusters Applications', :js do
context 'when user installs application: Ingress' do
before do
allow(ClusterInstallAppWorker).to receive(:perform_async).and_return(nil)
+ allow(ClusterWaitForIngressIpAddressWorker).to receive(:perform_in)
create(:clusters_applications_helm, :installed, cluster: cluster)
@@ -92,10 +93,19 @@ feature 'Clusters Applications', :js do
expect(page.find(:css, '.js-cluster-application-install-button')['disabled']).to eq('true')
expect(page.find(:css, '.js-cluster-application-install-button')).to have_content('Installing')
+ # The application becomes installed but we keep waiting for external IP address
Clusters::Cluster.last.application_ingress.make_installed!
expect(page.find(:css, '.js-cluster-application-install-button')['disabled']).to eq('true')
expect(page.find(:css, '.js-cluster-application-install-button')).to have_content('Installed')
+ expect(page).to have_selector('.js-no-ip-message')
+ expect(page.find(:css, 'input#ipAddress')['placeholder']).to eq('?')
+
+ # We receive the external IP address and display
+ Clusters::Cluster.last.application_ingress.update!(external_ip: '192.168.1.100')
+
+ expect(page).not_to have_selector('.js-no-ip-message')
+ expect(page.find(:css, 'input#ipAddress')['placeholder']).to eq('192.168.1.100')
end
expect(page).to have_content('Ingress was successfully installed on your Kubernetes cluster')