Index: tst_main_treatment_pressure/test.py =================================================================== diff -u -rdc83f8cff9f4014fedd92c23d153761fd214a5f4 -r590cb19e71b46403f5d6f7e45c6b0d09c9bb5e9e --- tst_main_treatment_pressure/test.py (.../test.py) (revision dc83f8cff9f4014fedd92c23d153761fd214a5f4) +++ tst_main_treatment_pressure/test.py (.../test.py) (revision 590cb19e71b46403f5d6f7e45c6b0d09c9bb5e9e) @@ -212,8 +212,35 @@ "{reason} should display on ".format(reason=REJECTION_REASON[reason_id]) + "on pop up when values are rejected") test.endSection() + + +def verify_pressures_on_treatment_and_pop_up_screen(accepted=None, reason=None, + art_low=None, art_high=None, ven_low=None, ven_high=None): + """ + Method to set the arterial low and high pressure + and venous low and high pressure and verify the + same on main-treatment screen and pressures + pop up screen + """ + test.startSection("Set the arterial low and high pressure " + + "and venous low and high pressure and verify the " + + "same on main-treatment screen and pressures " + + "pop up screen") + set_arterial_and_venous_pressure(accepted=accepted, reason=reason, + art_low=art_low, art_high= art_high, + ven_low=ven_low, ven_high=ven_high) + verify_arterial_and_venous_value_in_main_treatment_screen(accepted=accepted, + reason=reason,art_low=art_low, art_high= art_high, + ven_low=ven_low, ven_high=ven_high) + + utils.waitForGUI(delay_s=3) + open_pressure_pop_up() + verify_arterial_and_venous_value_on_pressure_pop_up(accepted=accepted, + reason=reason,art_low=art_low, art_high= art_high, + ven_low=ven_low, ven_high=ven_high) + test.endSection() + - def main(): utils.tstStart(__file__) @@ -225,18 +252,8 @@ treatment_end_state=0, treatment_stop_state=0) - set_arterial_and_venous_pressure(accepted=ACCEPTED, reason=2, - art_low=-150, art_high=150, ven_low=-200, - ven_high=100) - verify_arterial_and_venous_value_in_main_treatment_screen(accepted=ACCEPTED, - art_low=-150, art_high=150, ven_low=-200, ven_high=100) - snooze(5) - open_pressure_pop_up() - verify_arterial_and_venous_value_on_pressure_pop_up(accepted=ACCEPTED, reason_id=0, - art_low=-150, art_high=150, ven_low=-200, ven_high=100) - set_arterial_and_venous_pressure(accepted=REJECTED, reason=2, art_low=-120, art_high=120, ven_low=-100, ven_high=200) @@ -246,7 +263,7 @@ snooze(5) open_pressure_pop_up() - verify_arterial_and_venous_value_on_pressure_pop_up(accepted=REJECTED,reason_id=2, + verify_arterial_and_venous_value_on_pressure_pop_up(accepted=REJECTED,reason_id=22, art_low=-120, art_high=120, ven_low=-100, ven_high=200)