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