From 6ad1a700bc85fff4341a6c42d99354362175b560 Mon Sep 17 00:00:00 2001 From: Fazal Khan Date: Wed, 24 Apr 2024 09:44:12 +0100 Subject: [PATCH] fix(app): back link fixed --- app/services/return-requirements/reason.service.js | 1 + test/services/return-requirements/reason.service.test.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app/services/return-requirements/reason.service.js b/app/services/return-requirements/reason.service.js index 554fa04a9f..12a8e88c02 100644 --- a/app/services/return-requirements/reason.service.js +++ b/app/services/return-requirements/reason.service.js @@ -23,6 +23,7 @@ async function go (sessionId) { return { activeNavBar: 'search', + checkYourAnswersVisited: session.data.checkYourAnswersVisited, pageTitle: 'Select the reason for the return requirement', ...formattedData } diff --git a/test/services/return-requirements/reason.service.test.js b/test/services/return-requirements/reason.service.test.js index 260018f4b0..1fc9bbf377 100644 --- a/test/services/return-requirements/reason.service.test.js +++ b/test/services/return-requirements/reason.service.test.js @@ -21,6 +21,7 @@ describe('Select Reason service', () => { await DatabaseSupport.clean() session = await SessionHelper.add({ data: { + checkYourAnswersVisited: false, licence: { id: '8b7f78ba-f3ad-4cb6-a058-78abc4d1383d', currentVersionStartDate: '2023-01-01T00:00:00.000Z', @@ -45,6 +46,7 @@ describe('Select Reason service', () => { expect(result).to.equal({ activeNavBar: 'search', + checkYourAnswersVisited: false, pageTitle: 'Select the reason for the return requirement', licenceRef: '01/ABC' }, { skip: ['id'] })