summaryrefslogtreecommitdiff
path: root/spec/javascripts/clusters
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-05-28 10:17:17 +0100
committerFilipa Lacerda <filipa@gitlab.com>2018-05-28 10:17:17 +0100
commit08216d2e58edea388d334077ccfce7d842292319 (patch)
tree983ae74112f31e96340c511b6980ed4bded41bdc /spec/javascripts/clusters
parentb5b72ed18bcdfe296eaa645c47f670832a4081e4 (diff)
downloadgitlab-ce-08216d2e58edea388d334077ccfce7d842292319.tar.gz
Changes after review
Diffstat (limited to 'spec/javascripts/clusters')
-rw-r--r--spec/javascripts/clusters/components/applications_spec.js40
1 files changed, 28 insertions, 12 deletions
diff --git a/spec/javascripts/clusters/components/applications_spec.js b/spec/javascripts/clusters/components/applications_spec.js
index fa228f5927f..a70138c7eee 100644
--- a/spec/javascripts/clusters/components/applications_spec.js
+++ b/spec/javascripts/clusters/components/applications_spec.js
@@ -128,21 +128,37 @@ describe('Applications', () => {
expect(vm.$el.querySelector('.js-hostname').getAttribute('readonly')).toEqual(null);
});
+ });
- describe('with ingress & jupyter installed', () => {
- it('renders readonly input', () => {
- vm = mountComponent(Applications, {
- applications: {
- helm: { title: 'Helm Tiller', status: 'installed' },
- ingress: { title: 'Ingress', status: 'installed', externalIp: '1.1.1.1' },
- runner: { title: 'GitLab Runner' },
- prometheus: { title: 'Prometheus' },
- jupyter: { title: 'JupyterHub', status: 'installed', hostname: '' },
- },
- });
+ describe('with ingress installed without external ip', () => {
+ it('does not render hostname input', () => {
+ vm = mountComponent(Applications, {
+ applications: {
+ helm: { title: 'Helm Tiller', status: 'installed' },
+ ingress: { title: 'Ingress', status: 'installed' },
+ runner: { title: 'GitLab Runner' },
+ prometheus: { title: 'Prometheus' },
+ jupyter: { title: 'JupyterHub', hostname: '', status: 'installable' },
+ },
+ });
+
+ expect(vm.$el.querySelector('.js-hostname')).toBe(null);
+ });
+ });
- expect(vm.$el.querySelector('.js-hostname').getAttribute('readonly')).toEqual('readonly');
+ describe('with ingress & jupyter installed', () => {
+ it('renders readonly input', () => {
+ vm = mountComponent(Applications, {
+ applications: {
+ helm: { title: 'Helm Tiller', status: 'installed' },
+ ingress: { title: 'Ingress', status: 'installed', externalIp: '1.1.1.1' },
+ runner: { title: 'GitLab Runner' },
+ prometheus: { title: 'Prometheus' },
+ jupyter: { title: 'JupyterHub', status: 'installed', hostname: '' },
+ },
});
+
+ expect(vm.$el.querySelector('.js-hostname').getAttribute('readonly')).toEqual('readonly');
});
});