-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsmoking_change.feature
More file actions
44 lines (41 loc) · 2.08 KB
/
smoking_change.feature
File metadata and controls
44 lines (41 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@SmokingChange
Feature: Smoking change page
Scenario: The page is accessible
Given I am logged in
And I have answered questions showing I am eligible
And I have answered questions showing I have smoked for "10" years
And I have answered questions showing I currently smoke "Cigarettes"
And I have answered questions showing I have smoked 10 "Cigarettes" "daily"
When I go to "/cigarettes-smoking-change"
Then there are no accessibility violations
Scenario: Form errors
Given I am logged in
And I have answered questions showing I am eligible
And I have answered questions showing I have smoked for "10" years
And I have answered questions showing I currently smoke "Cigarettes"
And I have answered questions showing I have smoked 10 "Cigarettes" "daily"
When I go to "/cigarettes-smoking-change"
And I submit the form
Then I see a form error "Select if the number of cigarettes you smoke has changed over time"
When I check "Yes, I used to smoke more than 10 cigarettes a day"
And I check "No, it has not changed"
And I submit the form
Then I see a form error "Select if the number of cigarettes you smoke has changed over time, or select 'no, it has not changed'"
Then there are no accessibility violations
Scenario: Navigating backwards and forwards
Given I am logged in
And I have answered questions showing I am eligible
And I have answered questions showing I have smoked for "10" years
And I have answered questions showing I currently smoke "Cigarettes"
And I have answered questions showing I have smoked 10 "Cigarettes" "daily"
When I go to "/cigarettes-smoking-change"
Then I see a back link to "/cigarettes-smoked-amount"
When I check "No, it has not changed"
And I submit the form
Then I am on "/check-your-answers"
When I click "Back"
Then I am on "/cigarettes-smoking-change"
When I uncheck "No, it has not changed"
And I check "Yes, I used to smoke more than 10 cigarettes a day"
And I submit the form
Then I am on "/cigarettes-smoking-increased-frequency"