Index: shared/scripts/configuration/config.py =================================================================== diff -u -r98f13c9198e630726f86fa3288e452554d3b2cf5 -r7882eef58dfd3755ab3a6f2709a6e81f8662a0a2 --- shared/scripts/configuration/config.py (.../config.py) (revision 98f13c9198e630726f86fa3288e452554d3b2cf5) +++ shared/scripts/configuration/config.py (.../config.py) (revision 7882eef58dfd3755ab3a6f2709a6e81f8662a0a2) @@ -40,20 +40,36 @@ -# tst_pretreatment_screens -PRE_TREATMENT_SCREENS = ["Create" , "Sample" , "Consumables" , "Disposables" , "Prime" , "Ultrafiltration" , "BP/HR" , "Connection" , "Start"] +# tst_pretreatment_patient_connection +PRE_TREATMENT_SCREENS = { + 1 : "Create" , + 2 : "Sample" , + 3 : "Consumables" , + 4 : "Disposables" , + 5 : "Prime" , + 6 : "Ultrafiltration" , + 7 : "BP/HR" , + 8 : "Connection" , + 9 : "Start" +} UF_MINIMUM_SLIDER_WIDTH = -2 UF_MAXIMUM_SLIDER_WIDTH = 638.00 UF_VALID_RANGE = 700 PATIENT_CONNECTION_TEXT = "Patient Connection" +UF_VOLUME_TEXT = "Ultrafiltration Volume (L)" +UF_TITLE_TEXT = "Ultrafiltration Setup" +BP_HR_TEXT = "BP/HR" +SKIP_TEXT = "SKIP" +BP_TEXT = "Blood Pressure" +MMHG_TEXT = "mmHg" +HR_TEXT = "Heart Rate" +BPM_LABEL = "BPM" TUTORIAL_TEXT = { 1 : "Wash your hands and establish vascular access per your clinic's instructions.", 2 : "Pinch arterial clamp and venous clamp on located on the cartridge patient lines.", 3 : "Remove arterial and venous shunt.", 4 : "Connect arterial and venous cartridge lines to your patient access lines." } -UF_VOLUME_TEXT = "Ultrafiltration Volume (L)" -UF_TITLE_TEXT = "Ultrafiltration Setup" Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r98f13c9198e630726f86fa3288e452554d3b2cf5 -r7882eef58dfd3755ab3a6f2709a6e81f8662a0a2 --- shared/scripts/configuration/utility.py (.../utility.py) (revision 98f13c9198e630726f86fa3288e452554d3b2cf5) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 7882eef58dfd3755ab3a6f2709a6e81f8662a0a2) @@ -128,25 +128,25 @@ step_title = bullet_children[2] #To verify the step indicators of the completed pre treatment screens if page < pre_treatment_step: - test.verify(squish.waitForObjectExists(pre_treatment_items_object).complete, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" complete attribute should be True")) - test.verify(not squish.waitForObjectExists(pre_treatment_items_object).current, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" current attribute should be false")) - test.compare(bullet_circle_color, config.COMPLETE_COLOR, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" bullet color hex should be "+str(config.COMPLETE_COLOR))) - test.compare(bullet_border_color, config.COMPLETE_COLOR, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" bullet border color hex should be "+str(config.COMPLETE_COLOR))) - test.compare(step_title.color.name, config.ENABLED_COLOR, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" title color hex should be "+str(config.ENABLED_COLOR))) + test.verify(squish.waitForObjectExists(pre_treatment_items_object).complete, str(config.PRE_TREATMENT_SCREENS[page]+" complete attribute should be True")) + test.verify(not squish.waitForObjectExists(pre_treatment_items_object).current, str(config.PRE_TREATMENT_SCREENS[page]+" current attribute should be false")) + test.compare(bullet_circle_color, config.COMPLETE_COLOR, str(config.PRE_TREATMENT_SCREENS[page]+" bullet color hex should be "+str(config.COMPLETE_COLOR))) + test.compare(bullet_border_color, config.COMPLETE_COLOR, str(config.PRE_TREATMENT_SCREENS[page]+" bullet border color hex should be "+str(config.COMPLETE_COLOR))) + test.compare(step_title.color.name, config.ENABLED_COLOR, str(config.PRE_TREATMENT_SCREENS[page]+" title color hex should be "+str(config.ENABLED_COLOR))) #To verify the step indicators of the current pre treatment screen elif page == pre_treatment_step: - test.verify(squish.waitForObjectExists(pre_treatment_items_object).current, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" complete attribute should be True")) - test.verify(not squish.waitForObjectExists(pre_treatment_items_object).complete, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" current attribute should be false")) - test.compare(bullet_circle_color,config.CURRENT_COLOR, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" bullet color hex should be "+str(config.CURRENT_COLOR))) - test.compare(bullet_border_color,config.COMPLETE_COLOR, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" bullet border color hex should be "+str(config.COMPLETE_COLOR))) - test.compare(step_title.color.name,config.ENABLED_COLOR, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" title color hex should be "+str(config.ENABLED_COLOR))) - test.verify(step_title.font.bold, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" title font bold should be "+str(config.ENABLED_COLOR))) + test.verify(squish.waitForObjectExists(pre_treatment_items_object).current, str(config.PRE_TREATMENT_SCREENS[page]+" complete attribute should be True")) + test.verify(not squish.waitForObjectExists(pre_treatment_items_object).complete, str(config.PRE_TREATMENT_SCREENS[page]+" current attribute should be false")) + test.compare(bullet_circle_color,config.CURRENT_COLOR, str(config.PRE_TREATMENT_SCREENS[page]+" bullet color hex should be "+str(config.CURRENT_COLOR))) + test.compare(bullet_border_color,config.COMPLETE_COLOR, str(config.PRE_TREATMENT_SCREENS[page]+" bullet border color hex should be "+str(config.COMPLETE_COLOR))) + test.compare(step_title.color.name,config.ENABLED_COLOR, str(config.PRE_TREATMENT_SCREENS[page]+" title color hex should be "+str(config.ENABLED_COLOR))) + test.verify(step_title.font.bold, str(config.PRE_TREATMENT_SCREENS[page]+" title font bold should be "+str(config.ENABLED_COLOR))) #To verify the step indicators of the remaining pre-treatment screens else: - test.verify(not squish.waitForObjectExists(pre_treatment_items_object).current, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" complete attribute should be false")) - test.verify(not squish.waitForObjectExists(pre_treatment_items_object).complete, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" current attribute should be false")) - test.compare(step_title.color.name,config.INCOMPLETE_COLOR, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" title color hex should be "+str(config.INCOMPLETE_COLOR))) - test.compare(bullet_circle_color,config.CURRENT_COLOR, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" bullet circle color hex should be "+str(config.CURRENT_COLOR))) - test.compare(bullet_border_color,config.INCOMPLETE_COLOR, str(config.PRE_TREATMENT_SCREENS[pre_treatment_step]+" bullet border color hex should be "+str(config.INCOMPLETE_COLOR))) + test.verify(not squish.waitForObjectExists(pre_treatment_items_object).current, str(config.PRE_TREATMENT_SCREENS[page]+" complete attribute should be false")) + test.verify(not squish.waitForObjectExists(pre_treatment_items_object).complete, str(config.PRE_TREATMENT_SCREENS[page]+" current attribute should be false")) + test.compare(step_title.color.name,config.INCOMPLETE_COLOR, str(config.PRE_TREATMENT_SCREENS[page]+" title color hex should be "+str(config.INCOMPLETE_COLOR))) + test.compare(bullet_circle_color,config.CURRENT_COLOR, str(config.PRE_TREATMENT_SCREENS[page]+" bullet circle color hex should be "+str(config.CURRENT_COLOR))) + test.compare(bullet_border_color,config.INCOMPLETE_COLOR, str(config.PRE_TREATMENT_SCREENS[page]+" bullet border color hex should be "+str(config.INCOMPLETE_COLOR))) test.endSection() Index: shared/scripts/names.py =================================================================== diff -u -r98f13c9198e630726f86fa3288e452554d3b2cf5 -r7882eef58dfd3755ab3a6f2709a6e81f8662a0a2 --- shared/scripts/names.py (.../names.py) (revision 98f13c9198e630726f86fa3288e452554d3b2cf5) +++ shared/scripts/names.py (.../names.py) (revision 7882eef58dfd3755ab3a6f2709a6e81f8662a0a2) @@ -90,9 +90,18 @@ o_PreTreatmentBase_rightImage_Image = {"container": o_PreTreatmentConsumblesStack_PreTreatmentBase_TreatmentFlowBase_2, "id": "_rightImage", "source": "qrc:/images/iArrowRight", "type": "Image", "unnamed": 1, "visible": True} o_PreTreatmentBase_leftImage_Image = {"container": o_PreTreatmentConsumblesStack_PreTreatmentBase_TreatmentFlowBase_2, "id": "_leftImage", "source": "qrc:/images/iArrowLeft", "type": "Image", "unnamed": 1, "visible": True} o_PreTreatmentUltrafiltration_Indicators = {"container": o_PreTreatmentConsumblesStack_PreTreatmentUltrafiltration_PreTreatmentUltrafiltration, "id": "_nextStepsBullet", "type": "StepBullet", "unnamed": 1, "visible": True} +o_PreTreatmentFlowBase_Indicators = {"container": o_PreTreatmentConsumblesStack_PreTreatmentBase_TreatmentFlowBase_2, "id": "_nextStepsBullet", "type": "StepBullet", "unnamed": 1, "visible": True} +o_PreTreatmentUltrafiltration_NotificationBar_NotificationBar = {"container": o_PreTreatmentConsumblesStack_PreTreatmentUltrafiltration_PreTreatmentUltrafiltration, "objectName": "NotificationBar", "type": "NotificationBar", "visible": True} -#o_swipeview_Item = {"container": o_PreTreatmentBase_swipeview_Swipeo_swipeview_Connect_arterial_and_venous_cartridge_lines_to_your_patient_access_lines_Text = {"container": o_PreTreatmentBase_swipeview_SwipeView, "text": "Connect arterial and venous cartridge lines to your patient access lines.", "type": "Text", "unnamed": 1, "visible": True} +#o_swipeview_Item = {"container": o_PreTreatmentBase_swipeview_Swipeo_swipeview_Connect_arterial_and_venous_cartridge_lines_to_your_patient_access_lio_PreTreatmentBase_BP_HR_Text = {"container": o_PreTreatmentConsumblesStack_PreTreatmentBase_TreatmentFlowBase_2, "occurrence": 2, "text": "BP/HR", "type": "Text", "unnamed": 1, "visible": True} +nes_Text = {"container": o_PreTreatmentBase_swipeview_SwipeView, "text": "Connect arterial and venous cartridge lines to your patient access lines.", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentBase_BP_HR_Text = {"container": o_PreTreatmentConsumblesStack_PreTreatmentBase_TreatmentFlowBase_2, "occurrence": 2, "text": "BP/HR", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentBase_Blood_Pressure_Text = {"container": o_PreTreatmentConsumblesStack_PreTreatmentBase_TreatmentFlowBase_2, "text": "Blood Pressure", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentBase_mmHg_Label = {"container": o_PreTreatmentConsumblesStack_PreTreatmentBase_TreatmentFlowBase_2, "text": "mmHg", "type": "Label", "unnamed": 1, "visible": True} +o_PreTreatmentBase_Heart_Rate_Text = {"container": o_PreTreatmentConsumblesStack_PreTreatmentBase_TreatmentFlowBase_2, "text": "Heart Rate", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentBase_BPM_Label = {"container": o_PreTreatmentConsumblesStack_PreTreatmentBase_TreatmentFlowBase_2, "text": "BPM", "type": "Label", "unnamed": 1, "visible": True} +o_PreTreatmentBase_bloodPressureSystolic_TextEntry = {"container": o_PreTreatmentConsumblesStack_PreTreatmentBase_TreatmentFlowBase_2, "id": "_bloodPressureSystolic", "type": "TextEntry", "unnamed": 1, "visible": True} #o_pppppppp = {"container": o_PreTreatmentConsumblesStack_PreTreatmentBase_TreatmentFlowBase, "occurrence": 2, "type": "StepBullet", "unnamed": 1, "visible": True} Index: suite.conf =================================================================== diff -u -r3cdfabd1b4528506c3dc52e1557711fd4b72c999 -r7882eef58dfd3755ab3a6f2709a6e81f8662a0a2 --- suite.conf (.../suite.conf) (revision 3cdfabd1b4528506c3dc52e1557711fd4b72c999) +++ suite.conf (.../suite.conf) (revision 7882eef58dfd3755ab3a6f2709a6e81f8662a0a2) @@ -1,6 +1,6 @@ AUT=denaliSquish LANGUAGE=Python OBJECTMAPSTYLE=script -TEST_CASES=tst_environment tst_post tst_standbymode tst_In_treatment tst_case1 +TEST_CASES=tst_environment tst_post tst_standbymode tst_In_treatment VERSION=3 WRAPPERS=Qt Index: tst_pre_treatment_patient_connection/test.py =================================================================== diff -u -r98f13c9198e630726f86fa3288e452554d3b2cf5 -r7882eef58dfd3755ab3a6f2709a6e81f8662a0a2 --- tst_pre_treatment_patient_connection/test.py (.../test.py) (revision 98f13c9198e630726f86fa3288e452554d3b2cf5) +++ tst_pre_treatment_patient_connection/test.py (.../test.py) (revision 7882eef58dfd3755ab3a6f2709a6e81f8662a0a2) @@ -46,40 +46,149 @@ "Heart Rate": [181, 200, 39, 20]} PRE_TREATMENT_PATIENT_CONNECTION_MODE = 8 -PRE_TREATMENT_STEPS = 5 +UF_PRE_TREATMENT_STEPS = 5 +BP_HR_PRE_TREATMENT_STEPS = 6 - TREATMENT_ULTRAFILTERATION_TESTING_OPTION = { "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" : 500}, - "OPTION_7" : {"uf_maximum" : 680, "uf_minimum" : 450}, - "OPTION_8" : {"uf_maximum" : 480, "uf_minimum" : 380}, - "OPTION_9" : {"uf_maximum" : 390, "uf_minimum" : 100}, - "OPTION_10" : {"uf_maximum" : 800, "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} } + + + def test_rejection_message_patient_connection(accept_status): """ verification of rejection messages during patient connection. @param accept_status: (int) boolean accept/reject response - @param target: (int) saline bolus Target volume - @param saline_states: (int) saline bolus transition State @return: none """ test.startSection("verification of rejection messages on saline bolus") 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) - rejection_message = findObject(names.o_treatment_notification_bar) + 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, save): + """ + 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)) + erase_entered_value(waitForObject(names.o_PreTreatmentBase_bloodPressureSystolic_TextEntry)) + type(waitForObject(names.o_PreTreatmentBase_bloodPressureSystolic_TextEntry), sys_val) + test.compare(str(waitForObjectExists(names.o_PreTreatmentBase_bloodPressureSystolic_TextEntry).enabled, True, "Tutorial text should be enabled.")) + test.compare(str(waitForObjectExists(names.o_swipeview_tutorial_text).text, config.TUTORIAL_TEXT[screen_indicator], "Tutorial text should be {msg}".format(msg=config.TUTORIAL_TEXT[screen_indicator]))) + + + + verify_entered_value_in_pop_up(value=str(sys_val), input_field=systolic, + vital=SYSTOLIC_TEXT) + verify_color_of_entry(entry=sys_val, vital_parameter=SYSTOLIC_TEXT, + input_field=systolic) + diastolic = waitForObject(names.o_pop_up_diastolic_input_field) + mouseClick(diastolic) + erase_entered_value(diastolic) + enter_keypad_value(str(dia_val)) + verify_entered_value_in_pop_up(value=str(dia_val), input_field=diastolic, + vital=DIASTOLIC_TEXT) + verify_color_of_entry(entry=dia_val, vital_parameter=DIASTOLIC_TEXT, + input_field=diastolic) + hr = waitForObject(names.o_pop_up_heart_rate_input_field) + mouseClick(hr) + erase_entered_value(hr) + enter_keypad_value(str(heart_rate)) + verify_entered_value_in_pop_up(value=str(heart_rate), input_field=hr, + vital=HEART_RATE_TITLE) + verify_color_of_entry(entry=heart_rate, vital_parameter=HEART_RATE_TITLE, + input_field=hr) + + if save: + test.log("Clicking confirm button") + confirm_button = waitForObjectExists(names.o_vitals_confrim_btn) + test.compare(confirm_button.enabled, True, "Valid Blood Pressure and Heart is entered therefore confirm button is enabled") + saved_time = get_current_date_and_time() + mouseClick(confirm_button) + verify_last_read_time(saved_time) + elif save is False: + mouseClick(waitForObject(names.o_vitals_close_btn)) + test.log("'Vitals pop is closed") + + expected_blood_pressure = "{sys} / {dia}".format(sys=sys_val, dia=dia_val) + verify_entered_value_in_main_treatment_screen(value=expected_blood_pressure, + vital=BLOOD_PRESSURE_TITLE, save=save) + verify_entered_value_in_main_treatment_screen(value=heart_rate, vital=HEART_RATE_TITLE, save=save) + test.endSection() + + +def verify_color_of_entry(entry, vital_parameter, input_field): + """ + Method to verify the color of entry + of systolic, diastolic and heart rate + @param entry: (int) user user entered value + @param vital_parameter - (str) parameter name under which user is entering value (sys/dia/heart rate) + @param input_field - (obj) object of input field + """ + test.startSection("Verify the color of {} value {}".format(vital_parameter, entry)) + input_field_color = input_field.color.name + entry = builtins.int(entry) + if vital_parameter is SYSTOLIC_TEXT: + if (entry < SYSTOLIC_LOWER_LIMIT) or (entry > SYSTOLIC_UPPER_LIMIT): + test.compare(input_field_color, OUT_OF_RANGE_COLOR, "systolic value {} is out of range, systolic value should be in range of {} and {}".format(entry, SYSTOLIC_LOWER_LIMIT, SYSTOLIC_UPPER_LIMIT)) + elif (entry >= SYSTOLIC_LOWER_LIMIT) and (entry <= SYSTOLIC_UPPER_LIMIT): + test.compare(input_field_color, IN_RANGE_COLOR, "systolic value {} is in range of {} and {}".format(entry, SYSTOLIC_LOWER_LIMIT, SYSTOLIC_UPPER_LIMIT)) + elif vital_parameter is DIASTOLIC_TEXT: + if (entry < DIASTOLIC_LOWER_LIMIT) or (entry > DIASTOLIC_UPPER_LIMIT): + test.compare(input_field_color, OUT_OF_RANGE_COLOR, "diastolic value {} is out of range, diastolic value should be in range of {} and {}".format(entry, DIASTOLIC_LOWER_LIMIT, DIASTOLIC_UPPER_LIMIT)) + elif (entry >= DIASTOLIC_LOWER_LIMIT) and (entry <= DIASTOLIC_UPPER_LIMIT): + test.compare(input_field_color, IN_RANGE_COLOR, "diastolic value {} is in range of {} and {}".format(entry, DIASTOLIC_LOWER_LIMIT, DIASTOLIC_UPPER_LIMIT)) + elif vital_parameter is HEART_RATE_TITLE: + if (entry < HEART_RATE_LOWER_LIMIT) or (entry > HEART_RATE_UPPER_LIMIT): + test.compare(input_field_color, OUT_OF_RANGE_COLOR, "Heart Rate value {} is out of range, Heart Rate value should be in range of {} and {}".format(entry, HEART_RATE_LOWER_LIMIT, HEART_RATE_UPPER_LIMIT)) + elif (entry >= HEART_RATE_LOWER_LIMIT) and (entry <= HEART_RATE_UPPER_LIMIT): + test.compare(input_field_color,IN_RANGE_COLOR, "Heart Rate value {} is in range of {} and {}".format(entry, HEART_RATE_LOWER_LIMIT, HEART_RATE_UPPER_LIMIT)) + test.endSection() + + +def verify_entered_value_in_main_treatment_screen(value, vital, save): + """ + method to verify the user entered value in main-treatment screen + @param value: (int) user user entered value + @param vital - (str) parameter name under which user is entering value (sys/dia/heart rate) + @param input_field - (obj) object of input field + @return N/A + """ + test.startSection("Verify the user entered {} value {} in main-treatment screen".format(vital, value)) + if save: + input_field = waitForObject(vitals_reading_obj(value)) + entered_value = input_field.text + value = str(value) + test.compare(str(entered_value), value, + "Expected {} value: {} should be equal to Actual {} value: {}".format(vital, value, vital, entered_value)) + elif (save is False): + if object.exists(vitals_reading_obj(value)) is False: + test.log("Entered is not saved and is not updated in main-treatment screen") + + test.endSection() + + def test_patient_connection_instruction_screen(screen_indicator): for instruction_screen in (screen_indicator): @@ -158,9 +267,11 @@ drag_and_drop_ultrafilteration_slider(uf_value, max_uf) test.compare(utils.l2ml(waitForObjectExists(names.o_PreTreatmentUltrafiltration_volumeSlider_Slider).maximum), max_uf, "maximum uf value should be :" + str(max_uf)) + #FIXME: minimum value of the slider is unchanged based on simulator input test.compare(utils.l2ml(waitForObjectExists(names.o_PreTreatmentUltrafiltration_volumeSlider_Slider).minimum), min_uf, "minimum uf value should be :" + str(min_uf)) - test.verify((names.o_PreTreatmentUltrafiltration_Ultrafiltration_Volume_Text).text, config.UF_VOLUME_TEXT, "uf volume text should be " + config.UF_VOLUME_TEXT) - test.verify((names.o_PreTreatmentBase_indicator_StepIndicator).text, config.UF_TITLE_TEXT, "uf title text should be "+config.UF_TITLE_TEXT) + test.compare(waitForObjectExists(names.o_PreTreatmentUltrafiltration_Ultrafiltration_Volume_Text).text, config.UF_VOLUME_TEXT, "uf volume text should be " + config.UF_VOLUME_TEXT) + test.compare(waitForObjectExists(names.o_PreTreatmentUltrafiltration_Ultrafiltration_Setup_Text).text, config.UF_TITLE_TEXT, "uf title text should be "+config.UF_TITLE_TEXT) + test.endSection() def verify_bullet_indicators(indicator): @@ -177,6 +288,29 @@ """ mouseClick(waitForObject(names.o_PreTreatmentbase_skip_text)) +def test_vital_entries_on_patient_connection(): + """ + Method to verify BP/HR section from patient connection. + @param : N/A + @return: N/A + """ + test.startSection("verification of 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.") + test.compare(waitForObjectExists(names.o_PreTreatmentBase_Blood_Pressure_Text).text, config.BP_TEXT, "BP title text should be :" + str(config.BP_TEXT)) + test.compare(waitForObjectExists(names.o_PreTreatmentBase_mmHg_Label).text, config.MMHG_TEXT, "BP unit should be " + str(config.MMHG_TEXT)) + test.compare(waitForObjectExists(names.o_PreTreatmentBase_Heart_Rate_Text).text, config.HR_TEXT, "HR text should be :" + str(config.HR_TEXT)) + test.compare(waitForObjectExists(names.o_PreTreatmentBase_BPM_Label).text, config.BPM_LABEL, "BP unit should be " + str(config.BPM_LABEL)) + + verify_entered_valid_vital_entries_in_main_treatment_screen(sys_val=SYSTOLIC_PRESSSURE_120, + dia_val=DIASTOLIC_PRESSSURE_80, + heart_rate=HEART_RATE_VAL_101, + save=True) + + + test.endSection() + def main(): utils.tstStart(__file__) @@ -191,7 +325,7 @@ navigate_patient_connection(PRE_TREATMENT_PATIENT_CONNECTION_MODE) #verification of indicators from patient connection section - utility.page_step_indicator_verification(PRE_TREATMENT_STEPS, names.o_PreTreatmentUltrafiltration_Indicators) + utility.page_step_indicator_verification(UF_PRE_TREATMENT_STEPS, names.o_PreTreatmentUltrafiltration_Indicators) #verification of uf slider based on edge condition. start_test_treatment_ultrafilteration(TREATMENT_ULTRAFILTERATION_TESTING_OPTION["OPTION_1"]) @@ -205,13 +339,18 @@ start_test_treatment_ultrafilteration(TREATMENT_ULTRAFILTERATION_TESTING_OPTION["OPTION_9"]) start_test_treatment_ultrafilteration(TREATMENT_ULTRAFILTERATION_TESTING_OPTION["OPTION_10"]) - + #verification of rejection message test_rejection_message_patient_connection(accept_status = False) - + + #cmd to navigate to BP/HR section hd_simulator.cmd_send_uf_treatment_response(accepted = True, reason = 0, volume = config.UF_VALID_RANGE) - #test_vital_entries_on_patient_connection() + #verification of indicators from BP/HR section + utility.page_step_indicator_verification(BP_HR_PRE_TREATMENT_STEPS, names.o_PreTreatmentFlowBase_Indicators) + #verification of BP/HR entries based on edge condition + test_vital_entries_on_patient_connection() + test_patient_connection_instruction_screen(screen_indicator = 1) test_patient_connection_instruction_screen(screen_indicator = 2) test_patient_connection_instruction_screen(screen_indicator = 3)