-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhave_you_ever_smoked_page.feature
More file actions
43 lines (39 loc) · 1.89 KB
/
have_you_ever_smoked_page.feature
File metadata and controls
43 lines (39 loc) · 1.89 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
@HaveYouEverSmoked
Feature: Have you ever smoked page
Scenario: The page is accessible
Given I am logged in
When I go to "/have-you-ever-smoked"
Then there are no accessibility violations
Scenario: Form errors
Given I am logged in
When I go to "/have-you-ever-smoked"
And I submit the form
Then I am on "/have-you-ever-smoked"
And I see a form error "Select if you have ever smoked"
And there are no accessibility violations
Scenario: Eligibility of non smokers
Given I am logged in
When I go to "/have-you-ever-smoked"
And I fill in and submit my smoking status with "No, I have never smoked"
Then I am on "/non-smoker-exit"
And I see a title "You are not eligible for lung cancer screening"
And there are no accessibility violations
Scenario: Navigating backwards and forwards
Given I am logged in
When I go to "/have-you-ever-smoked"
Then I see a back link to "/start"
When I fill in and submit my smoking status with "Yes, I used to smoke"
Then I am on "/date-of-birth"
Scenario: Checking responses and changing them
Given I am logged in
When I go to "/have-you-ever-smoked"
And I fill in and submit my smoking status with "Yes, I used to smoke"
When I go to "/check-your-answers"
Then I see "Yes, I used to smoke" as a response to "Have you ever smoked tobacco?" under "Eligibility"
And I see "/have-you-ever-smoked?change=True" as a link to change "Have you ever smoked tobacco?" under "Eligibility"
When I click the link to change "Have you ever smoked tobacco?" under "Eligibility"
Then I am on "/have-you-ever-smoked?change=True"
And I see "Yes, I used to smoke" selected
When I fill in and submit my smoking status with "Yes, I currently smoke"
Then I am on "/check-your-answers"
And I see "Yes, I currently smoke" as a response to "Have you ever smoked tobacco?" under "Eligibility"