Skip to content

Commit 9ddf210

Browse files
authored
Merge branch 'main' into feature/III-6948-event-preview-actions
2 parents 59d0b62 + c531eb4 commit 9ddf210

File tree

5 files changed

+31
-6
lines changed

5 files changed

+31
-6
lines changed

src/i18n/de.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,6 +1421,7 @@
14211421
"labels": {
14221422
"title": "Titel",
14231423
"type": "Typ",
1424+
"theme": "Thema",
14241425
"labels": "Labels",
14251426
"description": "Beschreibung",
14261427
"location": "Wo",
@@ -1438,6 +1439,7 @@
14381439
},
14391440
"empty_value": {
14401441
"description": "Keine Beschreibung",
1442+
"theme": "Kein Thema",
14411443
"organiser": "Keine Organisationsinformationen",
14421444
"price": "Keine Preisinformation",
14431445
"booking": "Keine Reservierungsinformationen",

src/i18n/fr.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,6 +1420,7 @@
14201420
"labels": {
14211421
"title": "Titre",
14221422
"type": "Type",
1423+
"theme": "Thème",
14231424
"labels": "Étiquettes",
14241425
"description": "Description",
14251426
"location": "",
@@ -1437,6 +1438,7 @@
14371438
},
14381439
"empty_value": {
14391440
"description": "Aucune description",
1441+
"theme": "Aucun thème",
14401442
"organiser": "Aucune information sur l'organisation",
14411443
"price": "Pas d'information du prix",
14421444
"booking": "Aucune information sur la réservation",

src/i18n/nl.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,6 +1477,7 @@
14771477
"labels": {
14781478
"title": "Titel",
14791479
"type": "Type",
1480+
"theme": "Thema",
14801481
"labels": "Labels",
14811482
"description": "Beschrijving",
14821483
"location": "Waar",
@@ -1494,6 +1495,7 @@
14941495
},
14951496
"empty_value": {
14961497
"description": "Geen beschrijving",
1498+
"theme": "Geen thema",
14971499
"organiser": "Geen organisatie-informatie",
14981500
"price": "Geen prijsinformatie",
14991501
"booking": "Geen reservatie-informatie",

src/pages/events/[eventId]/preview/Preview.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ const Preview = () => {
9191
);
9292

9393
const typeTerm = terms.find((term) => term.domain === 'eventtype');
94+
const themeTerm = terms.find((term) => term.domain === 'theme');
9495

9596
const description = getLanguageObjectOrFallback<string>(
9697
offer.description,
@@ -314,6 +315,14 @@ const Preview = () => {
314315
const tableData = [
315316
{ field: t('preview.labels.title'), value: title },
316317
{ field: t('preview.labels.type'), value: typeTerm.label },
318+
{
319+
field: t('preview.labels.theme'),
320+
value: themeTerm ? (
321+
themeTerm.label
322+
) : (
323+
<EmptyValue>{t('preview.empty_value.theme')}</EmptyValue>
324+
),
325+
},
317326
{
318327
field: t('preview.labels.labels'),
319328
value: (

src/test/e2e/events/create-calendar-multiple.spec.ts

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ test('create an event with calendarType multiple', async ({
7777
const expectedLabels = [
7878
'Titel',
7979
'Type',
80+
'Thema',
8081
'Labels',
8182
'Beschrijving',
8283
'Waar',
@@ -103,18 +104,27 @@ test('create an event with calendarType multiple', async ({
103104
// Validate that some rows have "Geen" when empty
104105
const tableRows = await page.locator('table.table > tbody > tr').count();
105106

106-
const rowsWithGeenValue = [3, 6, 7, 10, 11, 13, 14];
107-
108-
const secondColumnCells = await page
109-
.locator('table.table > tbody > tr > td:nth-child(2)')
110-
.allTextContents();
107+
const expectedEmptyFields = [
108+
'Thema',
109+
'Beschrijving',
110+
'Organisatie',
111+
'Prijsinfo',
112+
'Reservatie',
113+
'Contactgegevens',
114+
'Afbeeldingen',
115+
"Video's",
116+
];
111117

112118
for (let i = 0; i < tableRows; i++) {
119+
const firstColumnValue = await page
120+
.locator(`table.table > tbody > tr:nth-child(${i + 1}) > td:nth-child(1)`)
121+
.textContent();
122+
113123
const secondColumnValue = await page
114124
.locator(`table.table > tbody > tr:nth-child(${i + 1}) > td:nth-child(2)`)
115125
.textContent();
116126

117-
if (rowsWithGeenValue.includes(i)) {
127+
if (expectedEmptyFields.includes(firstColumnValue?.trim() ?? '')) {
118128
expect(secondColumnValue).toContain('Geen');
119129
} else {
120130
expect(secondColumnValue?.trim()).not.toBe('');

0 commit comments

Comments
 (0)