diff options
Diffstat (limited to 'app/assets/javascripts/sidebar/components/labels/labels_select_vue/dropdown_contents_labels_view.vue')
-rw-r--r-- | app/assets/javascripts/sidebar/components/labels/labels_select_vue/dropdown_contents_labels_view.vue | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/app/assets/javascripts/sidebar/components/labels/labels_select_vue/dropdown_contents_labels_view.vue b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/dropdown_contents_labels_view.vue index ee6b531c1ca..3db962c7fe8 100644 --- a/app/assets/javascripts/sidebar/components/labels/labels_select_vue/dropdown_contents_labels_view.vue +++ b/app/assets/javascripts/sidebar/components/labels/labels_select_vue/dropdown_contents_labels_view.vue @@ -80,9 +80,6 @@ export default { 'updateSelectedLabels', 'toggleDropdownContents', ]), - isLabelSelected(label) { - return this.selectedLabelsList.includes(label.id); - }, /** * This method scrolls item from dropdown into * the view if it is off the viewable area of the @@ -160,7 +157,11 @@ export default { <template> <gl-intersection-observer @appear="handleComponentAppear" @disappear="handleComponentDisappear"> - <div class="labels-select-contents-list js-labels-list" @keydown="handleKeyDown"> + <div + class="labels-select-contents-list js-labels-list" + data-testid="labels-list" + @keydown="handleKeyDown" + > <div v-if="isDropdownVariantSidebar || isDropdownVariantEmbedded" class="dropdown-title gl-display-flex gl-align-items-center gl-pt-0 gl-pb-3!" @@ -200,7 +201,11 @@ export default { :highlight="index === currentHighlightItem" @clickLabel="handleLabelClick(label)" /> - <li v-show="showNoMatchingResultsMessage" class="gl-p-3 gl-text-center"> + <li + v-show="showNoMatchingResultsMessage" + class="gl-p-3 gl-text-center" + data-testid="no-matching-results" + > {{ __('No matching results') }} </li> </ul> @@ -210,6 +215,7 @@ export default { <li v-if="allowLabelCreate"> <gl-link class="gl-display-flex w-100 flex-row text-break-word label-item" + data-testid="create-label-link" @click="handleCreateLabelClick" > {{ footerCreateLabelTitle }} |