Index: suite_leahi/shared/scripts/configuration/utility.py =================================================================== diff -u -r7b9f32ef9f4913714edca4cafdcbfa1503c16416 -r7f3eb286e193636d9c48f59683063c268112f06f --- suite_leahi/shared/scripts/configuration/utility.py (.../utility.py) (revision 7b9f32ef9f4913714edca4cafdcbfa1503c16416) +++ suite_leahi/shared/scripts/configuration/utility.py (.../utility.py) (revision 7f3eb286e193636d9c48f59683063c268112f06f) @@ -18,6 +18,3 @@ date = datetime.now() return str(date.strftime(date_format)) -def vitals_reading_obj(reading): - names.o_vitals_reading["text"] = reading - return names.o_vitals_reading Index: suite_leahi/shared/scripts/names.py =================================================================== diff -u -r7b9f32ef9f4913714edca4cafdcbfa1503c16416 -r7f3eb286e193636d9c48f59683063c268112f06f --- suite_leahi/shared/scripts/names.py (.../names.py) (revision 7b9f32ef9f4913714edca4cafdcbfa1503c16416) +++ suite_leahi/shared/scripts/names.py (.../names.py) (revision 7f3eb286e193636d9c48f59683063c268112f06f) @@ -92,4 +92,6 @@ o_PatientIDEntry_TextEntry = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_pretreatmentPatientIDEntry", "type": "TextEntry", "unnamed": 1 } o_vitalCountdown_Text = {"container": o_Gui_MainView, "objectName": "_vitalCountdown", "type": "Text" } o_vitals_reading = {"container": mainTreatmentScreen, "type": "Text", "unnamed": 1 } -keyboard_input = {"container": o_Overlay, "type": "Text", "unnamed": 1, } \ No newline at end of file +keyboard_input = {"container": o_Overlay, "type": "Text", "unnamed": 1 } +o_last_read = {"container": mainTreatmentScreen, "id":"_lastRecorded" , "type": "Text", "unnamed": 1 } + Index: suite_leahi/tst_patient_vitals/test.py =================================================================== diff -u -r7b9f32ef9f4913714edca4cafdcbfa1503c16416 -r7f3eb286e193636d9c48f59683063c268112f06f --- suite_leahi/tst_patient_vitals/test.py (.../test.py) (revision 7b9f32ef9f4913714edca4cafdcbfa1503c16416) +++ suite_leahi/tst_patient_vitals/test.py (.../test.py) (revision 7f3eb286e193636d9c48f59683063c268112f06f) @@ -238,8 +238,22 @@ total_elapsed_time = end_time - start_time test.log("Total elapsed time : {}".format(total_elapsed_time)) test.compare(close_btn.visible, VISIBLE, "Popup close option is visible after the vitals pop up is opened automatically") + mouseClick(waitForObject(names.o_vitals_close_btn)) test.endSection() +def verify_last_read_time(interval): + test.startSection("Verify the last read time") + sec = interval*60 + start_time = time.time() + sec_count = 0 + while not(object.exists(names.o_vitals_close_btn)): + utils.waitForGUI(1) + sec_count += 1 + end_time = time.time() + if sec_count in range(295, 301): + test.log("Dialog close button be visible after {}".format(sec)) + total_elapsed_time = end_time - start_time + def erase_entered_value(input_field): """ Method to erase the entered value @@ -429,6 +443,19 @@ test.startSection("Verify the vitals pop up opened automatically after interval time is elapsed") verify_interval_for_bpm() test.endSection() + + test.startSection("Verify the last read time in the UI") + mouseClick(waitForObject(names.o_vitalsButton_VitalsButton)) + verify_valid_vitals_through_keypad(SYSTOLIC,names.o_bloodPressureSystolic_TextEntry,MIN_SYSTOLIC,MIN_SYSTOLIC) + verify_valid_vitals_through_keypad(DIASTOLIC,names.o_bloodPressureDiastolic_TextEntry,MIN_DIASTOLIC,MIN_DIASTOLIC) + verify_valid_vitals_through_keypad(HEARTRATE, names.o_heartRate_TextEntry, MIN_HEARTRATE, MIN_HEARTRATE) + mouseClick(waitForObject(names.o_confirm_button)) + sys_time = utility.get_current_date_and_time(date_format="%Y/%b/%d - %H:%M:%S") + last_read = waitForObjectExists(names.o_last_read).text + lastdatetime = str(last_read).split(" ")[3] + systime = sys_time.split("-")[1].strip() + test.compare(lastdatetime, systime, "Last read time is updated properly") + test.endSection() \ No newline at end of file