Index: shared/scripts/names.py =================================================================== diff -u -r8b2acf92efde9ddbeb292e0fb420b595dbd8c618 -rd7c0f4444a1228d1d018bccaefb46596f3ef5361 --- shared/scripts/names.py (.../names.py) (revision 8b2acf92efde9ddbeb292e0fb420b595dbd8c618) +++ shared/scripts/names.py (.../names.py) (revision d7c0f4444a1228d1d018bccaefb46596f3ef5361) @@ -81,4 +81,3 @@ o_arterial_text_low = {"container": o_Overlay, "text": "LOW", "type": "Text", "unnamed": 1, "visible": True} #venous adjustment low slider title text o_venous_text_low = {"container": o_Overlay, "occurrence": 2, "text": "LOW", "type": "Text", "unnamed": 1, "visible": True} - Index: tst_main_treatment_pressure/test.py =================================================================== diff -u -r272eaf16943c4cc8baf0fabfac3a63390ec735bc -rd7c0f4444a1228d1d018bccaefb46596f3ef5361 --- tst_main_treatment_pressure/test.py (.../test.py) (revision 272eaf16943c4cc8baf0fabfac3a63390ec735bc) +++ tst_main_treatment_pressure/test.py (.../test.py) (revision d7c0f4444a1228d1d018bccaefb46596f3ef5361) @@ -8,11 +8,10 @@ # WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. # # file tst_main_treatment_pressure -# date 02/25/2022 +# date Apr/12/2022 # author Papiya Mandal import names -# import squish from builtins import int as pyInt from configuration.config import * @@ -447,7 +446,6 @@ venous_low=ven_low, venous_high=ven_high) - def open_pressure_pop_up(): """ Method to open the pressure pop up @@ -488,6 +486,10 @@ def close_the_pop_up(): test.log("Closing pressure pop up") mouseClick(waitForObjectExists(names.o_uf_close_button)) + +def click_on_confirm_btn(): + test.log("Clicking on 'confirm' button") + mouseClick(waitForObjectExists(names.o_pop_up_confirm_btn)) def verify_reject_msg_on_pop_up(reason_id): @@ -521,15 +523,51 @@ """ 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, + 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, - art_low=art_low, art_high= art_high, + art_low=art_low, art_high=art_high, ven_low=ven_low, ven_high=ven_high) - utils.waitForGUI(3) + utils.waitForGUI(1) open_pressure_pop_up() verify_arterial_and_venous_value_on_pressure_pop_up(accepted=accepted, + reason_id=reason, art_low=art_low, art_high=art_high, + ven_low=ven_low, ven_high=ven_high) + test.endSection() + + +def verify_adjusted_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 + @param accepted: (int) boolean accept/reject response + @param reason: (int) rejection reason + @param arterial_low: (int) Arterial Pressure Limit Low (mmHg) + @param arterial_high: (int) Arterial Pressure Limit High (mmHg) + @param venous_low: (int) Venous Pressure Limit Low (mmHg) + @param venous_high: (int) Venous Pressure Limit High (mmHg) + @return: none + """ + test.startSection("Adjust and 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_ranges_max_val(art_high) + set_arterial_ranges_min_val(art_low) + set_venous_ranges_max_val(ven_high) + set_venous_ranges_min_val(ven_low) + click_on_confirm_btn() + 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, + art_low=art_low, art_high=art_high, + ven_low=ven_low, ven_high=ven_high) + + utils.waitForGUI(1) + open_pressure_pop_up() + verify_arterial_and_venous_value_on_pressure_pop_up(accepted=accepted, reason_id=reason, art_low=art_low, art_high= art_high, ven_low=ven_low, ven_high=ven_high) test.endSection() @@ -615,22 +653,41 @@ set_arterial_pressure_and_verify_the_color() set_venous_pressure_and_verify_the_color() - + + 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) + + verify_adjusted_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) verify_pressures_on_treatment_and_pop_up_screen(accepted=REJECTED, reason=39, art_low=ART_LOW_VAL_MINUS_200, art_high=ART_HIGH_VAL_70, ven_low=VENOUS_LOW_VAL_MINUS_200, ven_high=VENOUS_HIGH_VAL_150) + + verify_adjusted_pressures_on_treatment_and_pop_up_screen(accepted=REJECTED, reason=39, + art_low=ART_LOW_VAL_MINUS_200, art_high=ART_HIGH_VAL_70, + ven_low=VENOUS_LOW_VAL_MINUS_200, ven_high=VENOUS_HIGH_VAL_150) verify_pressures_on_treatment_and_pop_up_screen(accepted=ACCEPTED, reason=0, art_low=ART_LOW_VAL_MINUS_80, art_high=ART_HIGH_VAL_175, ven_low=VENOUS_LOW_VAL_110, ven_high=VENOUS_HIGH_VAL_250) + verify_pressures_on_treatment_and_pop_up_screen(accepted=ACCEPTED, reason=0, + art_low=ART_LOW_VAL_MINUS_80, art_high=ART_HIGH_VAL_175, + ven_low=VENOUS_LOW_VAL_110, ven_high=VENOUS_HIGH_VAL_250) + verify_pressures_on_treatment_and_pop_up_screen(accepted=REJECTED, reason=21, art_low=ART_LOW_VAL_MINUS_30, art_high=ART_HIGH_VAL_100, ven_low=VENOUS_LOW_VAL_MINUS_390, ven_high=VENOUS_HIGH_VAL_300) + verify_pressures_on_treatment_and_pop_up_screen(accepted=REJECTED, reason=21, + art_low=ART_LOW_VAL_MINUS_30, art_high=ART_HIGH_VAL_100, + ven_low=VENOUS_LOW_VAL_MINUS_390, ven_high=VENOUS_HIGH_VAL_300) + utils.tstDone() + +