Index: shared/scripts/configuration/config.py =================================================================== diff -u -r885196701f9d66ae75b91e4b4d0cd907cbfd3e31 -r1ab622d62c3b93ea8e817a586f8aff1dd578a5aa --- shared/scripts/configuration/config.py (.../config.py) (revision 885196701f9d66ae75b91e4b4d0cd907cbfd3e31) +++ shared/scripts/configuration/config.py (.../config.py) (revision 1ab622d62c3b93ea8e817a586f8aff1dd578a5aa) @@ -320,6 +320,20 @@ UF_MAXIMUM_SLIDER_WIDTH = 638.00 UF_VALID_RANGE = 700 TRAINING_INDICATOR_SCREEN = 4 +ULTRAFILTRATION_VOLUME_COMBINATION_FROM_ULTRAFILTRATION_SETUP_SCREEN = { + "OPTION_1" : {"uf_maximum" : 800, "uf_minimum" : 0}, + "OPTION_2" : {"uf_maximum" : 500, "uf_minimum" : 0}, + "OPTION_3" : {"uf_maximum" : 550, "uf_minimum" : 0}, + "OPTION_4" : {"uf_maximum" : 300, "uf_minimum" : 0}, + "OPTION_5" : {"uf_maximum" : 280, "uf_minimum" : 0}, + "OPTION_6" : {"uf_maximum" : 765, "uf_minimum" : 0}, + "OPTION_7" : {"uf_maximum" : 680, "uf_minimum" : 0}, + "OPTION_8" : {"uf_maximum" : 1500, "uf_minimum" : 0}, + "OPTION_9" : {"uf_maximum" : 390, "uf_minimum" : 0}, + "OPTION_10" : {"uf_maximum" : 800, "uf_minimum" : 0}, + "OPTION_11" : {"uf_maximum" : 1000, "uf_minimum" : 0}, + "OPTION_12" : {"uf_maximum" : 1250, "uf_minimum" : 0}, + } #tst_pretreatment_screens color palettes CURRENT_COLOR = '#000000' Index: tst_pre_treatment_patient_connection/test.py =================================================================== diff -u -re5d08a5c268ba1698bc10697fad797aabc33e4cb -r1ab622d62c3b93ea8e817a586f8aff1dd578a5aa --- tst_pre_treatment_patient_connection/test.py (.../test.py) (revision e5d08a5c268ba1698bc10697fad797aabc33e4cb) +++ tst_pre_treatment_patient_connection/test.py (.../test.py) (revision 1ab622d62c3b93ea8e817a586f8aff1dd578a5aa) @@ -31,12 +31,11 @@ def verify_instruction_screen_indicator(current_indicator, training_items_object): """ - Method to verify the pre treatment tutorial indicators on top of the screen which indicates the steps passed, current, remained] - @param current_indicator :(int) Current pre-treatment tutorial indicator - @param training_items_object :(dictionary) pre_treatment bullet object - @return N/A + Method to verify the pre treatment tutorial indicators on top of the screen which indicates the steps passed, current, remained] + @param current_indicator :(int) Current pre-treatment tutorial indicator + @param training_items_object :(dictionary) pre_treatment bullet object """ - test.startSection("Method to verify the Page Step indicators from training screen") + test.startSection("Verify the Page Step indicators from training screen") for page in range(config.TRAINING_INDICATOR_SCREEN): occurrence_index = 10 + page #1-9 occurrence of object belongs to page indicators, 10 - 13 occurrence of object belongs to training indicators training_items_object["occurrence"] = occurrence_index @@ -65,47 +64,44 @@ test.endSection() -def test_rejection_message_patient_connection(accept_status): +def verify_rejection_message_patient_connection(accept_status): """ - verification of rejection messages during patient connection. - @param accept_status: (int) boolean accept/reject response - @return: none + Method to verify rejection messages during patient connection. + @param accept_status: (int) boolean accept/reject response """ - test.startSection("verification of rejection messages on patient connection") + test.startSection("verifying of rejection messages on patient connection") for rejection in range(1, config.NUM_OF_REQUEST_REJECT_REASONS): - hd_simulator.cmd_send_uf_treatment_response(accepted = accept_status, reason = rejection, volume = config.UF_VALID_RANGE) + hd_simulator.cmd_send_uf_treatment_response(accepted=accept_status, reason=rejection, volume=config.UF_VALID_RANGE) rejection_message = waitForObject(names.o_PreTreatmentUltrafiltration_NotificationBar_NotificationBar) test.compare(rejection_message.text, config.REJECTION_REASON[rejection], "expected rejection {msg} displayed".format(msg=config.REJECTION_REASON[rejection])) test.endSection() - def verify_entered_valid_vital_entries_in_main_treatment_screen(sys_val, dia_val, heart_rate): """ - method to enter systolic, diastolic and heart rate value and save or unsave it and verify - same is updated in pre-treatment screen. - @param sys_val - (int) user expected systolic pressure - @param dia_val - (int) user expected diastolic pressure - @param heart_rate - (int) user expected heart rate - @param save - (bool) True/False + Method to enter systolic, diastolic and heart rate value and save or unsave it and verify + same is updated in pre-treatment screen. + @param sys_val - (int) user expected systolic pressure + @param dia_val - (int) user expected diastolic pressure + @param heart_rate - (int) user expected heart rate + @param save - (bool) True/False """ test.startSection("Verify the entered systolic, diastolic and heart rate value updated in main-treatement screen") mouseClick(waitForObject(names.o_PreTreatmentBase_bloodPressureSystolic_TextEntry)) utility.erase_entered_value(names.o_PreTreatmentBase_input_TextInput_2) utility.enter_keypad_value(sys_val) test.verify(waitForObjectExists(names.o_PreTreatmentBase_bloodPressureSystolic_TextEntry).enabled, "systolic combo box should be enabled.") - test.compare(waitForObjectExists(names.o_PreTreatmentBase_bloodPressureSystolic_TextEntry).text, str(sys_val), "systolic value should be : "+str(sys_val)) - utility.verify_color_of_entry(entry = sys_val, vital_parameter = config.SYSTOLIC_TEXT, input_field = waitForObject(names.o_PreTreatmentBase_input_TextInput_2)) + test.compare(waitForObjectExists(names.o_PreTreatmentBase_bloodPressureSystolic_TextEntry).text, str(sys_val), "systolic value should be : " + str(sys_val)) + utility.verify_color_of_entry(entry=sys_val, vital_parameter=config.SYSTOLIC_TEXT, input_field=waitForObject(names.o_PreTreatmentBase_input_TextInput_2)) - mouseClick(waitForObject(names.o_PreTreatmentBase_input_TextInput_3)) utility.erase_entered_value(names.o_PreTreatmentBase_input_TextInput_3) utility.enter_keypad_value(dia_val) test.verify(waitForObjectExists(names.o_PreTreatmentBase_bloodPressureDiastolic_TextEntry).enabled, "diastolic value should be enabled.") - test.compare(waitForObjectExists(names.o_PreTreatmentBase_bloodPressureDiastolic_TextEntry).text, str(dia_val), "diastolic value should be : "+str(dia_val)) - utility.verify_color_of_entry(entry = dia_val, vital_parameter = config.DIASTOLIC_TEXT, input_field = waitForObject(names.o_PreTreatmentBase_input_TextInput_3)) + test.compare(waitForObjectExists(names.o_PreTreatmentBase_bloodPressureDiastolic_TextEntry).text, str(dia_val), "diastolic value should be : " + str(dia_val)) + utility.verify_color_of_entry(entry=dia_val, vital_parameter=config.DIASTOLIC_TEXT, input_field=waitForObject(names.o_PreTreatmentBase_input_TextInput_3)) mouseClick(waitForObject(names.o_PreTreatmentBase_input_TextInput_4)) @@ -114,18 +110,17 @@ test.verify(waitForObjectExists(names.o_PreTreatmentBase_heartRate_TextEntry).enabled, "diastolic value should be enabled.") test.compare(waitForObjectExists(names.o_PreTreatmentBase_heartRate_TextEntry).text, str(heart_rate), "diastolic value should be : "+str(dia_val)) - utility.verify_color_of_entry(entry = heart_rate, vital_parameter = config.HEART_RATE_TITLE, input_field = waitForObject(names.o_PreTreatmentBase_input_TextInput_4)) + utility.verify_color_of_entry(entry=heart_rate, vital_parameter=config.HEART_RATE_TITLE, input_field=waitForObject(names.o_PreTreatmentBase_input_TextInput_4)) test.endSection() -def test_patient_connection_instruction_screen(): +def verify_patient_connection_instruction_screen(): """ - verification of patient connection instruction screen - @param slider_value: (int) value of the slider to set. - @return N/A + Method to verify patient connection instruction screen + @param slider_value: (int) value of the slider to set. """ - test.startSection("verification of instruction screen ") + test.startSection("Verifying of instruction screen ") #Method to get number of instruction screens for patient connection during run time. childObjects = object.children(waitForObject(names.o_PreTreatmentBase_gridSteps_Grid)) @@ -164,10 +159,10 @@ test.endSection() -def drag_and_drop_ultrafiltration_slider(slider_value = 0, maximum_ultrafiltration = 0): +def drag_and_drop_ultrafiltration_slider(slider_value=0, maximum_ultrafiltration=0): """ - Tests to verify ultrafiltration slider range - @param slider_value: (int) value of the slider to set. + Method to verify ultrafiltration slider range + @param slider_value: (int) value of the slider to set. """ slider_buffer = (config.UF_MAXIMUM_SLIDER_WIDTH/(maximum_ultrafiltration/100)) * slider_value slider_width = slider_buffer + config.UF_MINIMUM_SLIDER_WIDTH @@ -179,8 +174,8 @@ def navigate_patient_connection(pre_treatment_sub_mode): """ - Method to navigate to sub mode under pre-treatment screen - @param mode - (int) pre treatment state + Method to navigate to sub mode under pre-treatment screen + @param mode - (int) pre treatment state """ hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=pre_treatment_sub_mode, water_sample_state=0, consumables_self_test_state=0,no_cartridge_self_test_state=0, @@ -191,11 +186,10 @@ def start_test_treatment_ultrafiltration(ultrafiltration_range): """ - Test slider movement of ultrafiltration volume. - @param ultrafiltration_range: (dictionary) uf minimum and uf maximum volume. - @return: N/A + Verify slider movement of ultrafiltration volume. + @param ultrafiltration_range: (dictionary) uf minimum and uf maximum volume. """ - test.startSection("verification of ultrafiltration slider hacing" +str(ultrafiltration_range)+ " adjustment") + test.startSection("Verifiying of ultrafiltration slider hacing" + str(ultrafiltration_range) + " adjustment") min_uf = ultrafiltration_range["uf_minimum"] max_uf = ultrafiltration_range["uf_maximum"] hd_simulator.cmd_set_treatment_parameter_ranges(0, 100, 0, max_uf, 0, 0) @@ -209,13 +203,11 @@ test.endSection() -def test_vital_entries_on_patient_connection(): +def verify_vital_entries_on_patient_connection(): """ - Method to verify BP/HR section from patient connection. - @param : N/A - @return: N/A + Method to verify BP/HR section from patient connection. """ - test.startSection("verification of BP/HR section from patient connection") + test.startSection("Verifying BP/HR section from patient connection") test.compare(waitForObjectExists(names.o_PreTreatmentBase_BP_HR_Text).text, config.BP_HR_TEXT, "BP/HR title text should be :" + str(config.BP_HR_TEXT)) test.compare(waitForObjectExists(names.o_PreTreatmentbase_skip_text).text, config.SKIP_TEXT, "BP/HR button text should be " + str(config.SKIP_TEXT)) test.verify(waitForObjectExists(names.o_PreTreatmentbase_skip_text).enabled, "BP/HR button should enabled.") @@ -265,7 +257,7 @@ utils.waitForGUI(1) #navigate to pre treatment - hd_simulator.cmd_set_hd_operation_mode_data(HDOpModes.MODE_PRET.value,0) + hd_simulator.cmd_set_hd_operation_mode_data(HDOpModes.MODE_PRET.value, 0) #navigate to patient connection sub mode navigate_patient_connection(PRE_TREATMENT_PATIENT_CONNECTION_MODE) @@ -274,29 +266,29 @@ utility.verify_page_step_indicator(names.o_PreTreatmentStack_pretreatmentConnectionStack_PreTreatmentConnectionStack, UF_PRE_TREATMENT_STEPS, config.PRE_TREATMENT_SCREENS) #verification of uf slider based on edge condition. - for ranges in config.TREATMENT_ULTRAFILTERATION_TESTING_OPTION: - start_test_treatment_ultrafiltration(config.TREATMENT_ULTRAFILTERATION_TESTING_OPTION[ranges]) + for ranges in config.ULTRAFILTRATION_VOLUME_COMBINATION_FROM_ULTRAFILTRATION_SETUP_SCREEN: + start_test_treatment_ultrafiltration(config.ULTRAFILTRATION_VOLUME_COMBINATION_FROM_ULTRAFILTRATION_SETUP_SCREEN[ranges]) #verification of rejection message - test_rejection_message_patient_connection(accept_status = False) + verify_rejection_message_patient_connection(accept_status=False) mouseClick(waitForObjectExists(names.o_pretreatment_ultrafilteration_confirm_btn)) hd_simulator.cmd_send_pre_treatment_continue_to_treament_response(accepted=True, reason=0) hd_simulator.cmd_send_pre_treatment_patient_connection_confirm_response(accepted=True, reason=0) #cmd to navigate to BP/HR section - hd_simulator.cmd_send_uf_treatment_response(accepted = True, reason = 0, volume = config.UF_VALID_RANGE) + hd_simulator.cmd_send_uf_treatment_response(accepted=True, reason=0, volume=config.UF_VALID_RANGE) #verification of indicators from BP/HR section utility.verify_page_step_indicator(names.o_PreTreatmentStack_pretreatmentConnectionStack_PreTreatmentConnectionStack, BP_HR_PRE_TREATMENT_STEPS, config.PRE_TREATMENT_SCREENS) #verification of BP/HR entries based on edge condition - test_vital_entries_on_patient_connection() + verify_vital_entries_on_patient_connection() #verification of indicators from Connection section utility.verify_page_step_indicator(names.o_PreTreatmentStack_pretreatmentConnectionStack_PreTreatmentConnectionStack, CONNECTION_PRE_TREATMENT_STEPS, config.PRE_TREATMENT_SCREENS) #verification of tutorial section - test_patient_connection_instruction_screen() + verify_patient_connection_instruction_screen() utils.tstDone()