Index: tst_main_treatment_pressure/test.py =================================================================== diff -u -r2df494b6be7fb27cc10bdb5cc0d4325b0d433daf -r8a2f99cdf750415302f56df3a674b68bdacc96fe --- tst_main_treatment_pressure/test.py (.../test.py) (revision 2df494b6be7fb27cc10bdb5cc0d4325b0d433daf) +++ tst_main_treatment_pressure/test.py (.../test.py) (revision 8a2f99cdf750415302f56df3a674b68bdacc96fe) @@ -90,7 +90,43 @@ test.fail("{ven_high} should not exists".format(ven_high=ven_high)) test.endSection() + +def verify_the_constants(): + """ + Method to open the pressure pop up + and verify the arterial and venous + scale minimum and maximum range value + """ + test.startSection("Open the pressure pop up and verify " + + "the arterial and venous scale minimum and maximum range value") + open_pressure_pop_up() + arterial_scale = waitForObject(names.o_arterial_range_slider) + arterial_scale_min = arterial_scale.minimum + arterial_scale_max = arterial_scale.maximum + test.log("Verifying Arterial scale range minimum value") + test.compare(arterial_scale_min, ARTERIAL_PRESSURE_MINIMUM, + "Arterial scale range minimum value should be " + + "{min}".format(min=ARTERIAL_PRESSURE_MINIMUM)) + test.log("Verifying Arterial scale range maximum value") + test.compare(arterial_scale_max, ARTERIAL_PRESSURE_MAXIMUM, + "Arterial scale range maximum value should be " + + "{max}".format(max=ARTERIAL_PRESSURE_MAXIMUM)) + venous_scale = waitForObject(names.o_venous_range_slider) + venous_scale_min = venous_scale.minimum + venous_scale_max = venous_scale.maximum + test.log("Verifying Venous scale range minimum value") + test.compare(venous_scale_min, VENOUS_PRESSURE_MINIMUM, + "Venous scale range minimum value should be " + + "{min}".format(min=VENOUS_PRESSURE_MINIMUM)) + test.log("Verifying Arterial scale range maximum value") + test.compare(venous_scale_max, VENOUS_PRESSURE_MAXIMUM, + "Venous scale range maximum value should be " + + "{max}".format(max=VENOUS_PRESSURE_MAXIMUM)) + test.log("Closing pressure pop up") + mouseClick(waitForObjectExists(names.o_uf_close_button)) + test.endSection() + def verify_arterial_and_venous_value_on_pressure_pop_up(accepted, reason_id, art_low, art_high, ven_low, ven_high): """ @@ -179,7 +215,7 @@ and verify pop is opened """ test.startSection("Open 'Pressure' pop up") - + utils.waitForGUI(delay_s=2) pressure_touch_area = object.parent(waitForObjectExists(names.o_arterial_title)) mouseClick(pressure_touch_area) @@ -269,6 +305,8 @@ rinseback_state=0, recirculate_state=0, blood_prime_state=0, treatment_end_state=0, treatment_stop_state=0) + verify_the_constants() + verify_pressures_on_treatment_and_pop_up_screen(accepted=ACCEPTED, reason=0, art_low=ART_LOW_VAL_MINUS_120, art_high=ART_HIGH_VAL_160, ven_low=VENOUS_LOW_VAL_MINUS_310, ven_high=VENOUS_HIGH_VAL_170) @@ -286,5 +324,14 @@ ven_low=VENOUS_LOW_VAL_MINUS_390, ven_high=VENOUS_HIGH_VAL_300) utils.tstDone() + + hd.cmd_send_treatment_adjust_pressures_limit_response(accepted=ACCEPTED, + reason=0, + arterial_low=-301, + arterial_high=201, + venous_low=-101, + venous_high=601) + + snooze(5)