summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-02-22 16:38:12 +0000
committerFilipa Lacerda <filipa@gitlab.com>2018-02-22 16:38:12 +0000
commit18b1b5be65e6421b080216e61e27c41be913f802 (patch)
treeb8cf4fc3b84c9383d2c0ff2ce1d24c145b36afd1
parent0103958d6f7cd35828ee7a74dbd984e316e2f1e1 (diff)
downloadgitlab-ce-18b1b5be65e6421b080216e61e27c41be913f802.tar.gz
Use value attribute in ip input
Removes double quoted string
-rw-r--r--app/assets/javascripts/clusters/components/applications.vue6
-rw-r--r--spec/features/projects/clusters/applications_spec.rb4
-rw-r--r--spec/javascripts/clusters/components/applications_spec.js6
3 files changed, 9 insertions, 7 deletions
diff --git a/app/assets/javascripts/clusters/components/applications.vue b/app/assets/javascripts/clusters/components/applications.vue
index 84fdcda0c39..386b570d025 100644
--- a/app/assets/javascripts/clusters/components/applications.vue
+++ b/app/assets/javascripts/clusters/components/applications.vue
@@ -172,7 +172,7 @@
<template v-if="ingressInstalled">
<div class="form-group">
<label for="ingress-ip-address">
- {{ s__("ClusterIntegration| Ingress IP Address") }}
+ {{ s__('ClusterIntegration| Ingress IP Address') }}
</label>
<div
v-if="ingressExternalIp"
@@ -182,7 +182,7 @@
type="text"
id="ingress-ip-address"
class="form-control js-ip-address"
- :placeholder="ingressExternalIp"
+ :value="ingressExternalIp"
readonly
/>
<span class="input-group-btn">
@@ -198,7 +198,7 @@
type="text"
class="form-control js-ip-address"
readonly
- placeholder="?"
+ value="?"
/>
</div>
diff --git a/spec/features/projects/clusters/applications_spec.rb b/spec/features/projects/clusters/applications_spec.rb
index fd322d2eeb4..75cf80ba555 100644
--- a/spec/features/projects/clusters/applications_spec.rb
+++ b/spec/features/projects/clusters/applications_spec.rb
@@ -99,13 +99,13 @@ 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('Installed')
expect(page).to have_selector('.js-no-ip-message')
- expect(page.find(:css, 'input.js-ip-address')['placeholder']).to eq('?')
+ expect(page.find('.js-ip-address').value).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.js-ip-address')['placeholder']).to eq('192.168.1.100')
+ expect(page.find('.js-ip-address').value).to eq('192.168.1.100')
end
expect(page).to have_content('Ingress was successfully installed on your Kubernetes cluster')
diff --git a/spec/javascripts/clusters/components/applications_spec.js b/spec/javascripts/clusters/components/applications_spec.js
index 6e09c829213..51c2a7e76c5 100644
--- a/spec/javascripts/clusters/components/applications_spec.js
+++ b/spec/javascripts/clusters/components/applications_spec.js
@@ -61,9 +61,11 @@ describe('Applications', () => {
prometheus: { title: 'Prometheus' },
},
});
+
expect(
- vm.$el.querySelector('.js-ip-address').getAttribute('placeholder'),
+ vm.$el.querySelector('.js-ip-address').value,
).toEqual('0.0.0.0');
+
expect(
vm.$el.querySelector('.js-clipboard-btn').getAttribute('data-clipboard-text'),
).toEqual('0.0.0.0');
@@ -85,7 +87,7 @@ describe('Applications', () => {
});
expect(
- vm.$el.querySelector('.js-ip-address').getAttribute('placeholder'),
+ vm.$el.querySelector('.js-ip-address').value,
).toEqual('?');
expect(vm.$el.querySelector('.js-no-ip-message')).not.toBe(null);