Commit ee7d2298 authored by Denys Mishunov's avatar Denys Mishunov

Removes EE diffs for dropdown_value_collapsed

parent d83eb63b
......@@ -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'), {
......
---
title: Moved EE/CE differences for dropdown_value_collapsed into CE
merge_request: 27367
author:
type: other
......@@ -5069,6 +5069,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();
});
......
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