Commit 9ba30fc5 authored by Filipa Lacerda's avatar Filipa Lacerda

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
parents 4d78cacc ee7d2298
......@@ -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
......@@ -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();
});
......
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