Skip to content

Commit 2800e87

Browse files
committed
Ensure all non eligibility questions can only be answered when eligible
1 parent 0b6a1bf commit 2800e87

45 files changed

Lines changed: 611 additions & 880 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

features/asbestos_exposure.feature

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
Feature: Asbestos exposure page
33
Scenario: The page is accessible
44
Given I am logged in
5+
And I have answered questions showing I am eligible
56
When I go to "/asbestos-exposure"
67
Then there are no accessibility violations
78

89
Scenario: Form errors
910
Given I am logged in
11+
And I have answered questions showing I am eligible
1012
When I go to "/asbestos-exposure"
1113
And I click "Continue"
1214
Then I am on "/asbestos-exposure"
@@ -15,13 +17,15 @@ Feature: Asbestos exposure page
1517

1618
Scenario: Navigating backwards and forwards
1719
Given I am logged in
20+
And I have answered questions showing I am eligible
1821
When I go to "/asbestos-exposure"
1922
Then I see a back link to "/respiratory-conditions"
2023
When I fill in and submit my asbestos exposure with "No"
2124
Then I am on "/cancer-diagnosis"
2225

2326
Scenario: Checking responses and changing them
2427
Given I am logged in
28+
And I have answered questions showing I am eligible
2529
When I go to "/asbestos-exposure"
2630
And I fill in and submit my asbestos exposure with "No"
2731
When I go to "/check-your-answers"
@@ -33,3 +37,8 @@ Feature: Asbestos exposure page
3337
When I fill in and submit my asbestos exposure with "Yes"
3438
Then I am on "/check-your-answers"
3539
And I see "Yes" as a response to "Have you ever worked in a job where you were exposed to asbestos?" under "Your health"
40+
41+
Scenario: Cannot answer when ineligible
42+
Given I am logged in
43+
When I go to "/asbestos-exposure"
44+
Then I am on "/have-you-ever-smoked"

features/cancer_diagnosis.feature

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
Feature: Cancer diagnosis page
33
Scenario: The page is accessible
44
Given I am logged in
5+
And I have answered questions showing I am eligible
56
When I go to "/cancer-diagnosis"
67
Then there are no accessibility violations
78

89
Scenario: Form errors
910
Given I am logged in
11+
And I have answered questions showing I am eligible
1012
When I go to "/cancer-diagnosis"
1113
And I click "Continue"
1214
Then I am on "/cancer-diagnosis"
@@ -15,13 +17,15 @@ Feature: Cancer diagnosis page
1517

1618
Scenario: Navigating backwards and forwards
1719
Given I am logged in
20+
And I have answered questions showing I am eligible
1821
When I go to "/cancer-diagnosis"
1922
Then I see a back link to "/asbestos-exposure"
2023
When I fill in and submit my cancer diagnosis with "No"
2124
Then I am on "/family-history-lung-cancer"
2225

2326
Scenario: Checking responses and changing them
2427
Given I am logged in
28+
And I have answered questions showing I am eligible
2529
When I go to "/cancer-diagnosis"
2630
And I fill in and submit my cancer diagnosis with "No"
2731
When I go to "/check-your-answers"

features/check_need_appointment.feature

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22
Feature: Check if you need an appointment page
33
Scenario: The page is accessible
44
Given I am logged in
5+
And I have answered have you ever smoked with an eligible response
6+
And I have answered date of birth with an eligible date of birth
57
When I go to "/check-if-you-need-an-appointment"
68
Then there are no accessibility violations
79

810
Scenario: Form errors
911
Given I am logged in
12+
And I have answered have you ever smoked with an eligible response
13+
And I have answered date of birth with an eligible date of birth
1014
When I go to "/check-if-you-need-an-appointment"
1115
And I click "Continue"
1216
Then I am on "/check-if-you-need-an-appointment"
@@ -15,20 +19,26 @@ Feature: Check if you need an appointment page
1519

1620
Scenario: Eligibility exit if needs face to face appointment
1721
Given I am logged in
22+
And I have answered have you ever smoked with an eligible response
23+
And I have answered date of birth with an eligible date of birth
1824
When I go to "/check-if-you-need-an-appointment"
1925
Then I see a back link to "/date-of-birth"
2026
When I check "Yes, one or more of these things applies to me and I need a face-to-face appointment" and submit
2127
Then I am on "/call-us-to-book-an-appointment"
2228

2329
Scenario: Navigating backwards and forwards
2430
Given I am logged in
31+
And I have answered have you ever smoked with an eligible response
32+
And I have answered date of birth with an eligible date of birth
2533
When I go to "/check-if-you-need-an-appointment"
2634
Then I see a back link to "/date-of-birth"
2735
When I check "No, I can continue online" and submit
2836
Then I am on "/height"
2937

3038
Scenario: Checking responses and changing them
3139
Given I am logged in
40+
And I have answered have you ever smoked with an eligible response
41+
And I have answered date of birth with an eligible date of birth
3242
When I go to "/check-if-you-need-an-appointment"
3343
And I check "No, I can continue online" and submit
3444
When I click "Back"

features/date_of_birth_page.feature

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
Feature: Date of birth page
33
Scenario: The page is accessible
44
Given I am logged in
5-
And I have answered have you ever smoked with "Yes, I used to smoke"
5+
And I have answered have you ever smoked with an eligible response
66
When I go to "/date-of-birth"
77
Then there are no accessibility violations
88

99
Scenario: Form errors
1010
Given I am logged in
1111
And I have started the questionnaire
12-
And I have answered have you ever smoked with "Yes, I used to smoke"
12+
And I have answered have you ever smoked with an eligible response
1313
When I go to "/date-of-birth"
1414
When I click "Continue"
1515
Then I am on "/date-of-birth"
@@ -27,23 +27,23 @@ Feature: Date of birth page
2727

2828
Scenario: Eligibility of people not in age range
2929
Given I am logged in
30-
And I have answered have you ever smoked with "Yes, I used to smoke"
30+
And I have answered have you ever smoked with an eligible response
3131
When I go to "/date-of-birth"
3232
And I fill in and submit my date of birth with "01-01-1900"
3333
Then I am on "/age-range-exit"
3434
And I see a title "You are not eligible for lung cancer screening"
3535

3636
Scenario: Navigating backwards and forwards
3737
Given I am logged in
38-
And I have answered have you ever smoked with "Yes, I used to smoke"
38+
And I have answered have you ever smoked with an eligible response
3939
When I go to "/date-of-birth"
4040
Then I see a back link to "/have-you-ever-smoked"
4141
When I fill in and submit my date of birth as 55 years ago
4242
Then I am on "/check-if-you-need-an-appointment"
4343

4444
Scenario: Checking responses and changing them
4545
Given I am logged in
46-
And I have answered have you ever smoked with "Yes, I used to smoke"
46+
And I have answered have you ever smoked with an eligible response
4747
When I go to "/date-of-birth"
4848
And I fill in and submit my date of birth as 55 years ago
4949
When I go to "/check-your-answers"

features/education.feature

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
Feature: Education page
33
Scenario: The page is accessible
44
Given I am logged in
5+
And I have answered questions showing I am eligible
56
When I go to "/education"
67
Then there are no accessibility violations
78

89
Scenario: Form errors
910
Given I am logged in
11+
And I have answered questions showing I am eligible
1012
When I go to "/education"
1113
And I click "Continue"
1214
Then I am on "/education"
@@ -15,6 +17,7 @@ Feature: Education page
1517

1618
Scenario: Navigating backwards and forwards
1719
Given I am logged in
20+
And I have answered questions showing I am eligible
1821
When I go to "/education"
1922
Then I see a back link to "/ethnicity"
2023
When I check "A-levels"
@@ -23,6 +26,7 @@ Feature: Education page
2326

2427
Scenario: Checking responses and changing them
2528
Given I am logged in
29+
And I have answered questions showing I am eligible
2630
When I go to "/education"
2731
And I check "A-levels"
2832
And I check "GCSEs"

features/ethnicity.feature

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
Feature: Ethnicity page
33
Scenario: The page is accessible
44
Given I am logged in
5+
And I have answered questions showing I am eligible
56
When I go to "/ethnicity"
67
Then there are no accessibility violations
78

89
Scenario: Form errors
910
Given I am logged in
11+
And I have answered questions showing I am eligible
1012
When I go to "/ethnicity"
1113
And I click "Continue"
1214
Then I am on "/ethnicity"
@@ -15,13 +17,15 @@ Feature: Ethnicity page
1517

1618
Scenario: Navigating backwards and forwards
1719
Given I am logged in
20+
And I have answered questions showing I am eligible
1821
When I go to "/ethnicity"
1922
Then I see a back link to "/gender"
2023
When I fill in and submit my ethnicity with "White"
2124
Then I am on "/education"
2225

2326
Scenario: Checking responses and changing them
2427
Given I am logged in
28+
And I have answered questions showing I am eligible
2529
When I go to "/ethnicity"
2630
And I fill in and submit my ethnicity with "White"
2731
When I go to "/check-your-answers"

features/family_history_lung_cancer.feature

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
Feature: Family history of lung cancer page
33
Scenario: The page is accessible
44
Given I am logged in
5+
And I have answered questions showing I am eligible
56
When I go to "/family-history-lung-cancer"
67
Then there are no accessibility violations
78

89
Scenario: Form errors
910
Given I am logged in
11+
And I have answered questions showing I am eligible
1012
When I go to "/family-history-lung-cancer"
1113
And I click "Continue"
1214
Then I am on "/family-history-lung-cancer"
@@ -15,6 +17,7 @@ Feature: Family history of lung cancer page
1517

1618
Scenario: Navigating backwards and forwards
1719
Given I am logged in
20+
And I have answered questions showing I am eligible
1821
When I go to "/family-history-lung-cancer"
1922
Then I see a back link to "/cancer-diagnosis"
2023
When I fill in and submit my asbestos exposure with "No"
@@ -25,6 +28,7 @@ Feature: Family history of lung cancer page
2528

2629
Scenario: Checking responses and changing them
2730
Given I am logged in
31+
And I have answered questions showing I am eligible
2832
When I go to "/family-history-lung-cancer"
2933
And I fill in and submit my family history lung cancer with "No"
3034
When I go to "/check-your-answers"

features/gender.feature

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
Feature: Gender page
33
Scenario: The page is accessible
44
Given I am logged in
5+
And I have answered questions showing I am eligible
56
When I go to "/gender"
67
Then there are no accessibility violations
78

89
Scenario: Form errors
910
Given I am logged in
11+
And I have answered questions showing I am eligible
1012
When I go to "/gender"
1113
And I click "Continue"
1214
Then I am on "/gender"
@@ -15,13 +17,15 @@ Feature: Gender page
1517

1618
Scenario: Navigating backwards and forwards
1719
Given I am logged in
20+
And I have answered questions showing I am eligible
1821
When I go to "/gender"
1922
Then I see a back link to "/sex-at-birth"
2023
When I fill in and submit my gender with "Female"
2124
Then I am on "/ethnicity"
2225

2326
Scenario: Checking responses and changing them
2427
Given I am logged in
28+
And I have answered questions showing I am eligible
2529
When I go to "/gender"
2630
And I fill in and submit my gender with "Female"
2731
When I go to "/check-your-answers"

features/height.feature

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
Feature: Height page
33
Scenario: The page is accessible
44
Given I am logged in
5+
And I have answered questions showing I am eligible
56
When I go to "/height"
67
Then there are no accessibility violations
78
When I click "Switch to feet and inches"
89
Then there are no accessibility violations
910

1011
Scenario: Metric form errors
1112
Given I am logged in
13+
And I have answered questions showing I am eligible
1214
When I go to "/height"
1315
And I click "Continue"
1416
Then I am on "/height"
@@ -23,6 +25,7 @@ Feature: Height page
2325

2426
Scenario: Imperial form errors
2527
Given I am logged in
28+
And I have answered questions showing I am eligible
2629
When I go to "/height?unit=imperial"
2730
And I click "Continue"
2831
Then I am on "/height?unit=imperial"
@@ -40,6 +43,7 @@ Feature: Height page
4043

4144
Scenario: Navigating backwards and forwards
4245
Given I am logged in
46+
And I have answered questions showing I am eligible
4347
When I go to "/height"
4448
Then I see a back link to "/check-if-you-need-an-appointment"
4549
When I fill in and submit my height with "170"
@@ -53,6 +57,7 @@ Feature: Height page
5357

5458
Scenario: Checking responses and changing them
5559
Given I am logged in
60+
And I have answered questions showing I am eligible
5661
When I go to "/height"
5762
And I fill in and submit my height with "170"
5863
When I go to "/check-your-answers"

features/relatives_age_when_diagnosed.feature

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
Feature: Relatives age when diagnosed page
33
Scenario: The page is accessible
44
Given I am logged in
5+
And I have answered questions showing I am eligible
56
When I go to "/family-history-lung-cancer"
67
And I fill in and submit my family history lung cancer with "Yes"
78
Then I am on "/relatives-age-when-diagnosed"
89
And there are no accessibility violations
910

1011
Scenario: Form errors
1112
Given I am logged in
13+
And I have answered questions showing I am eligible
1214
When I go to "/family-history-lung-cancer"
1315
And I fill in and submit my family history lung cancer with "Yes"
1416
Then I am on "/relatives-age-when-diagnosed"
@@ -19,6 +21,7 @@ Feature: Relatives age when diagnosed page
1921

2022
Scenario: Navigating backwards and forwards
2123
Given I am logged in
24+
And I have answered questions showing I am eligible
2225
When I go to "/family-history-lung-cancer"
2326
And I fill in and submit my family history lung cancer with "Yes"
2427
Then I am on "/relatives-age-when-diagnosed"
@@ -28,11 +31,13 @@ Feature: Relatives age when diagnosed page
2831

2932
Scenario: Redirecting if they have no family history of lung cancer
3033
Given I am logged in
34+
And I have answered questions showing I am eligible
3135
When I go to "/relatives-age-when-diagnosed"
3236
Then I am on "/family-history-lung-cancer"
3337

3438
Scenario: Checking responses and changing them
3539
Given I am logged in
40+
And I have answered questions showing I am eligible
3641
When I go to "/family-history-lung-cancer"
3742
And I fill in and submit my family history lung cancer with "Yes"
3843
And I fill in and submit my relatives age when diagnosed with "Yes, they were younger than 60"

0 commit comments

Comments
 (0)