Commit f66ae213 authored by Olena Horal-Koretska's avatar Olena Horal-Koretska

Merge branch 'ss/add-wip-limits-license-check' into 'master'

Add WipLimit licensed check

See merge request gitlab-org/gitlab!46387
parents 62c13f6e 95a8f296
......@@ -36,6 +36,9 @@ export default {
computed: {
...mapGetters(['isSidebarOpen', 'shouldUseGraphQL']),
...mapState(['activeId', 'sidebarType', 'boardLists']),
isWipLimitsOn() {
return this.glFeatures.wipLimits;
},
activeList() {
/*
Warning: Though a computed property it is not reactive because we are
......@@ -105,7 +108,10 @@ export default {
:active-list="activeList"
: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">
<gl-button
variant="danger"
......
---
title: Add licensed check for wip limits
merge_request: 46387
author:
type: fixed
......@@ -22,7 +22,7 @@ describe('ee/BoardSettingsSidebar', () => {
const listId = 1;
let mock;
const createComponent = (actions = {}) => {
const createComponent = (actions = {}, isWipLimitsOn = false) => {
storeActions = actions;
const store = new Vuex.Store({
......@@ -34,6 +34,11 @@ describe('ee/BoardSettingsSidebar', () => {
wrapper = shallowMount(BoardSettingsSidebar, {
store,
localVue,
provide: {
glFeatures: {
wipLimits: isWipLimitsOn,
},
},
stubs: {
'board-settings-sidebar-wip-limit': BoardSettingsWipLimit,
'board-settings-list-types': BoardSettingsListTypes,
......@@ -59,7 +64,7 @@ describe('ee/BoardSettingsSidebar', () => {
list_type: 'label',
});
createComponent();
createComponent({}, 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