Index: suite_leahi/shared/scripts/configuration/config.py =================================================================== diff -u -r3668d4a9747b75c20be05a1245edb041cb91cc4b -ra774225d7e3f88892d90e0dda307b8c17b18899c --- suite_leahi/shared/scripts/configuration/config.py (.../config.py) (revision 3668d4a9747b75c20be05a1245edb041cb91cc4b) +++ suite_leahi/shared/scripts/configuration/config.py (.../config.py) (revision a774225d7e3f88892d90e0dda307b8c17b18899c) @@ -107,6 +107,11 @@ DIASTOLIC_201 = "201" HEARTRATE_181 = "181" +SYSTOLIC_59 = "59" +DIASTOLIC_39 = "39" +HEARTRATE_39 = "39" +RED_COLOR = "#c53b33" + VISIBLE = True FEATURE_CONFIGURATIONS = "Feature Configurations" # Settings Service Index: suite_leahi/shared/scripts/names.py =================================================================== diff -u -r3668d4a9747b75c20be05a1245edb041cb91cc4b -ra774225d7e3f88892d90e0dda307b8c17b18899c --- suite_leahi/shared/scripts/names.py (.../names.py) (revision 3668d4a9747b75c20be05a1245edb041cb91cc4b) +++ suite_leahi/shared/scripts/names.py (.../names.py) (revision a774225d7e3f88892d90e0dda307b8c17b18899c) @@ -251,3 +251,5 @@ o_UserConfirmation_SettingsServicePassword = {"container": o_SettingsStack_SettingsStack, "objectName": "UserConfirmation", "type": "SettingsServicePassword", } o_userConfirmation_TextInput = {"container": o_UserConfirmation_SettingsServicePassword, "echoMode": 2, "id": "_input", "passwordCharacter": "•", "type": "TextInput", "unnamed": 1, } o_userConfirmation_ConfirmButton = {"container": o_UserConfirmation_SettingsServicePassword, "objectName": "_confirmButton", "type": "ConfirmButton", } +o_numRect_Rectangle = {"container": o_Overlay, "id": "_numRect", "type": "Rectangle", "unnamed": 1 } +o_Vitals_Popup_CloseButton = {"container": o_Overlay, "id": "_closeButton", "type": "CloseButton", "unnamed": 1 } Index: suite_leahi/tst_patient_vitals/test.py =================================================================== diff -u -r6a4d7d17dd709581ac669966358a804b33957c92 -ra774225d7e3f88892d90e0dda307b8c17b18899c --- suite_leahi/tst_patient_vitals/test.py (.../test.py) (revision 6a4d7d17dd709581ac669966358a804b33957c92) +++ suite_leahi/tst_patient_vitals/test.py (.../test.py) (revision a774225d7e3f88892d90e0dda307b8c17b18899c) @@ -249,7 +249,99 @@ test.log(f"Updated value: {current_value}") - test.log(f"✅ Target value reached: {current_value}") + test.log(f"✅ Target value reached: {current_value}") + +def verify_vitals_numpad_out_of_range_color(): + """ + Verify that the vitals dialog numpad text turns red when the entered value is out of range. + """ + + mouseClick(waitForObject(names.o_vitalsButton_VitalsButton)) + verify_valid_vitals_through_keypad( + config.SYSTOLIC, + names.o_bloodPressureSystolic_TextEntry, + config.SYSTOLIC_59, + config.SYSTOLIC_59, + ) + parent_obj = waitForObject(names.o_numRect_Rectangle, 3000) + value_object = utility.findObjectById(parent_obj, "_valueLabel") + test.compare( + utility.findObjectById(parent_obj, "_valueLabel").color.name, + config.RED_COLOR, + "Comparison of Vitals dialog numpad text turns red when it is less than Minimum Systolic range", + ) + + verify_valid_vitals_through_keypad( + config.DIASTOLIC, + names.o_bloodPressureDiastolic_TextEntry, + config.DIASTOLIC_39, + config.DIASTOLIC_39, + ) + parent_obj = waitForObject(names.o_numRect_Rectangle, 3000) + value_object = utility.findObjectById(parent_obj, "_valueLabel") + test.compare( + utility.findObjectById(parent_obj, "_valueLabel").color.name, + config.RED_COLOR, + "Comparison of Vitals dialog numpad text turns red when it is less than Minimum Diastolic range", + ) + + verify_valid_vitals_through_keypad( + config.HEARTRATE, + names.o_heartRate_TextEntry, + config.HEARTRATE_39, + config.HEARTRATE_39, + ) + parent_obj = waitForObject(names.o_numRect_Rectangle, 3000) + value_object = utility.findObjectById(parent_obj, "_valueLabel") + test.compare( + utility.findObjectById(parent_obj, "_valueLabel").color.name, + config.RED_COLOR, + "Comparison of Vitals dialog numpad text turns red when it is less than Minimum Heart Rate range", + ) + + verify_valid_vitals_through_keypad( + config.SYSTOLIC, + names.o_bloodPressureSystolic_TextEntry, + config.SYSTOLIC_251, + config.SYSTOLIC_251, + ) + parent_obj = waitForObject(names.o_numRect_Rectangle, 3000) + value_object = utility.findObjectById(parent_obj, "_valueLabel") + test.compare( + utility.findObjectById(parent_obj, "_valueLabel").color.name, + config.RED_COLOR, + "Comparison of Vitals dialog numpad text turns red when it is more than Maximum Systolic range", + ) + + verify_valid_vitals_through_keypad( + config.DIASTOLIC, + names.o_bloodPressureDiastolic_TextEntry, + config.DIASTOLIC_201, + config.DIASTOLIC_201, + ) + parent_obj = waitForObject(names.o_numRect_Rectangle, 3000) + value_object = utility.findObjectById(parent_obj, "_valueLabel") + test.compare( + utility.findObjectById(parent_obj, "_valueLabel").color.name, + config.RED_COLOR, + "Comparison of Vitals dialog numpad text turns red when it is more than Maximum Diastolic range", + ) + + verify_valid_vitals_through_keypad( + config.HEARTRATE, + names.o_heartRate_TextEntry, + config.HEARTRATE_181, + config.HEARTRATE_181, + ) + parent_obj = waitForObject(names.o_numRect_Rectangle, 3000) + value_object = utility.findObjectById(parent_obj, "_valueLabel") + test.compare( + utility.findObjectById(parent_obj, "_valueLabel").color.name, + config.RED_COLOR, + "Comparison of Vitals dialog numpad text turns red when it is more than Maximum Heart Rate range", + ) + + mouseClick(waitForObject(names.o_Vitals_Popup_CloseButton, 3000)) def main(): @@ -269,8 +361,8 @@ test.verify(waitForObjectExists(names.o_standByScreen_MainHome), "In Standby") mouseClick(waitForObject(names.o_createTreatmentRect_TouchRect)) td.td_operation_mode(TDOpModes.MODE_PRET.value, 0) - + test.startSection("Create the pretreatment values") utility.verify_create_treatment_parameters() test.endSection() @@ -320,6 +412,12 @@ mouseClick(waitForObject(names.o_vitals_close_btn)) test.endSection() + test.startSection( + "Verify that the vitals dialog numpad text turns red when the entered value is out of range." + ) + verify_vitals_numpad_out_of_range_color() + test.endSection() + test.startSection("Verify the vitals interval popup") mouseClick(waitForObject(names.o_treatmentHome_editButton_IconButton)) #check the title text in the popup