diff --git a/app/domains/fluggastrechte/services/pdf/sections/reason/factsOfCases/__test__/addReason.test.ts b/app/domains/fluggastrechte/services/pdf/sections/reason/factsOfCases/__test__/addReason.test.ts index cdd1a244d..1bf0272de 100644 --- a/app/domains/fluggastrechte/services/pdf/sections/reason/factsOfCases/__test__/addReason.test.ts +++ b/app/domains/fluggastrechte/services/pdf/sections/reason/factsOfCases/__test__/addReason.test.ts @@ -10,6 +10,7 @@ import { ARTICLE_NOT_MOVE_TEXT, CANCEL_TEXT, DELAY_TEXT, + FINAL_COLON_SENTENCE, NOT_MOVE_TEXT, PASSIVE_VERB_TEXT, PLAINTIFF_BOOKED_MULTIPLE_PERSONS_TEXT, @@ -107,4 +108,13 @@ describe("addReason", () => { expect(mockDoc.text).not.toHaveBeenCalledWith(PASSIVE_VERB_TEXT); }); + + it("should render document with colon", () => { + const mockStruct = mockPdfKitDocumentStructure(); + const mockDoc = mockPdfKitDocument(mockStruct); + + addReason(mockDoc, mockStruct, userDataMock); + + expect(mockDoc.text).toHaveBeenCalledWith(FINAL_COLON_SENTENCE); + }); }); diff --git a/app/domains/fluggastrechte/services/pdf/sections/reason/factsOfCases/addReason.ts b/app/domains/fluggastrechte/services/pdf/sections/reason/factsOfCases/addReason.ts index 2ec6033b6..0028527c1 100644 --- a/app/domains/fluggastrechte/services/pdf/sections/reason/factsOfCases/addReason.ts +++ b/app/domains/fluggastrechte/services/pdf/sections/reason/factsOfCases/addReason.ts @@ -13,9 +13,9 @@ export const ARTICLE_DELAY_CANCEL_TEXT = "der "; export const ARTICLE_NOT_MOVE_TEXT = "und wurde "; export const DELAY_TEXT = "nicht pünktlich ausgeführt "; export const CANCEL_TEXT = "annulliert "; -export const NOT_MOVE_TEXT = - "und wurde von der beklagten Partei nicht befördert"; -export const PASSIVE_VERB_TEXT = "wurde: "; +export const NOT_MOVE_TEXT = "nicht befördert"; +export const PASSIVE_VERB_TEXT = "wurde"; +export const FINAL_COLON_SENTENCE = ":"; const getPlaintiffBookedText = ({ isWeiterePersonen, @@ -70,12 +70,16 @@ export const addReason = ( }) .text("von der beklagten Partei ", { continued: true }) .font(FONTS_BUNDESSANS_BOLD) - .text(getBereichText(userData), { continued: true }) + .text(getBereichText(userData), { + continued: true, + }) .font(FONTS_BUNDESSANS_REGULAR); if (userData.bereich !== "nichtbefoerderung") { doc.text(PASSIVE_VERB_TEXT); } + + doc.text(FINAL_COLON_SENTENCE); }), ); documentStruct.add(reasonSect);