diff --git a/frontend/__tests__/components/GGenericInputFields.spec.js b/frontend/__tests__/components/GGenericInputFields.spec.js new file mode 100644 index 0000000000..64e46c24c6 --- /dev/null +++ b/frontend/__tests__/components/GGenericInputFields.spec.js @@ -0,0 +1,587 @@ +// +// SPDX-FileCopyrightText: 2026 SAP SE or an SAP affiliate company and Gardener contributors +// +// SPDX-License-Identifier: Apache-2.0 +// + +import { nextTick } from 'vue' +import { shallowMount } from '@vue/test-utils' + +import GGenericInputField from '@/components/GGenericInputField' +import GGenericInputFields from '@/components/GGenericInputFields' + +import { useLogger } from '@/composables/useLogger' + +const TextFieldStub = { + name: 'VTextField', + props: { + modelValue: { + type: [String, Object, Array, Number, Boolean], + }, + type: { + type: String, + }, + autocomplete: { + type: String, + }, + appendIcon: { + type: String, + }, + errorMessages: { + type: Array, + default: () => [], + }, + }, + emits: [ + 'update:modelValue', + 'blur', + 'click:append', + ], + template: ` + + `, +} + +const SelectStub = { + name: 'VSelect', + props: { + modelValue: { + type: [String, Object, Array, Number, Boolean], + }, + items: { + type: Array, + }, + multiple: { + type: Boolean, + }, + errorMessages: { + type: Array, + default: () => [], + }, + }, + emits: [ + 'update:modelValue', + 'blur', + ], + template: '