@@ -128,3 +128,35 @@ def test_full_questionnaire_user_journey(self):
128128 page .click ("text=Submit" )
129129
130130 expect (page ).to_have_url (f"{ self .live_server_url } /your-results" )
131+
132+ def test_can_select_multiple_respiratory_conditions (self ):
133+ """Test that users can select multiple respiratory conditions in the UI"""
134+ participant_id = '456'
135+ smoking_status = 'Yes, I currently smoke'
136+ age = datetime .now () - relativedelta (years = 60 )
137+
138+ page = self .browser .new_page ()
139+ page .goto (f"{ self .live_server_url } /start" )
140+
141+ fill_in_and_submit_participant_id (page , participant_id )
142+ fill_in_and_submit_smoking_eligibility (page , smoking_status )
143+ fill_in_and_submit_date_of_birth (page , age )
144+ fill_in_and_submit_height_metric (page , "170" )
145+ fill_in_and_submit_weight_metric (page , "70" )
146+ fill_in_and_submit_sex_at_birth (page , "Female" )
147+ fill_in_and_submit_gender (page , "Female" )
148+ fill_in_and_submit_ethnicity (page , "White" )
149+ page .click ("text=Continue" ) # education
150+
151+ # Select multiple respiratory conditions
152+ expect (page ).to_have_url (f"{ self .live_server_url } /respiratory-conditions" )
153+ fill_in_and_submit_respiratory_conditions (page , ["Pneumonia" , "Emphysema" ])
154+
155+ fill_in_and_submit_asbestos_exposure (page , "No" )
156+ page .click ("text=Continue" ) # cancer diagnosis
157+ page .click ("text=Continue" ) # family history
158+
159+ # Verify both conditions appear on the responses page
160+ expect (page ).to_have_url (f"{ self .live_server_url } /responses" )
161+ responses = page .locator (".responses" )
162+ expect (responses ).to_contain_text ("Have you ever been diagnosed with any of the following respiratory conditions? Pneumonia, Emphysema" )
0 commit comments