Index: shared/scripts/configuration/config.py =================================================================== diff -u -ra470470339846e1134af7c57024c25180b8778a6 -r8a2f99cdf750415302f56df3a674b68bdacc96fe --- shared/scripts/configuration/config.py (.../config.py) (revision a470470339846e1134af7c57024c25180b8778a6) +++ shared/scripts/configuration/config.py (.../config.py) (revision 8a2f99cdf750415302f56df3a674b68bdacc96fe) @@ -88,4 +88,23 @@ 37: "REQUEST_REJECT_REASON_NO_NEW_TREATMENT_ALARM_TRIGGERED", 38: "REQUEST_REJECT_REASON_BATTERY_IS_NOT_CHARGED", 39: "REQUEST_REJECT_REASON_RINSEBACK_NOT_COMPLETED", - } \ No newline at end of file + } + +#pressure +ARTERIAL_PRESSURE_MINIMUM = -400 +ARTERIAL_PRESSURE_MAXIMUM = +600 +ARTERIAL_PRESSURE_LOW_MIN = -300 +ARTERIAL_PRESSURE_LOW_DEF = -300 +ARTERIAL_PRESSURE_LOW_MAX = +200 +ARTERIAL_PRESSURE_HIGH_MIN = -300 +ARTERIAL_PRESSURE_HIGH_DEF = +100 +ARTERIAL_PRESSURE_HIGH_MAX = +200 + +VENOUS_PRESSURE_MINIMUM = -100 +VENOUS_PRESSURE_MAXIMUM = +700 +VENOUS_PRESSURE_LOW_MIN = -100 +VENOUS_PRESSURE_LOW_DEF = -100 +VENOUS_PRESSURE_LOW_MAX = +600 +VENOUS_PRESSURE_HIGH_MIN = +100 +VENOUS_PRESSURE_HIGH_DEF = +400 +VENOUS_PRESSURE_HIGH_MAX = +600 \ No newline at end of file Index: shared/scripts/names.py =================================================================== diff -u -rdc83f8cff9f4014fedd92c23d153761fd214a5f4 -r8a2f99cdf750415302f56df3a674b68bdacc96fe --- shared/scripts/names.py (.../names.py) (revision dc83f8cff9f4014fedd92c23d153761fd214a5f4) +++ shared/scripts/names.py (.../names.py) (revision 8a2f99cdf750415302f56df3a674b68bdacc96fe) @@ -56,6 +56,28 @@ o_pressure_text_obj = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "type": "Text", "unnamed": 1, "visible": True} o_pop_up_rejected_msg = {"container": o_Overlay, "type": "Text", "unnamed": 1, "visible": True} + +o_treatmentAdjustmentPressures_Screen = {"container": o_Overlay, "objectName": "TreatmentAdjustmentPressures", "type": "ContentItem"} + +o_arterial_range_slider = {"container": o_treatmentAdjustmentPressures_Screen, "id": "_arterialPressure", "type": "PressureRangeSlider"} +o_arterial_progress = {"container": o_arterial_range_slider , "id": "_pressureRangeBar", "type": "RangeBar" } +o_arterial_marker = {"container": o_arterial_progress , "id": "_rangeMarkerValue", "type": "RangeMarker" } +o_arterial_progress_textValue = {"container": o_arterial_marker , "id": "_textValue" , "type": "Text" } +# arterial slider +o_arterial_slider = {"container": o_arterial_range_slider , "id": "_pressureSlider" , "type": "RangeSlider" } +# arterial limits bar +o_arterial_limitbar = {"container": o_arterial_range_slider , "id": "_rangeRect" , "type": "RangeRect" } +# venous pressure range slider +o_venous_range_slider = {"container": o_treatmentAdjustmentPressures_Screen, "id": "_venousPressure" , "type": "PressureRangeSlider"} +# venous progress +o_venous_progress = {"container": o_venous_range_slider , "id": "_pressureRangeBar", "type": "RangeBar" } +o_venous_marker = {"container": o_venous_progress , "id": "_rangeMarkerValue", "type": "RangeMarker" } +o_venous_progress_textValue = {"container": o_venous_marker , "id": "_textValue" , "type": "Text" } +# venous slider +o_venous_slider = {"container": o_venous_range_slider , "id": "_pressureSlider" , "type": "RangeSlider" } +o_venous_limitbar = {"container": o_venous_range_slider , "id": "_rangeRect" , "type": "RangeRect" } + + def pressure_pop_up_text_obj(text): o_pop_up_pressure_text_obj["text"] = text return o_pop_up_pressure_text_obj @@ -65,3 +87,4 @@ return o_pressure_text_obj + 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)