Skip to content

Commit 503e30d

Browse files
authored
Merge pull request #244 from NHSDigital/enforce-eligibility-user-journey
Enforce eligibility user journey
2 parents 2532f69 + 1874502 commit 503e30d

File tree

64 files changed

+1068
-1077
lines changed

Some content is hidden

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

64 files changed

+1068
-1077
lines changed

features/age_when_started_smoking.feature

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
Feature: Age when started smoking
33
Scenario: The page is accessible
44
Given I am logged in
5-
And I am 60 years old
5+
And I have answered questions showing I am eligible
66
When I go to "/age-when-started-smoking"
77
Then there are no accessibility violations
88

99
Scenario: Form errors
1010
Given I am logged in
11+
And I have answered questions showing I am eligible
1112
And I am 60 years old
1213
When I go to "/age-when-started-smoking"
1314
And I click "Continue"
@@ -21,15 +22,15 @@ Feature: Age when started smoking
2122

2223
Scenario: Navigating backwards and forwards
2324
Given I am logged in
24-
And I am 60 years old
25+
And I have answered questions showing I am eligible
2526
When I go to "/age-when-started-smoking"
2627
Then I see a back link to "/relatives-age-when-diagnosed"
2728
When I fill in "How old were you when you started smoking?" as "18" and submit
2829
Then I am on "/check-your-answers"
2930

3031
Scenario: Checking responses and changing them
3132
Given I am logged in
32-
And I am 60 years old
33+
And I have answered questions showing I am eligible
3334
When I go to "/age-when-started-smoking"
3435
And I fill in "How old were you when you started smoking?" as "18" and submit
3536
When I go to "/check-your-answers"

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 & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +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 an eligible response
56
When I go to "/date-of-birth"
67
Then there are no accessibility violations
78

89
Scenario: Form errors
910
Given I am logged in
1011
And I have started the questionnaire
12+
And I have answered have you ever smoked with an eligible response
1113
When I go to "/date-of-birth"
1214
When I click "Continue"
1315
Then I am on "/date-of-birth"
@@ -25,20 +27,23 @@ Feature: Date of birth page
2527

2628
Scenario: Eligibility of people not in age range
2729
Given I am logged in
30+
And I have answered have you ever smoked with an eligible response
2831
When I go to "/date-of-birth"
2932
And I fill in and submit my date of birth with "01-01-1900"
3033
Then I am on "/age-range-exit"
3134
And I see a title "You are not eligible for lung cancer screening"
3235

3336
Scenario: Navigating backwards and forwards
3437
Given I am logged in
38+
And I have answered have you ever smoked with an eligible response
3539
When I go to "/date-of-birth"
3640
Then I see a back link to "/have-you-ever-smoked"
3741
When I fill in and submit my date of birth as 55 years ago
3842
Then I am on "/check-if-you-need-an-appointment"
3943

4044
Scenario: Checking responses and changing them
4145
Given I am logged in
46+
And I have answered have you ever smoked with an eligible response
4247
When I go to "/date-of-birth"
4348
And I fill in and submit my date of birth as 55 years ago
4449
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 family history lung cancer 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"

0 commit comments

Comments
 (0)