diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2019-04-29 21:21:04 +0300 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2019-04-29 21:21:04 +0300 |
commit | 6050de1999e29231a69c5b7ac4bd242874774bfb (patch) | |
tree | 0d9146a6c8768add9dc62b7ea76bcc71b3a37b31 /spec | |
parent | 119daae75ce2edebb9cd2eaba5e0a14fe5f46f14 (diff) | |
parent | 36624f21eee3a3f7a50d0ff0d941d3b055579bf0 (diff) |
Merge branch '61036-fix-ingress-base-domain-text' into 'master'
Fix base domain help text update
Closes #61036
See merge request gitlab-org/gitlab-ce!27746
Diffstat (limited to 'spec')
-rw-r--r-- | spec/frontend/clusters/clusters_bundle_spec.js | 35 |
1 files changed, 7 insertions, 28 deletions
diff --git a/spec/frontend/clusters/clusters_bundle_spec.js b/spec/frontend/clusters/clusters_bundle_spec.js index 5103cb4f69f..a61103397eb 100644 --- a/spec/frontend/clusters/clusters_bundle_spec.js +++ b/spec/frontend/clusters/clusters_bundle_spec.js @@ -6,7 +6,7 @@ import { loadHTMLFixture } from 'helpers/fixtures'; import { setTestTimeout } from 'helpers/timeout'; import $ from 'jquery'; -const { INSTALLING, INSTALLABLE, INSTALLED, NOT_INSTALLABLE } = APPLICATION_STATUS; +const { INSTALLING, INSTALLABLE, INSTALLED } = APPLICATION_STATUS; describe('Clusters', () => { setTestTimeout(1000); @@ -317,13 +317,12 @@ describe('Clusters', () => { let ingressNewState; beforeEach(() => { - ingressPreviousState = { status: INSTALLABLE }; - ingressNewState = { status: INSTALLED, externalIp: '127.0.0.1' }; + ingressPreviousState = { externalIp: null }; + ingressNewState = { externalIp: '127.0.0.1' }; }); - describe(`when ingress application new status is ${INSTALLED}`, () => { + describe(`when ingress have an external ip assigned`, () => { beforeEach(() => { - ingressNewState.status = INSTALLED; cluster.toggleIngressDomainHelpText(ingressPreviousState, ingressNewState); }); @@ -338,31 +337,11 @@ describe('Clusters', () => { }); }); - describe(`when ingress application new status is different from ${INSTALLED}`, () => { + describe(`when ingress does not have an external ip assigned`, () => { it('hides custom domain help text', () => { - ingressNewState.status = NOT_INSTALLABLE; - cluster.ingressDomainHelpText.classList.remove('hide'); - - cluster.toggleIngressDomainHelpText(ingressPreviousState, ingressNewState); - - expect(cluster.ingressDomainHelpText.classList.contains('hide')).toEqual(true); - }); - }); - - describe('when ingress application new status and old status are the same', () => { - it('does not display custom domain help text', () => { - ingressPreviousState.status = INSTALLED; - ingressNewState.status = ingressPreviousState.status; - - cluster.toggleIngressDomainHelpText(ingressPreviousState, ingressNewState); - - 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', () => { + ingressPreviousState.externalIp = '127.0.0.1'; ingressNewState.externalIp = null; + cluster.ingressDomainHelpText.classList.remove('hide'); cluster.toggleIngressDomainHelpText(ingressPreviousState, ingressNewState); |