Skip to content

Commit c4a3f2f

Browse files
authored
Revert "Arn 2509 dev update response radio button multiple sections" (#764)
1 parent 45dbd86 commit c4a3f2f

File tree

2 files changed

+14
-27
lines changed

2 files changed

+14
-27
lines changed

app/form/v1_0/fields/health-wellbeing.ts

-11
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ const positiveFactorsHint = `
2020
<p class="govuk-hint">Consider what's helped them feel more hopeful.</p>
2121
<p class="govuk-hint">Select all that apply.</p>
2222
`
23-
const skipQuestionText = `
24-
<p class="govuk-body govuk-!-padding-top-3">Before you submit the assessment, you'll need to answer this question</p>
25-
`
2623

2724
class HealthWellbeingFieldsFactory extends FieldsFactory {
2825
healthWellbeingPhysicalHealthCondition: FormWizard.Field = {
@@ -34,14 +31,6 @@ class HealthWellbeingFieldsFactory extends FieldsFactory {
3431
{ text: 'Yes', value: 'YES', kind: 'option' },
3532
{ text: 'No', value: 'NO', kind: 'option' },
3633
{ text: 'Unknown', value: 'UNKNOWN', kind: 'option' },
37-
utils.orDivider,
38-
{
39-
text: 'Skip this question for now',
40-
value: 'SKIP',
41-
hint: { html: skipQuestionText },
42-
kind: 'option',
43-
behaviour: 'exclusive',
44-
},
4534
],
4635
labelClasses: utils.getMediumLabelClassFor(FieldType.Radio),
4736
}

cypress/e2e/v1.0/pages/health-wellbeing/questions/physicalHealthCondition.ts

+14-16
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default (stepUrl: string, summaryPage: string, positionNumber: number) =>
44
const question = 'Does Sam have any physical health conditions?'
55

66
const optionsWithDetails = ['Yes']
7-
const options = ['No', 'Unknown', null, 'Skip this question for now']
7+
const options = ['No', 'Unknown']
88

99
describe(question, () => {
1010
it(`displays and validates the question`, () => {
@@ -48,23 +48,21 @@ export default (stepUrl: string, summaryPage: string, positionNumber: number) =>
4848
})
4949
})
5050

51-
options
52-
.filter(option => option !== null)
53-
.forEach(option => {
54-
it(`summary page displays "${option}"`, () => {
55-
cy.visitStep(stepUrl)
56-
cy.getQuestion(question).getRadio(option).clickLabel()
51+
options.forEach(option => {
52+
it(`summary page displays "${option}"`, () => {
53+
cy.visitStep(stepUrl)
54+
cy.getQuestion(question).getRadio(option).clickLabel()
5755

58-
cy.saveAndContinue()
56+
cy.saveAndContinue()
5957

60-
cy.visitStep(summaryPage)
61-
cy.getSummary(question).getAnswer(option).hasNoSecondaryAnswer()
62-
cy.checkAccessibility()
63-
cy.getSummary(question).clickChange()
64-
cy.assertStepUrlIs(stepUrl)
65-
cy.assertQuestionUrl(question)
66-
cy.getQuestion(question).getRadio(option).isChecked()
67-
})
58+
cy.visitStep(summaryPage)
59+
cy.getSummary(question).getAnswer(option).hasNoSecondaryAnswer()
60+
cy.checkAccessibility()
61+
cy.getSummary(question).clickChange()
62+
cy.assertStepUrlIs(stepUrl)
63+
cy.assertQuestionUrl(question)
64+
cy.getQuestion(question).getRadio(option).isChecked()
6865
})
66+
})
6967
})
7068
}

0 commit comments

Comments
 (0)