From 10d22d8c0517b2fb2d56e6e7b62af08e77ec3045 Mon Sep 17 00:00:00 2001 From: Dom Smith Date: Fri, 30 Oct 2020 14:51:54 +0000 Subject: [PATCH] fix(per): Ensure add another responses are rendered correctly This passes a responded property to the framework response component for add another fields. The framework response component was updated to know about both responded and prefilled and now requires that the value be passed as true in order to render the value. --- common/presenters/framework-field-summary-list-row.js | 1 + common/presenters/framework-field-summary-list-row.test.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/common/presenters/framework-field-summary-list-row.js b/common/presenters/framework-field-summary-list-row.js index e5095b1d89..938c980ebf 100644 --- a/common/presenters/framework-field-summary-list-row.js +++ b/common/presenters/framework-field-summary-list-row.js @@ -29,6 +29,7 @@ function frameworkFieldToSummaryListRow(stepUrl) { response: { ...descendantResponse, question: frameworkQuestion, + responded: true, }, } }) diff --git a/common/presenters/framework-field-summary-list-row.test.js b/common/presenters/framework-field-summary-list-row.test.js index 7da09154c2..fbba9c596b 100644 --- a/common/presenters/framework-field-summary-list-row.test.js +++ b/common/presenters/framework-field-summary-list-row.test.js @@ -611,7 +611,7 @@ describe('Presenters', function () { { value: test.value, valueType: test.valueType, - responded: false, + responded: true, prefilled: false, questionUrl: `${mockStepUrl}#${test.id}`, }