Skip to content

Commit

Permalink
RISDEV-6144 Add document type long text (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-deazevedo authored Jan 17, 2025
1 parent f4d9061 commit 663fc3b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
7 changes: 6 additions & 1 deletion frontend/e2e/RubrikenPage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,18 @@ test(
amtlicheLangüberschriftElement.fill('my long title')
await expect(amtlicheLangüberschriftElement).toHaveValue('my long title')

const dokumentTyp = page.getByText('Dokumenttyp')
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 dokumentTypZusatz = page.getByText('Dokumenttyp Zusatz')
await expect(dokumentTypZusatz).toHaveCount(1)
await dokumentTypZusatz.fill('Bekanntmachung')
await expect(dokumentTypZusatz).toHaveValue('Bekanntmachung')

const inkrafttretedatumElement = page.getByText('Datum des Inkrafttretens *')
await expect(inkrafttretedatumElement).toHaveCount(1)
zitierdatumElement.fill('thatshouldnotwork')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ import InputField from '@/components/input/InputField.vue'
import DateInput from '@/components/input/DateInput.vue'
import ComboboxItemService from '@/services/comboboxItemService.ts'
import Textarea from 'primevue/textarea'
import TextInput from '@/components/input/TextInput.vue'
const selectedCourt = ref()
const zitierdatum = ref()
const inkrafttretedatum = ref()
const ausserkrafttretedatum = ref()
const selectedDocumentType = ref()
const documentTypeLongText = ref()
</script>

<template>
Expand Down Expand Up @@ -52,7 +54,7 @@ const selectedDocumentType = ref()
</InputField>
</div>
<div class="border-b-1 border-b-gray-400"></div>
<div class="flex flex-row gap-24 w-[calc(50%-10px)]">
<div class="flex flex-row gap-24">
<InputField id="documentType" label="Dokumenttyp *">
<ComboboxInput
id="documentType"
Expand All @@ -61,6 +63,15 @@ const selectedDocumentType = ref()
:item-service="ComboboxItemService.getDocumentTypes"
></ComboboxInput>
</InputField>
<InputField id="documentTypeLongText" label="Dokumenttyp Zusatz *">
<TextInput
id="documentTypeLongText"
v-model="documentTypeLongText"
ariaLabel="Dokumenttyp Zusatz"
:has-error="false"
size="medium"
/>
</InputField>
</div>
<div class="flex flex-col">
<div class="flex flex-row gap-24">
Expand Down

0 comments on commit 663fc3b

Please sign in to comment.