You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And I have answered questions showing I am eligible
6
+
When I go to "/periods-when-you-stopped-smoking"
7
+
# TODO: problem with aria expanded from nhsuk frontend
8
+
# Then there are no accessibility violations
9
+
10
+
Scenario: Form errors
11
+
Given I am logged in
12
+
And I have answered questions showing I am eligible
13
+
When I go to "/periods-when-you-stopped-smoking"
14
+
When I submit the form
15
+
Then I am on "/periods-when-you-stopped-smoking"
16
+
And I see a form error "Select if you ever stopped smoking for periods of 1 year or longer"
17
+
# TODO: problem with aria expanded from nhsuk frontend
18
+
# And there are no accessibility violations
19
+
20
+
Scenario: Navigating backwards and forwards
21
+
Given I am logged in
22
+
And I have answered questions showing I am eligible
23
+
And I have answered questions showing I have smoked for "10" years
24
+
When I go to "/periods-when-you-stopped-smoking"
25
+
Then I see a back link to "/age-when-started-smoking"
26
+
When I check "Yes"
27
+
And I fill in "Enter the total number of years you stopped smoking for" with "1"
28
+
And I submit the form
29
+
Then I am on "/check-your-answers"
30
+
31
+
Scenario: Checking responses and changing them
32
+
Given I am logged in
33
+
And I have answered questions showing I am eligible
34
+
And I have answered questions showing I have smoked for "10" years
35
+
When I go to "/periods-when-you-stopped-smoking"
36
+
And I check "Yes"
37
+
And I fill in "Enter the total number of years you stopped smoking for" with "1"
38
+
And I submit the form
39
+
When I go to "/check-your-answers"
40
+
Then I see "Yes (1 years)" as a response to "Have you ever stopped smoking for periods of 1 year or longer?" under "Smoking history"
41
+
And I see "/periods-when-you-stopped-smoking?change=True" as a link to change "Have you ever stopped smoking for periods of 1 year or longer?" under "Smoking history"
42
+
When I click the link to change "Have you ever stopped smoking for periods of 1 year or longer?" under "Smoking history"
43
+
Then I am on "/periods-when-you-stopped-smoking?change=True"
44
+
And I see "Yes" selected
45
+
When I check "No"
46
+
And I submit the form
47
+
Then I am on "/check-your-answers"
48
+
And I see "No" as a response to "Have you ever stopped smoking for periods of 1 year or longer?" under "Smoking history"
Copy file name to clipboardExpand all lines: features/questionnaire.feature
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -59,8 +59,14 @@ Feature: Questionnaire
59
59
Then I am on "/age-when-started-smoking"
60
60
When I fill in "How old were you when you started smoking?" as "18" and submit
61
61
62
+
63
+
Then I am on "/periods-when-you-stopped-smoking"
64
+
When I check "Yes"
65
+
And I fill in "Enter the total number of years you stopped smoking for" with "10"
66
+
And I submit the form
67
+
62
68
Then I am on "/check-your-answers"
63
-
And I see a back link to "/age-when-started-smoking"
69
+
And I see a back link to "/periods-when-you-stopped-smoking"
64
70
65
71
And I see "Yes, I used to smoke" as a response to "Have you ever smoked tobacco?" under "Eligibility"
66
72
And I see a date 55 years ago as a response to "Date of birth" under "Eligibility"
@@ -78,5 +84,8 @@ Feature: Questionnaire
78
84
And I see "Yes" as a response to "Have any of your parents, siblings or children ever been diagnosed with lung cancer?" under "Family history"
79
85
And I see "Yes, they were younger than 60" as a response to "Were any of your relatives younger than 60 years old when they were diagnosed with lung cancer?" under "Family history"
80
86
87
+
And I see "18" as a response to "Age you started smoking" under "Smoking history"
88
+
And I see "Yes (10 years)" as a response to "Have you ever stopped smoking for periods of 1 year or longer?" under "Smoking history"
0 commit comments