Merge branch '10083-dropdown-ce-ee-difference' into 'master'
Removes EE diffs for dropdown_value_collapsed.vue Closes gitlab-ee#10083 See merge request gitlab-org/gitlab-ce!27367
This commit is contained in:
commit
9ba30fc55d
4 changed files with 16 additions and 6 deletions
|
@ -14,10 +14,12 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
labelsList() {
|
||||
const labelsString = this.labels
|
||||
.slice(0, 5)
|
||||
.map(label => label.title)
|
||||
.join(', ');
|
||||
const labelsString = this.labels.length
|
||||
? this.labels
|
||||
.slice(0, 5)
|
||||
.map(label => label.title)
|
||||
.join(', ')
|
||||
: s__('LabelSelect|Labels');
|
||||
|
||||
if (this.labels.length > 5) {
|
||||
return sprintf(s__('LabelSelect|%{labelsString}, and %{remainingLabelCount} more'), {
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Moved EE/CE differences for dropdown_value_collapsed into CE
|
||||
merge_request: 27367
|
||||
author:
|
||||
type: other
|
|
@ -5189,6 +5189,9 @@ msgstr ""
|
|||
msgid "LabelSelect|%{labelsString}, and %{remainingLabelCount} more"
|
||||
msgstr ""
|
||||
|
||||
msgid "LabelSelect|Labels"
|
||||
msgstr ""
|
||||
|
||||
msgid "Labels"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -27,10 +27,10 @@ describe('DropdownValueCollapsedComponent', () => {
|
|||
|
||||
describe('computed', () => {
|
||||
describe('labelsList', () => {
|
||||
it('returns empty text when `labels` prop is empty array', () => {
|
||||
it('returns default text when `labels` prop is empty array', () => {
|
||||
const vmEmptyLabels = createComponent([]);
|
||||
|
||||
expect(vmEmptyLabels.labelsList).toBe('');
|
||||
expect(vmEmptyLabels.labelsList).toBe('Labels');
|
||||
vmEmptyLabels.$destroy();
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue