Commit 95a8f296 authored by sstern's avatar sstern

Add WipLimit licensed check

parent ba04974a
...@@ -36,6 +36,9 @@ export default { ...@@ -36,6 +36,9 @@ export default {
computed: { computed: {
...mapGetters(['isSidebarOpen', 'shouldUseGraphQL']), ...mapGetters(['isSidebarOpen', 'shouldUseGraphQL']),
...mapState(['activeId', 'sidebarType', 'boardLists']), ...mapState(['activeId', 'sidebarType', 'boardLists']),
isWipLimitsOn() {
return this.glFeatures.wipLimits;
},
activeList() { activeList() {
/* /*
Warning: Though a computed property it is not reactive because we are Warning: Though a computed property it is not reactive because we are
...@@ -105,7 +108,10 @@ export default { ...@@ -105,7 +108,10 @@ export default {
:active-list="activeList" :active-list="activeList"
:board-list-type="boardListType" :board-list-type="boardListType"
/> />
<board-settings-sidebar-wip-limit :max-issue-count="activeList.maxIssueCount" /> <board-settings-sidebar-wip-limit
v-if="isWipLimitsOn"
:max-issue-count="activeList.maxIssueCount"
/>
<div v-if="canAdminList && !activeList.preset && activeList.id" class="gl-m-4"> <div v-if="canAdminList && !activeList.preset && activeList.id" class="gl-m-4">
<gl-button <gl-button
variant="danger" variant="danger"
......
---
title: Add licensed check for wip limits
merge_request: 46387
author:
type: fixed
...@@ -22,7 +22,7 @@ describe('ee/BoardSettingsSidebar', () => { ...@@ -22,7 +22,7 @@ describe('ee/BoardSettingsSidebar', () => {
const listId = 1; const listId = 1;
let mock; let mock;
const createComponent = (actions = {}) => { const createComponent = (actions = {}, isWipLimitsOn = false) => {
storeActions = actions; storeActions = actions;
const store = new Vuex.Store({ const store = new Vuex.Store({
...@@ -34,6 +34,11 @@ describe('ee/BoardSettingsSidebar', () => { ...@@ -34,6 +34,11 @@ describe('ee/BoardSettingsSidebar', () => {
wrapper = shallowMount(BoardSettingsSidebar, { wrapper = shallowMount(BoardSettingsSidebar, {
store, store,
localVue, localVue,
provide: {
glFeatures: {
wipLimits: isWipLimitsOn,
},
},
stubs: { stubs: {
'board-settings-sidebar-wip-limit': BoardSettingsWipLimit, 'board-settings-sidebar-wip-limit': BoardSettingsWipLimit,
'board-settings-list-types': BoardSettingsListTypes, 'board-settings-list-types': BoardSettingsListTypes,
...@@ -59,7 +64,7 @@ describe('ee/BoardSettingsSidebar', () => { ...@@ -59,7 +64,7 @@ describe('ee/BoardSettingsSidebar', () => {
list_type: 'label', list_type: 'label',
}); });
createComponent(); createComponent({}, true);
expect(wrapper.find(BoardSettingsWipLimit).exists()).toBe(true); expect(wrapper.find(BoardSettingsWipLimit).exists()).toBe(true);
}); });
......
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