diff --git a/frontend/e2e/RubrikenPage.spec.ts b/frontend/e2e/RubrikenPage.spec.ts index 85f9f32..4174e40 100644 --- a/frontend/e2e/RubrikenPage.spec.ts +++ b/frontend/e2e/RubrikenPage.spec.ts @@ -34,10 +34,12 @@ test( amtlicheLangüberschriftElement.fill('my long title') await expect(amtlicheLangüberschriftElement).toHaveValue('my long title') - // const dokumentTyp = page.getByText('Dokumenttyp') - // await expect(dokumentTyp).toHaveCount(1) - // dokumentTyp.selectOption({ label: 'VR' }) // select by visible text option - // await expect(dokumentTyp).toHaveValue('vr') // confirm selection by value + const dokumentTyp = page.getByText('Dokumenttyp') + await expect(dokumentTyp).toHaveCount(1) + await dokumentTyp.fill('V') + await expect(page.getByText('VR')).toHaveCount(1) + await page.getByText('VR').click() + await expect(dokumentTyp).toHaveValue('VR') // confirm selection by value const inkrafttretedatumElement = page.getByText('Datum des Inkrafttretens *') await expect(inkrafttretedatumElement).toHaveCount(1) diff --git a/frontend/src/components/input/types.ts b/frontend/src/components/input/types.ts index 3db52de..4117a2d 100644 --- a/frontend/src/components/input/types.ts +++ b/frontend/src/components/input/types.ts @@ -1,6 +1,6 @@ import { LabelPosition } from '@/components/input/InputField.vue' import LegalPeriodical from '@/domain/legalPeriodical' -import type { Court } from '@/domain/documentUnit' +import type { Court, DocumentType } from '@/domain/documentUnit' import type { Ref } from 'vue' import type { ComboboxResult } from '@/domain/comboboxResult.ts' @@ -118,7 +118,7 @@ export interface DropdownInputField extends BaseInputField { } //COMBOBOX -export type ComboboxInputModelType = LegalPeriodical | Court +export type ComboboxInputModelType = LegalPeriodical | Court | DocumentType export type ComboboxItem = { label: string diff --git a/frontend/src/domain/documentUnit.ts b/frontend/src/domain/documentUnit.ts index 36cd1d9..1973f85 100644 --- a/frontend/src/domain/documentUnit.ts +++ b/frontend/src/domain/documentUnit.ts @@ -1,5 +1,11 @@ import type DocumentationOffice from './documentationOffice' +export type DocumentType = { + uuid?: string + jurisShortcut: string + label: string +} + export type Court = { type?: string location?: string diff --git a/frontend/src/routes/documentUnit/[documentNumber]/RubrikenPage.vue b/frontend/src/routes/documentUnit/[documentNumber]/RubrikenPage.vue index 2a487ba..66fa4b8 100644 --- a/frontend/src/routes/documentUnit/[documentNumber]/RubrikenPage.vue +++ b/frontend/src/routes/documentUnit/[documentNumber]/RubrikenPage.vue @@ -11,6 +11,7 @@ const selectedCourt = ref() const zitierdatum = ref() const inkrafttretedatum = ref() const ausserkrafttretedatum = ref() +const selectedDocumentType = ref()