Skip to content

Commit 7d56dd0

Browse files
authored
ARN-2389 Add an optional details field to "I do not want to answer" (#684)
1 parent ff25ad8 commit 7d56dd0

File tree

9 files changed

+17
-9
lines changed

9 files changed

+17
-9
lines changed

app/form/v1_0/fields/common/fieldsFactory.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ export default abstract class FieldsFactory {
103103
{ text: 'I want to make changes but need help', value: 'NEEDS_HELP_TO_MAKE_CHANGES', kind: 'option' },
104104
{ text: 'I am thinking about making changes', value: 'THINKING_ABOUT_MAKING_CHANGES', kind: 'option' },
105105
{ text: 'I do not want to make changes', value: 'DOES_NOT_WANT_TO_MAKE_CHANGES', kind: 'option' },
106+
{ text: 'I do not want to answer', value: 'DOES_NOT_WANT_TO_ANSWER', kind: 'option' },
106107
]
107108

108109
const parentField: FormWizard.Field = {
@@ -113,7 +114,6 @@ export default abstract class FieldsFactory {
113114
validate: [{ type: ValidationType.Required, message: `Select if they want to make changes to ${changesTo}` }],
114115
options: [
115116
...makeChangesOptionsWithDetails,
116-
{ text: 'I do not want to answer', value: 'DOES_NOT_WANT_TO_ANSWER', kind: 'option' },
117117
orDivider,
118118
{ text: '[subject] is not present', value: 'NOT_PRESENT', kind: 'option' },
119119
{ text: 'Not applicable', value: 'NOT_APPLICABLE', kind: 'option' },

cypress/e2e/v1.0/pages/accommodation/questions/wantToMakeChanges.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export default (stepUrl: string, summaryPage: string, positionNumber: number) =>
3434
'I want to make changes but need help',
3535
'I am thinking about making changes',
3636
'I do not want to make changes',
37+
'I do not want to answer',
3738
).forEach(option => {
3839
it(`conditional field is displayed for "${option}"`, () => {
3940
cy.getQuestion(question).getRadio(option).hasHint(null).hasConditionalQuestion(false).clickLabel()
@@ -68,7 +69,7 @@ export default (stepUrl: string, summaryPage: string, positionNumber: number) =>
6869
})
6970
})
7071

71-
Array.of('I do not want to answer', 'Sam is not present', 'Not applicable').forEach(option => {
72+
Array.of('Sam is not present', 'Not applicable').forEach(option => {
7273
it(`no conditional field is displayed for "${option}"`, () => {
7374
cy.getQuestion(question).getRadio(option).hasHint(null).hasConditionalQuestion(false).clickLabel()
7475

cypress/e2e/v1.0/pages/alcohol-use/questions/wantToMakeChanges.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export default (stepUrl: string, summaryPage: string, positionNumber: number) =>
3333
'I want to make changes but need help',
3434
'I am thinking about making changes',
3535
'I do not want to make changes',
36+
'I do not want to answer',
3637
].forEach(option => {
3738
it(`conditional field is displayed for "${option}"`, () => {
3839
cy.getQuestion(question).getRadio(option).hasHint(null).hasConditionalQuestion(false).clickLabel()
@@ -64,7 +65,7 @@ export default (stepUrl: string, summaryPage: string, positionNumber: number) =>
6465
cy.getQuestion(question).getRadio(option).isChecked().getConditionalQuestion().hasText('some text')
6566
})
6667
})
67-
;['I do not want to answer', 'Sam is not present', 'Not applicable'].forEach(option => {
68+
;['Sam is not present', 'Not applicable'].forEach(option => {
6869
it(`no conditional field is displayed for "${option}"`, () => {
6970
cy.getQuestion(question).getRadio(option).hasHint(null).hasConditionalQuestion(false).clickLabel()
7071

cypress/e2e/v1.0/pages/drug-use/questions/wantToMakeChanges.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export default (stepUrl: string, summaryPage: string, positionNumber: number) =>
3333
'I want to make changes but need help',
3434
'I am thinking about making changes',
3535
'I do not want to make changes',
36+
'I do not want to answer',
3637
).forEach(option => {
3738
it(`conditional field is displayed for "${option}"`, () => {
3839
cy.getQuestion(question).getRadio(option).hasHint(null).hasConditionalQuestion(false).clickLabel()
@@ -68,7 +69,7 @@ export default (stepUrl: string, summaryPage: string, positionNumber: number) =>
6869
cy.getQuestion(question).getRadio(option).isChecked().getConditionalQuestion().hasText('some text')
6970
})
7071
})
71-
Array.of('I do not want to answer', 'Sam is not present', 'Not applicable').forEach(option => {
72+
Array.of('Sam is not present', 'Not applicable').forEach(option => {
7273
it(`no conditional field is displayed for "${option}"`, () => {
7374
cy.getQuestion(question).getRadio(option).hasHint(null).hasConditionalQuestion(false).clickLabel()
7475

cypress/e2e/v1.0/pages/employment-education/questions/wantToMakeChanges.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export default (stepUrl: string, summaryPage: string, positionNumber: number) =>
3535
'I want to make changes but need help',
3636
'I am thinking about making changes',
3737
'I do not want to make changes',
38+
'I do not want to answer',
3839
).forEach(option => {
3940
it(`conditional field is displayed for "${option}"`, () => {
4041
cy.getQuestion(question).getRadio(option).hasHint(null).hasConditionalQuestion(false).clickLabel()
@@ -66,7 +67,7 @@ export default (stepUrl: string, summaryPage: string, positionNumber: number) =>
6667
cy.getQuestion(question).getRadio(option).isChecked().getConditionalQuestion().hasText('some text')
6768
})
6869
})
69-
Array.of('I do not want to answer', 'Sam is not present', 'Not applicable').forEach(option => {
70+
Array.of('Sam is not present', 'Not applicable').forEach(option => {
7071
it(`no conditional field is displayed for "${option}"`, () => {
7172
cy.getQuestion(question).getRadio(option).hasHint(null).hasConditionalQuestion(false).clickLabel()
7273

cypress/e2e/v1.0/pages/finance/questions/wantToMakeChanges.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export default (stepUrl: string, summaryPage: string, positionNumber: number) =>
3333
'I want to make changes but need help',
3434
'I am thinking about making changes',
3535
'I do not want to make changes',
36+
'I do not want to answer',
3637
).forEach(option => {
3738
it(`conditional field is displayed for "${option}"`, () => {
3839
cy.getQuestion(question).getRadio(option).hasHint(null).hasConditionalQuestion(false).clickLabel()
@@ -64,7 +65,7 @@ export default (stepUrl: string, summaryPage: string, positionNumber: number) =>
6465
cy.getQuestion(question).getRadio(option).isChecked().getConditionalQuestion().hasText('some text')
6566
})
6667
})
67-
Array.of('I do not want to answer', 'Sam is not present', 'Not applicable').forEach(option => {
68+
Array.of('Sam is not present', 'Not applicable').forEach(option => {
6869
it(`no conditional field is displayed for "${option}"`, () => {
6970
cy.getQuestion(question).getRadio(option).hasHint(null).hasConditionalQuestion(false).clickLabel()
7071

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export default (stepUrl: string, summaryPage: string, positionNumber: number) =>
3333
'I want to make changes but need help',
3434
'I am thinking about making changes',
3535
'I do not want to make changes',
36+
'I do not want to answer',
3637
).forEach(option => {
3738
it(`conditional field is displayed for "${option}"`, () => {
3839
cy.getQuestion(question).getRadio(option).hasHint(null).hasConditionalQuestion(false).clickLabel()
@@ -64,7 +65,7 @@ export default (stepUrl: string, summaryPage: string, positionNumber: number) =>
6465
cy.getQuestion(question).getRadio(option).isChecked().getConditionalQuestion().hasText('some text')
6566
})
6667
})
67-
Array.of('I do not want to answer', 'Sam is not present', 'Not applicable').forEach(option => {
68+
Array.of('Sam is not present', 'Not applicable').forEach(option => {
6869
it(`no conditional field is displayed for "${option}"`, () => {
6970
cy.getQuestion(question).getRadio(option).hasHint(null).hasConditionalQuestion(false).clickLabel()
7071

cypress/e2e/v1.0/pages/personal-relationships-community/questions/wantToMakeChanges.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export default (stepUrl: string, summaryPage: string, positionNumber: number) =>
3535
'I want to make changes but need help',
3636
'I am thinking about making changes',
3737
'I do not want to make changes',
38+
'I do not want to answer',
3839
).forEach(option => {
3940
it(`conditional field is displayed for "${option}"`, () => {
4041
cy.getQuestion(question).getRadio(option).hasHint(null).hasConditionalQuestion(false).clickLabel()
@@ -66,7 +67,7 @@ export default (stepUrl: string, summaryPage: string, positionNumber: number) =>
6667
cy.getQuestion(question).getRadio(option).isChecked().getConditionalQuestion().hasText('some text')
6768
})
6869
})
69-
Array.of('I do not want to answer', 'Sam is not present', 'Not applicable').forEach(option => {
70+
Array.of('Sam is not present', 'Not applicable').forEach(option => {
7071
it(`no conditional field is displayed for "${option}"`, () => {
7172
cy.getQuestion(question).getRadio(option).hasHint(null).hasConditionalQuestion(false).clickLabel()
7273

cypress/e2e/v1.0/pages/thinking-behaviours-attitudes/questions/wantToMakeChanges.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export default (stepUrl: string, summaryPage: string, positionNumber: number) =>
3535
'I want to make changes but need help',
3636
'I am thinking about making changes',
3737
'I do not want to make changes',
38+
'I do not want to answer',
3839
].forEach(option => {
3940
it(`conditional field is displayed for "${option}"`, () => {
4041
cy.getQuestion(question).getRadio(option).hasHint(null).hasConditionalQuestion(false).clickLabel()
@@ -66,7 +67,7 @@ export default (stepUrl: string, summaryPage: string, positionNumber: number) =>
6667
cy.getQuestion(question).getRadio(option).isChecked().getConditionalQuestion().hasText('some text')
6768
})
6869
})
69-
;['I do not want to answer', 'Sam is not present', 'Not applicable'].forEach(option => {
70+
Array.of('Sam is not present', 'Not applicable').forEach(option => {
7071
it(`no conditional field is displayed for "${option}"`, () => {
7172
cy.getQuestion(question).getRadio(option).hasHint(null).hasConditionalQuestion(false).clickLabel()
7273

0 commit comments

Comments
 (0)