Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions features/asbestos_exposure.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Feature: Asbestos exposure page
Scenario: The page is accessible
Given I am logged in
When I go to "/asbestos-exposure"
Then there are no accessibility violations

Scenario: Form errors
Given I am logged in
When I go to "/asbestos-exposure"
And I click "Continue"
Then I am on "/asbestos-exposure"
And I see a form error "Select if you have been exposed to asbestos"
And there are no accessibility violations

Scenario: Navigating backwards and forwards
Given I am logged in
When I go to "/asbestos-exposure"
Then I see a back link to "/respiratory-conditions"
When I fill in and submit my asbestos exposure with "No"
Then I am on "/cancer-diagnosis"

21 changes: 21 additions & 0 deletions features/cancer_diagnosis.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Feature: Cancer diagnosis page
Scenario: The page is accessible
Given I am logged in
When I go to "/cancer-diagnosis"
Then there are no accessibility violations

Scenario: Form errors
Given I am logged in
When I go to "/cancer-diagnosis"
And I click "Continue"
Then I am on "/cancer-diagnosis"
And I see a form error "Select if you have been diagnosed with cancer"
And there are no accessibility violations

Scenario: Navigating backwards and forwards
Given I am logged in
When I go to "/cancer-diagnosis"
Then I see a back link to "/asbestos-exposure"
When I fill in and submit my asbestos exposure with "No"
Then I am on "/family-history-lung-cancer"

37 changes: 37 additions & 0 deletions features/date_of_birth_page.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Feature: Date of birth page
Scenario: The page is accessible
Given I am logged in
When I go to "/date-of-birth"
Then there are no accessibility violations

Scenario: Form errors
Given I am logged in
And I have started the questionnaire
When I go to "/date-of-birth"
When I click "Continue"
Then I am on "/date-of-birth"
And I see a form error "Enter your date of birth"
When I fill in and submit my date of birth with "51-01-2001"
Then I am on "/date-of-birth"
And I see a form error "Date of birth must be a real date"
When I fill in and submit my date of birth with "01-13-2001"
Then I am on "/date-of-birth"
And I see a form error "Date of birth must be a real date"
When I fill in and submit my date of birth with "31-02-2001"
Then I am on "/date-of-birth"
And I see a form error "Date of birth must be a real date"
And there are no accessibility violations

Scenario: Eligibility of people not in age range
Given I am logged in
When I go to "/date-of-birth"
And I fill in and submit my date of birth with "01-01-1900"
Then I am on "/age-range-exit"
And I see a title "You are not eligible for lung cancer screening"

Scenario: Navigating backwards and forwards
Given I am logged in
When I go to "/date-of-birth"
Then I see a back link to "/have-you-ever-smoked"
When I fill in and submit my date of birth as 55 years ago
Then I am on "/height"
File renamed without changes.
21 changes: 21 additions & 0 deletions features/ethnicity.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Feature: Ethnicity page
Scenario: The page is accessible
Given I am logged in
When I go to "/ethnicity"
Then there are no accessibility violations

Scenario: Form errors
Given I am logged in
When I go to "/ethnicity"
And I click "Continue"
Then I am on "/ethnicity"
And I see a form error "Select your ethnic background"
And there are no accessibility violations

Scenario: Navigating backwards and forwards
Given I am logged in
When I go to "/ethnicity"
Then I see a back link to "/gender"
When I fill in and submit my ethnicity with "White"
Then I am on "/education"

24 changes: 24 additions & 0 deletions features/family_history_lung_cancer.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Feature: Family history of lung cancer page
Scenario: The page is accessible
Given I am logged in
When I go to "/family-history-lung-cancer"
Then there are no accessibility violations

Scenario: Form errors
Given I am logged in
When I go to "/family-history-lung-cancer"
And I click "Continue"
Then I am on "/family-history-lung-cancer"
And I see a form error "Select if any of your parents, siblings or children have had a diagnosis of lung cancer"
And there are no accessibility violations

Scenario: Navigating backwards and forwards
Given I am logged in
When I go to "/family-history-lung-cancer"
Then I see a back link to "/cancer-diagnosis"
When I fill in and submit my asbestos exposure with "No"
Then I am on "/responses"
When I click "Back"
When I fill in and submit my family history lung cancer with "Yes"
Then I am on "/relatives-age-when-diagnosed"

21 changes: 21 additions & 0 deletions features/gender.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Feature: Gender page
Scenario: The page is accessible
Given I am logged in
When I go to "/gender"
Then there are no accessibility violations

Scenario: Form errors
Given I am logged in
When I go to "/gender"
And I click "Continue"
Then I am on "/gender"
And I see a form error "Select the option that best describes your gender"
And there are no accessibility violations

Scenario: Navigating backwards and forwards
Given I am logged in
When I go to "/gender"
Then I see a back link to "/sex-at-birth"
When I fill in and submit my gender with "Female"
Then I am on "/ethnicity"

28 changes: 28 additions & 0 deletions features/have_you_ever_smoked_page.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
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"
52 changes: 52 additions & 0 deletions features/height.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
Feature: Height page
Scenario: The page is accessible
Given I am logged in
When I go to "/height"
Then there are no accessibility violations
When I click "Switch to feet and inches"
Then there are no accessibility violations

Scenario: Metric form errors
Given I am logged in
When I go to "/height"
And I click "Continue"
Then I am on "/height"
And I see a form error "Enter your height"
When I fill in and submit my height with "139.6"
Then I am on "/height"
And I see a form error "Height must be between 139.7cm and 243.8 cm"
When I fill in and submit my height with "243.9"
Then I am on "/height"
And I see a form error "Height must be between 139.7cm and 243.8 cm"
And there are no accessibility violations

Scenario: Imperial form errors
Given I am logged in
When I go to "/height?unit=imperial"
And I click "Continue"
Then I am on "/height?unit=imperial"
And I see a form error "Enter your height"
When I fill in and submit my height with "5.2" feet and "2" inches
Then I am on "/height?unit=imperial"
And I see a form error "Feet must be in whole numbers"
When I fill in and submit my height with "5" feet and "2.2" inches
Then I am on "/height?unit=imperial"
And I see a form error "Inches must be in whole numbers"
When I fill in and submit my height with "8" feet and "1" inch
Then I am on "/height?unit=imperial"
And I see a form error "Height must be between 4 feet 7 inches and 8 feet"
And there are no accessibility violations

Scenario: Navigating backwards and forwards
Given I am logged in
When I go to "/height"
Then I see a back link to "/date-of-birth"
When I fill in and submit my height with "170"
Then I am on "/weight"
When I click "Back"
And I click "Switch to feet and inches"
When I fill in and submit my height with "5" feet and "7" inches
Then I am on "/weight"
When I click "Back"
Then I am on "/height"

Original file line number Diff line number Diff line change
@@ -1,53 +1,57 @@
Feature: Questionnaire
Scenario: Cannot change responses once submitted
Given I am logged in
And I have already submitted my responses
When I go to "/start"
And I click "Start"
Then I am on "/start"

Scenario: The user can complete the full questionnaire
Given I am logged in
When I go to "/start"
And I click "Start"

Then I am on "/have-you-ever-smoked"
And 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"
And I see a back link to "/have-you-ever-smoked"
When I fill in and submit my date of birth as 55 years ago

Then I am on "/height"
And I see a back link to "/date-of-birth"
When I fill in and submit my height with "170"
And I click "Back"
And I click "Switch to feet and inches"
When I fill in and submit my height with "5" feet and "7" inches
When I click "Switch to feet and inches"
And I fill in and submit my height with "5" feet and "7" inches

Then I am on "/weight"
And I see a back link to "/height"
When I fill in and submit my weight with "70"
And I click "Back"
And I click "Switch to stone and pounds"
When I fill in and submit my weight with "5" stone and "10" pounds
When I click "Switch to stone and pounds"
And I fill in and submit my weight with "5" stone and "10" pounds

Then I am on "/sex-at-birth"
And I see a back link to "/weight"
When I fill in and submit my sex at birth with "Male"

Then I am on "/gender"
And I see a back link to "/sex-at-birth"
When I fill in and submit my gender with "Female"

Then I am on "/ethnicity"
And I see a back link to "/gender"
When I fill in and submit my ethnicity with "White"

Then I am on "/education"
And I see a back link to "/ethnicity"
When I click "Continue"

Then I am on "/respiratory-conditions"
And 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"
And I see a back link to "/respiratory-conditions"
When I fill in and submit my asbestos exposure with "No"

Then I am on "/cancer-diagnosis"
And I see a back link to "/asbestos-exposure"
When I fill in and submit my cancer diagnosis with "No"

Then I am on "/family-history-lung-cancer"
And I see a back link to "/cancer-diagnosis"
When I fill in and submit my family history lung cancer with "Yes"

Then I am on "/relatives-age-when-diagnosed"
And I see a back link to "/family-history-lung-cancer"
When I fill in and submit my relatives age when diagnosed with "Yes, they were younger than 60"

Then I am on "/responses"
And I see a back link to "/relatives-age-when-diagnosed"
And I see responses "Have you ever smoked? Yes, I used to smoke"
Expand Down
31 changes: 31 additions & 0 deletions features/relatives_age_when_diagnosed.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Feature: Relatives age when diagnosed page
Scenario: The page is accessible
Given I am logged in
When I go to "/family-history-lung-cancer"
And I fill in and submit my family history lung cancer with "Yes"
Then I am on "/relatives-age-when-diagnosed"
And there are no accessibility violations

Scenario: Form errors
Given I am logged in
When I go to "/family-history-lung-cancer"
And I fill in and submit my family history lung cancer with "Yes"
Then I am on "/relatives-age-when-diagnosed"
When I submit the form
Then I am on "/relatives-age-when-diagnosed"
And I see a form error "Select if your relatives were younger than 60 when they were diagnosed with lung cancer"
And there are no accessibility violations

Scenario: Navigating backwards and forwards
Given I am logged in
When I go to "/family-history-lung-cancer"
And I fill in and submit my family history lung cancer with "Yes"
Then I am on "/relatives-age-when-diagnosed"
And I see a back link to "/family-history-lung-cancer"
When I fill in and submit my relatives age when diagnosed with "Yes, they were younger than 60"
Then I am on "/responses"

Scenario: Redirecting if they have no family history of lung cancer
Given I am logged in
When I go to "/relatives-age-when-diagnosed"
Then I am on "/family-history-lung-cancer"
24 changes: 24 additions & 0 deletions features/respiratory_conditions.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
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"

21 changes: 21 additions & 0 deletions features/sex_at_birth.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Feature: Sex at birth page
Scenario: The page is accessible
Given I am logged in
When I go to "/sex-at-birth"
Then there are no accessibility violations

Scenario: Form errors
Given I am logged in
When I go to "/sex-at-birth"
And I click "Continue"
Then I am on "/sex-at-birth"
And I see a form error "Select your sex at birth"
And there are no accessibility violations

Scenario: Navigating backwards and forwards
Given I am logged in
When I go to "/sex-at-birth"
Then I see a back link to "/weight"
When I fill in and submit my sex at birth with "Male"
Then I am on "/gender"

Loading