Index: suite_leahi/tst_patient_vitals/test.py =================================================================== diff -u -ref346661b535cbf0104cec6b7aecad9176896783 -rc90bf31bab181ed557249018a610f29a83445655 --- suite_leahi/tst_patient_vitals/test.py (.../test.py) (revision ef346661b535cbf0104cec6b7aecad9176896783) +++ suite_leahi/tst_patient_vitals/test.py (.../test.py) (revision c90bf31bab181ed557249018a610f29a83445655) @@ -146,7 +146,8 @@ 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)) + reason_text = waitForObjectExists(utility.setObjectText(text = "Rejected Reason: [1] Request is not allowed in the current operating mode",obj =names.o_title_Text)) + test.compare(reason_text.text, "Rejected Reason: [1] Request is not allowed in the current operating mode", "Rejection reason text should be"+str("Rejected Reason: [1] Request is not allowed in the current operating mode")) test.endSection() def verify_last_read_time(interval): @@ -208,15 +209,20 @@ mouseClick(waitForObject(names.o_confirm_button)) test.endSection() -def verify_the_popup_with_rejectionReason(): +def verify_the_popup_with_rejectionReason(rejectionReason): """ Method to check the popup is opened automatically after time interval """ test.startSection("Verify popup is opened automatically after time interval") - verify_entered_patient_vitals_in_maintreatment_screen() - td.td_vitals_adjustment_response(vRejectionReason=1) + mouseClick(waitForObject(names.o_vitalsButton_VitalsButton)) + mouseClick(names.o_measureVitalsButton_TouchRect) + td.td_vitals( systolic = 80, + diastolic = 60, + heartRate = 140 ) + td.td_vitals_adjustment_response(vRejectionReason=rejectionReason) verify_vitals_pop_up_is_opened_automatically_after_an_interval(interval=10) + test.endSection() def validate_time_interval(vital_interval_obj, int_min): @@ -325,7 +331,7 @@ 0 , 0 , 0) - utils.waitForGUI(1) + validate_time_interval(names.o_vitalCountdown_Text,5) test.endSection() @@ -383,10 +389,10 @@ test.endSection() test.startSection("Verify the vitals data send automatically populate on popup") - verify_popup_with_no_rejectionReason + verify_popup_with_no_rejectionReason() #With rejection reasom - verify_the_popup_with_rejectionReason() + verify_the_popup_with_rejectionReason(rejectionReason=1) test.endSection() test.startSection("Verify the last read time in the UI")