From c8decf0313a0ac6228f95e9ee8f3b5cfb61ee333 Mon Sep 17 00:00:00 2001 From: Git'Fellow <12234510+solracsf@users.noreply.github.com> Date: Sun, 20 Sep 2026 10:24:41 +0200 Subject: [PATCH] fix(systemtags): offer every tag in the tag selects NcSelectTags only lists five options by default, so the tag editor in the admin settings, the tag field in the files sidebar and the tag check of the workflow engine each stopped at five tags. Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> --- .../src/components/SystemTagForm.spec.ts | 38 +++++++++++++++++++ .../src/components/SystemTagForm.vue | 1 + apps/systemtags/src/components/SystemTags.vue | 1 + .../src/components/Checks/FileSystemTag.vue | 1 + 4 files changed, 41 insertions(+) create mode 100644 apps/systemtags/src/components/SystemTagForm.spec.ts diff --git a/apps/systemtags/src/components/SystemTagForm.spec.ts b/apps/systemtags/src/components/SystemTagForm.spec.ts new file mode 100644 index 0000000000000..1e4ee8c3facda --- /dev/null +++ b/apps/systemtags/src/components/SystemTagForm.spec.ts @@ -0,0 +1,38 @@ +/** + * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +import type { Wrapper } from '@vue/test-utils' +import type Vue from 'vue' +import type { TagWithId } from '../types.ts' + +// eslint-disable-next-line n/no-extraneous-import -- transitive dependency of @nextcloud/vue, needed to identify the rendered select in tests +import { VueSelect } from '@nextcloud/vue-select' +import { mount } from '@vue/test-utils' +import { afterEach, describe, expect, it } from 'vitest' +import SystemTagForm from './SystemTagForm.vue' + +const tags: TagWithId[] = Array.from({ length: 8 }, (_, index) => ({ + id: index + 1, + displayName: `tag ${index + 1}`, + userVisible: true, + userAssignable: true, + canAssign: true, +})) + +describe('SystemTagForm', () => { + let component: Wrapper + + afterEach(() => { + component?.destroy() + }) + + it('offers every tag for editing', () => { + component = mount(SystemTagForm, { propsData: { tags } }) + + const select = component.findComponent(VueSelect) + + expect(select.vm.filteredOptions).toHaveLength(tags.length) + }) +}) diff --git a/apps/systemtags/src/components/SystemTagForm.vue b/apps/systemtags/src/components/SystemTagForm.vue index 10b7c868c6306..50492f9c2fbd9 100644 --- a/apps/systemtags/src/components/SystemTagForm.vue +++ b/apps/systemtags/src/components/SystemTagForm.vue @@ -20,6 +20,7 @@ :placeholder="t('systemtags', 'Collaborative tags …')" :fetch-tags="false" :options="tags" + :limit="null" :multiple="false" passthru>