Index: tst_main_treatment_vitals/test.py =================================================================== diff -u -r941ef3c2c59d7977c23dd37a7af68a3aa84a60a9 -rfd5e032af3d072cc448e360eda6de890025fd0d6 --- tst_main_treatment_vitals/test.py (.../test.py) (revision 941ef3c2c59d7977c23dd37a7af68a3aa84a60a9) +++ tst_main_treatment_vitals/test.py (.../test.py) (revision fd5e032af3d072cc448e360eda6de890025fd0d6) @@ -417,13 +417,13 @@ method to verify the last read of blood pressure and heart rate @param saved_time: (str) time of saving blood pressure and heart rate """ - test.startSection("Verify the last read of blood pressure and heart rate") expected_last_read = "Interval: off , Last Read: {}".format(saved_time) last_read = waitForObject(vitals_reading_obj(expected_last_read)) last_read = str(last_read.text) test.compare(last_read, expected_last_read, "Last read time should be {}".format(last_read)) test.endSection() + def drag_and_drop_ultrafiltration_slider(slider_value = 0, maximum_ultrafiltration = 0): """ @@ -528,7 +528,6 @@ @param vital - (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 user entered {} value {} in main-treatment screen".format(vital, value)) if save: input_field = waitForObject(vitals_reading_obj(value)) @@ -557,7 +556,6 @@ test.compare(entered_value, value, "Actual {} value: {} should be equal to Expected {} value: {}".format(vital, entered_value, vital, value)) test.endSection() - def verify_ranges_of_vital(vital_parameter): """ @@ -600,8 +598,7 @@ input_field=hr) erase_entered_value(hr) test.endSection() - - + def verify_the_color_of_out_of_range(vital_parameter): """ Method to verify the color of out of range values @@ -642,7 +639,6 @@ erase_entered_value(hr) 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 @@ -680,45 +676,45 @@ 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(date_format='%Y/%b/%d - %H:%M') 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 main(): utils.tstStart(__file__) startApplication(AUT_NAME) - + hd_simulator.cmd_send_power_on_self_test_version_request() hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state=0, heparin_state= 0, - rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, - treatment_end_state=0, treatment_stop_state= 0, dialysis_state=0) - + rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, + treatment_end_state=0, treatment_stop_state= 0, dialysis_state=0) + utils.waitForGUI(1) open_vitals_pop_up() 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) - + utils.waitForGUI(1) - + open_vitals_pop_up() verify_entered_value_in_pop_up(value=SYSTOLIC_PRESSSURE_120, input_field=names.o_pop_up_systolic_input_field, @@ -734,7 +730,6 @@ heart_rate=HEART_RATE_VAL_85, save=False) utils.waitForGUI(1) - open_vitals_pop_up() verify_entered_value_in_pop_up(value=SYSTOLIC_PRESSSURE_175, input_field=names.o_pop_up_systolic_input_field, @@ -750,7 +745,6 @@ heart_rate=HEART_RATE_VAL_70, save=True) utils.waitForGUI(1) - open_vitals_pop_up() verify_entered_value_in_pop_up(value=SYSTOLIC_PRESSSURE_113, input_field=names.o_pop_up_systolic_input_field, @@ -766,16 +760,14 @@ heart_rate=HEART_RATE_VAL_60, save=False) utils.waitForGUI(1) - open_vitals_pop_up() verify_ranges_of_vital(vital_parameter=SYSTOLIC_TEXT) verify_ranges_of_vital(vital_parameter=DIASTOLIC_TEXT) verify_ranges_of_vital(vital_parameter=HEART_RATE_TITLE) - + verify_the_color_of_out_of_range(vital_parameter=SYSTOLIC_TEXT) verify_the_color_of_out_of_range(vital_parameter=DIASTOLIC_TEXT) verify_the_color_of_out_of_range(vital_parameter=HEART_RATE_TITLE) - verify_interval_for_bpm() utils.tstDone() \ No newline at end of file