Skip to content

Commit

Permalink
Changed view to show confirmation statement in place of the question …
Browse files Browse the repository at this point in the history
…text
  • Loading branch information
DanielClarkeEducation committed Aug 7, 2024
1 parent eb308ba commit b102260
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public async Task<List<NavigationLink>> GetNavigationLinks()
}
],
ConfirmationStatement =
"This is the confirmation statement",
"This is the confirmation statement 1",
AnswerToBeFullAndRelevant = true
},
new()
Expand All @@ -234,7 +234,7 @@ public async Task<List<NavigationLink>> GetNavigationLinks()
}
],
ConfirmationStatement =
"This is the confirmation statement",
"This is the confirmation statement 2",
AnswerToBeFullAndRelevant = true
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,8 @@ await govUkInsetTextRenderer.ToHtml(content.CheckAnotherQualificationText),
var answerToAdd = new AdditionalRequirementAnswerModel
{
Question = additionalRequirementQuestion.Question,
AnswerToBeFullAndRelevant = additionalRequirementQuestion.AnswerToBeFullAndRelevant
AnswerToBeFullAndRelevant = additionalRequirementQuestion.AnswerToBeFullAndRelevant,
ConfirmationStatement = additionalRequirementQuestion.ConfirmationStatement
};

if (additionalRequirementsAnswers.TryGetValue(additionalRequirementQuestion.Question, out var answer))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ public class AdditionalRequirementAnswerModel
public string? Answer { get; set; } = string.Empty;

public bool AnswerToBeFullAndRelevant { get; init; }

public string? ConfirmationStatement { get; init; } = string.Empty;
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
{
<div class="govuk-summary-list__row">
<dt class="govuk-summary-list__key" id="additional-requirement-@count-label">
@Model.AdditionalRequirementAnswers[count].Question
@Model.AdditionalRequirementAnswers[count].ConfirmationStatement
</dt>
<dd class="govuk-summary-list__value" id="additional-requirement-@count-value">
@CultureInfo.CurrentCulture.TextInfo.ToTitleCase(Model.AdditionalRequirementAnswers[count].Answer!.ToLower())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ describe("A spec used to test the qualification details page", () => {
cy.get("#from-which-year-value").should("contain.text", "2020");

// Check that the additional requirements and the answers are present
cy.get("#additional-requirement-0-label").should("contain.text", "Test question");
cy.get("#additional-requirement-0-label").should("contain.text", "This is the confirmation statement 1");
cy.get("#additional-requirement-0-value").should("contain.text", "Yes");
cy.get("#additional-requirement-1-label").should("contain.text", "Test question 2");
cy.get("#additional-requirement-1-label").should("contain.text", "This is the confirmation statement 2");
cy.get("#additional-requirement-1-value").should("contain.text", "Yes");

cy.get("#date-of-check-label").should("contain.text", "Test Date Of Check Label");
Expand Down

0 comments on commit b102260

Please sign in to comment.