summaryrefslogtreecommitdiff
path: root/spec/javascripts/clusters/clusters_bundle_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/javascripts/clusters/clusters_bundle_spec.js')
-rw-r--r--spec/javascripts/clusters/clusters_bundle_spec.js20
1 files changed, 17 insertions, 3 deletions
diff --git a/spec/javascripts/clusters/clusters_bundle_spec.js b/spec/javascripts/clusters/clusters_bundle_spec.js
index 0d3dcc29f22..0a98df45b5d 100644
--- a/spec/javascripts/clusters/clusters_bundle_spec.js
+++ b/spec/javascripts/clusters/clusters_bundle_spec.js
@@ -300,9 +300,13 @@ describe('Clusters', () => {
describe('toggleIngressDomainHelpText', () => {
const { INSTALLED, INSTALLABLE, NOT_INSTALLABLE } = APPLICATION_STATUS;
+ let ingressPreviousState;
+ let ingressNewState;
- const ingressPreviousState = { status: INSTALLABLE };
- const ingressNewState = { status: INSTALLED, externalIp: '127.0.0.1' };
+ beforeEach(() => {
+ ingressPreviousState = { status: INSTALLABLE };
+ ingressNewState = { status: INSTALLED, externalIp: '127.0.0.1' };
+ });
describe(`when ingress application new status is ${INSTALLED}`, () => {
beforeEach(() => {
@@ -333,7 +337,7 @@ describe('Clusters', () => {
});
describe('when ingress application new status and old status are the same', () => {
- it('does not modify custom domain help text', () => {
+ it('does not display custom domain help text', () => {
ingressPreviousState.status = INSTALLED;
ingressNewState.status = ingressPreviousState.status;
@@ -342,5 +346,15 @@ describe('Clusters', () => {
expect(cluster.ingressDomainHelpText.classList.contains('hide')).toEqual(true);
});
});
+
+ describe(`when ingress new status is ${INSTALLED} and there isn’t an ip assigned`, () => {
+ it('does not display custom domain help text', () => {
+ ingressNewState.externalIp = null;
+
+ cluster.toggleIngressDomainHelpText(ingressPreviousState, ingressNewState);
+
+ expect(cluster.ingressDomainHelpText.classList.contains('hide')).toEqual(true);
+ });
+ });
});
});