Commit 62d97112 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'mg-fix-knative-application-row' into 'master'

Disable Knative for group clusters

See merge request gitlab-org/gitlab-ce!23577
parents 71da313c e282a65b
...@@ -296,7 +296,6 @@ export default { ...@@ -296,7 +296,6 @@ export default {
:request-status="applications.cert_manager.requestStatus" :request-status="applications.cert_manager.requestStatus"
:request-reason="applications.cert_manager.requestReason" :request-reason="applications.cert_manager.requestReason"
:disabled="!helmInstalled" :disabled="!helmInstalled"
class="hide-bottom-border rounded-bottom"
title-link="https://cert-manager.readthedocs.io/en/latest/#" title-link="https://cert-manager.readthedocs.io/en/latest/#"
> >
<div slot="description" v-html="certManagerDescription"></div> <div slot="description" v-html="certManagerDescription"></div>
...@@ -396,6 +395,7 @@ export default { ...@@ -396,6 +395,7 @@ export default {
</div> </div>
</application-row> </application-row>
<application-row <application-row
v-if="isProjectCluster"
id="knative" id="knative"
:logo-url="knativeLogo" :logo-url="knativeLogo"
:title="applications.knative.title" :title="applications.knative.title"
...@@ -405,7 +405,6 @@ export default { ...@@ -405,7 +405,6 @@ export default {
:request-reason="applications.knative.requestReason" :request-reason="applications.knative.requestReason"
:install-application-request-params="{ hostname: applications.knative.hostname }" :install-application-request-params="{ hostname: applications.knative.hostname }"
:disabled="!helmInstalled" :disabled="!helmInstalled"
class="hide-bottom-border rounded-bottom"
title-link="https://github.com/knative/docs" title-link="https://github.com/knative/docs"
> >
<div slot="description"> <div slot="description">
...@@ -432,7 +431,7 @@ export default { ...@@ -432,7 +431,7 @@ export default {
/> />
</div> </div>
</template> </template>
<template v-else> <template v-else-if="helmInstalled">
<div class="form-group"> <div class="form-group">
<label for="knative-domainname"> <label for="knative-domainname">
{{ s__('ClusterIntegration|Knative Domain Name:') }} {{ s__('ClusterIntegration|Knative Domain Name:') }}
......
---
title: Hide Knative from group cluster applications until supported
merge_request: 23577
author:
type: fixed
import Vue from 'vue'; import Vue from 'vue';
import applications from '~/clusters/components/applications.vue'; import applications from '~/clusters/components/applications.vue';
import { CLUSTER_TYPE } from '~/clusters/constants';
import mountComponent from 'spec/helpers/vue_mount_component_helper'; import mountComponent from 'spec/helpers/vue_mount_component_helper';
describe('Applications', () => { describe('Applications', () => {
...@@ -14,9 +15,10 @@ describe('Applications', () => { ...@@ -14,9 +15,10 @@ describe('Applications', () => {
vm.$destroy(); vm.$destroy();
}); });
describe('', () => { describe('Project cluster applications', () => {
beforeEach(() => { beforeEach(() => {
vm = mountComponent(Applications, { vm = mountComponent(Applications, {
type: CLUSTER_TYPE.PROJECT,
applications: { applications: {
helm: { title: 'Helm Tiller' }, helm: { title: 'Helm Tiller' },
ingress: { title: 'Ingress' }, ingress: { title: 'Ingress' },
...@@ -30,31 +32,76 @@ describe('Applications', () => { ...@@ -30,31 +32,76 @@ describe('Applications', () => {
}); });
it('renders a row for Helm Tiller', () => { it('renders a row for Helm Tiller', () => {
expect(vm.$el.querySelector('.js-cluster-application-row-helm')).toBeDefined(); expect(vm.$el.querySelector('.js-cluster-application-row-helm')).not.toBeNull();
}); });
it('renders a row for Ingress', () => { it('renders a row for Ingress', () => {
expect(vm.$el.querySelector('.js-cluster-application-row-ingress')).toBeDefined(); expect(vm.$el.querySelector('.js-cluster-application-row-ingress')).not.toBeNull();
}); });
it('renders a row for Cert-Manager', () => { it('renders a row for Cert-Manager', () => {
expect(vm.$el.querySelector('.js-cluster-application-row-cert_manager')).toBeDefined(); expect(vm.$el.querySelector('.js-cluster-application-row-cert_manager')).not.toBeNull();
}); });
it('renders a row for Prometheus', () => { it('renders a row for Prometheus', () => {
expect(vm.$el.querySelector('.js-cluster-application-row-prometheus')).toBeDefined(); expect(vm.$el.querySelector('.js-cluster-application-row-prometheus')).not.toBeNull();
}); });
it('renders a row for GitLab Runner', () => { it('renders a row for GitLab Runner', () => {
expect(vm.$el.querySelector('.js-cluster-application-row-runner')).toBeDefined(); expect(vm.$el.querySelector('.js-cluster-application-row-runner')).not.toBeNull();
}); });
it('renders a row for Jupyter', () => { it('renders a row for Jupyter', () => {
expect(vm.$el.querySelector('.js-cluster-application-row-jupyter')).not.toBe(null); expect(vm.$el.querySelector('.js-cluster-application-row-jupyter')).not.toBeNull();
}); });
it('renders a row for Knative', () => { it('renders a row for Knative', () => {
expect(vm.$el.querySelector('.js-cluster-application-row-knative')).not.toBe(null); expect(vm.$el.querySelector('.js-cluster-application-row-knative')).not.toBeNull();
});
});
describe('Group cluster applications', () => {
beforeEach(() => {
vm = mountComponent(Applications, {
type: CLUSTER_TYPE.GROUP,
applications: {
helm: { title: 'Helm Tiller' },
ingress: { title: 'Ingress' },
cert_manager: { title: 'Cert-Manager' },
runner: { title: 'GitLab Runner' },
prometheus: { title: 'Prometheus' },
jupyter: { title: 'JupyterHub' },
knative: { title: 'Knative' },
},
});
});
it('renders a row for Helm Tiller', () => {
expect(vm.$el.querySelector('.js-cluster-application-row-helm')).not.toBeNull();
});
it('renders a row for Ingress', () => {
expect(vm.$el.querySelector('.js-cluster-application-row-ingress')).not.toBeNull();
});
it('renders a row for Cert-Manager', () => {
expect(vm.$el.querySelector('.js-cluster-application-row-cert_manager')).not.toBeNull();
});
it('renders a row for Prometheus', () => {
expect(vm.$el.querySelector('.js-cluster-application-row-prometheus')).toBeNull();
});
it('renders a row for GitLab Runner', () => {
expect(vm.$el.querySelector('.js-cluster-application-row-runner')).toBeNull();
});
it('renders a row for Jupyter', () => {
expect(vm.$el.querySelector('.js-cluster-application-row-jupyter')).toBeNull();
});
it('renders a row for Knative', () => {
expect(vm.$el.querySelector('.js-cluster-application-row-knative')).toBeNull();
}); });
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment