-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrespiratory_conditions.feature
More file actions
40 lines (36 loc) · 2.04 KB
/
respiratory_conditions.feature
File metadata and controls
40 lines (36 loc) · 2.04 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
@RespiratoryConditions
Feature: Respiratory conditions page
Scenario: The page is accessible
Given I am logged in
When I go to "/respiratory-conditions"
Then there are no accessibility violations
Scenario: Form errors
Given I am logged in
When I go to "/respiratory-conditions"
And I click "Continue"
Then I am on "/respiratory-conditions"
And I see a form error "Select if you have had any respiratory conditions"
When I fill in and submit my respiratory conditions with "Bronchitis" and "No, I have not had any of these respiratory conditions"
Then I am on "/respiratory-conditions"
And I see a form error "Select if you have had any respiratory conditions, or select 'No, I have not had any of these respiratory conditions'"
And there are no accessibility violations
Scenario: Navigating backwards and forwards
Given I am logged in
When I go to "/respiratory-conditions"
Then I see a back link to "/education"
When I fill in and submit my respiratory conditions with "Pneumonia" and "Emphysema"
Then I am on "/asbestos-exposure"
Scenario: Checking responses and changing them
Given I am logged in
When I go to "/respiratory-conditions"
And I fill in and submit my respiratory conditions with "Pneumonia" and "Emphysema"
When I go to "/check-your-answers"
Then I see "Pneumonia and Emphysema" as a response to "Diagnosed respiratory conditions" under "Your health"
And I see "/respiratory-conditions?change=True" as a link to change "Diagnosed respiratory conditions" under "Your health"
When I click the link to change "Diagnosed respiratory conditions" under "Your health"
Then I am on "/respiratory-conditions?change=True"
And I see "Pneumonia" selected
And I see "Emphysema" selected
When I fill in and submit my respiratory conditions with "Bronchitis" and "Tuberculosis (TB)"
Then I am on "/check-your-answers"
And I see "Pneumonia, Emphysema, Bronchitis, and Tuberculosis (TB)" as a response to "Diagnosed respiratory conditions" under "Your health"