diff --git a/src/eq_schema/schema/Block/index.js b/src/eq_schema/schema/Block/index.js index 5e4e7ab0..383056c9 100644 --- a/src/eq_schema/schema/Block/index.js +++ b/src/eq_schema/schema/Block/index.js @@ -119,10 +119,7 @@ class Block { this.page_title = processPipe(ctx)(page.pageDescription); } if (page.pageType === "CalculatedSummaryPage") { - this.title = processPipe(ctx)(page.title).endsWith(".") - ? `${processPipe(ctx)(page.title)} Is this correct?` - : `${processPipe(ctx)(page.title)}. Is this correct?`; - + this.title = processPipe(ctx)(page.title); this.page_title = processPipe(ctx)(page.pageDescription) || processPipe(ctx)(page.title); diff --git a/src/eq_schema/schema/Block/index.test.js b/src/eq_schema/schema/Block/index.test.js index 55f3bf46..fd854761 100644 --- a/src/eq_schema/schema/Block/index.test.js +++ b/src/eq_schema/schema/Block/index.test.js @@ -200,7 +200,7 @@ describe("Block", () => { title: "Bye", }, id: "1", - title: "Hi is your total %(total)s. Is this correct?", + title: "Hi is your total %(total)s", type: "CalculatedSummary", }); }); @@ -728,7 +728,7 @@ describe("Block", () => { id: "summary-page1", type: "CalculatedSummary", page_title: "Summary page1", - title: "Summary1. Is this correct?", + title: "Summary1", calculation: { operation: { "+": [ @@ -754,49 +754,6 @@ describe("Block", () => { }); }); - it("Should not add a full stop after the title if it has been added by the user", () => { - const calculatedPageGraphql = { - totalTitle: "

Summary title1

", - answers: [ - { - label: "

Summary title1

", - type: "Number", - id: "9d2b3354-9751-4be4-9523-1f36345c3069", - validation: {}, - properties: {}, - }, - ], - title: "

Summary1.

", - type: "Number", - pageType: "CalculatedSummaryPage", - summaryAnswers: ["num-1"], - pageDescription: "Summary page1", - alias: null, - id: "summary-page1", - listId: undefined, - }; - - const block = new Block(calculatedPageGraphql, null, ctx); - - expect(block).toMatchObject({ - id: "summary-page1", - type: "CalculatedSummary", - page_title: "Summary page1", - title: "Summary1. Is this correct?", - calculation: { - operation: { - "+": [ - { - identifier: "answernum-1", - source: "answers", - }, - ], - }, - title: "Summary title1", - }, - }); - }); - it("should build a calculated summary page without skip condition when it contains a normal answer", () => { const calculatedPageGraphql = { totalTitle: "

Summary title1

", @@ -825,7 +782,7 @@ describe("Block", () => { id: "summary-page1", type: "CalculatedSummary", page_title: "Summary page1", - title: "Summary1. Is this correct?", + title: "Summary1", calculation: { operation: { "+": [ @@ -872,7 +829,7 @@ describe("Block", () => { id: "grand-summary-1", type: "GrandCalculatedSummary", page_title: "Grand summary", - title: "Grand summary. Is this correct?", + title: "Grand summary", calculation: { operation: { "+": [