diff --git a/src/i18n/de.json b/src/i18n/de.json index acf003897..7bec03deb 100644 --- a/src/i18n/de.json +++ b/src/i18n/de.json @@ -1421,6 +1421,7 @@ "labels": { "title": "Titel", "type": "Typ", + "theme": "Thema", "labels": "Labels", "description": "Beschreibung", "location": "Wo", @@ -1438,6 +1439,7 @@ }, "empty_value": { "description": "Keine Beschreibung", + "theme": "Kein Thema", "organiser": "Keine Organisationsinformationen", "price": "Keine Preisinformation", "booking": "Keine Reservierungsinformationen", diff --git a/src/i18n/fr.json b/src/i18n/fr.json index 5ec56b856..9f09f310b 100644 --- a/src/i18n/fr.json +++ b/src/i18n/fr.json @@ -1420,6 +1420,7 @@ "labels": { "title": "Titre", "type": "Type", + "theme": "Thème", "labels": "Étiquettes", "description": "Description", "location": "Où", @@ -1437,6 +1438,7 @@ }, "empty_value": { "description": "Aucune description", + "theme": "Aucun thème", "organiser": "Aucune information sur l'organisation", "price": "Pas d'information du prix", "booking": "Aucune information sur la réservation", diff --git a/src/i18n/nl.json b/src/i18n/nl.json index 602ea11ea..b9bbac6dd 100644 --- a/src/i18n/nl.json +++ b/src/i18n/nl.json @@ -1477,6 +1477,7 @@ "labels": { "title": "Titel", "type": "Type", + "theme": "Thema", "labels": "Labels", "description": "Beschrijving", "location": "Waar", @@ -1494,6 +1495,7 @@ }, "empty_value": { "description": "Geen beschrijving", + "theme": "Geen thema", "organiser": "Geen organisatie-informatie", "price": "Geen prijsinformatie", "booking": "Geen reservatie-informatie", diff --git a/src/pages/events/[eventId]/preview/Preview.tsx b/src/pages/events/[eventId]/preview/Preview.tsx index 54d57ef4e..d7bd5d4b4 100644 --- a/src/pages/events/[eventId]/preview/Preview.tsx +++ b/src/pages/events/[eventId]/preview/Preview.tsx @@ -69,6 +69,7 @@ const Preview = () => { ); const typeTerm = terms.find((term) => term.domain === 'eventtype'); + const themeTerm = terms.find((term) => term.domain === 'theme'); const description = getLanguageObjectOrFallback( offer.description, @@ -279,6 +280,14 @@ const Preview = () => { const tableData = [ { field: t('preview.labels.title'), value: title }, { field: t('preview.labels.type'), value: typeTerm.label }, + { + field: t('preview.labels.theme'), + value: themeTerm ? ( + themeTerm.label + ) : ( + {t('preview.empty_value.theme')} + ), + }, { field: t('preview.labels.labels'), value: ( diff --git a/src/test/e2e/events/create-calendar-multiple.spec.ts b/src/test/e2e/events/create-calendar-multiple.spec.ts index 98ee93eff..047ee8993 100644 --- a/src/test/e2e/events/create-calendar-multiple.spec.ts +++ b/src/test/e2e/events/create-calendar-multiple.spec.ts @@ -77,6 +77,7 @@ test('create an event with calendarType multiple', async ({ const expectedLabels = [ 'Titel', 'Type', + 'Thema', 'Labels', 'Beschrijving', 'Waar', @@ -103,18 +104,27 @@ test('create an event with calendarType multiple', async ({ // Validate that some rows have "Geen" when empty const tableRows = await page.locator('table.table > tbody > tr').count(); - const rowsWithGeenValue = [3, 6, 7, 10, 11, 13, 14]; - - const secondColumnCells = await page - .locator('table.table > tbody > tr > td:nth-child(2)') - .allTextContents(); + const expectedEmptyFields = [ + 'Thema', + 'Beschrijving', + 'Organisatie', + 'Prijsinfo', + 'Reservatie', + 'Contactgegevens', + 'Afbeeldingen', + "Video's", + ]; for (let i = 0; i < tableRows; i++) { + const firstColumnValue = await page + .locator(`table.table > tbody > tr:nth-child(${i + 1}) > td:nth-child(1)`) + .textContent(); + const secondColumnValue = await page .locator(`table.table > tbody > tr:nth-child(${i + 1}) > td:nth-child(2)`) .textContent(); - if (rowsWithGeenValue.includes(i)) { + if (expectedEmptyFields.includes(firstColumnValue?.trim() ?? '')) { expect(secondColumnValue).toContain('Geen'); } else { expect(secondColumnValue?.trim()).not.toBe('');