Index: suite_leahi/tst_patient_vitals/test.py =================================================================== diff -u -re32200c7f7ab29391717233a88a2dc27ee8987f8 -ref346661b535cbf0104cec6b7aecad9176896783 --- suite_leahi/tst_patient_vitals/test.py (.../test.py) (revision e32200c7f7ab29391717233a88a2dc27ee8987f8) +++ suite_leahi/tst_patient_vitals/test.py (.../test.py) (revision ef346661b535cbf0104cec6b7aecad9176896783) @@ -63,7 +63,7 @@ utility.set_value_based_on_target(names.o_PreTreatmentCreate_dialysateTemperatureControl_ValueAdjuster,37.0) utility.select_different_dropdown(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox,DIALYZER_TYPE,2) utility.set_value_based_on_target(names.o_PreTreatmentCreate_salineBolusVolumeControl_ValueAdjuster, 100) - utility.select_different_dropdown(names.o_PreTreatment_vitalsCombobox_BaseCombobox,VITALS,2) + utility.select_different_dropdown(names.o_PreTreatment_vitalsCombobox_BaseCombobox,VITALS,1) utility.select_different_dropdown(names.o_PreTreatmentCreate_bicarbonateConcentrateComboBox_BaseComboBox,BICARBONATE,0) mouseClick(waitForObject(names.o_PreTreatmentButtom)) td.td_Treatment_Parameters_Validation( vAccepted = 1, @@ -114,7 +114,7 @@ mouseClick(input_field) #check the title - title = waitForObjectExists(utility.set_Object_Text(text = title_name,obj =names.o_title_Text)) + title = waitForObjectExists(utility.setObjectText(text = title_name,obj =names.o_title_Text)) test.compare(title_name, title.text, "Title text should be -> "+ str(title_name)) for text in expected_value: @@ -208,7 +208,7 @@ mouseClick(waitForObject(names.o_confirm_button)) test.endSection() -def verify_interval_for_bpm(): +def verify_the_popup_with_rejectionReason(): """ Method to check the popup is opened automatically after time interval """ @@ -261,8 +261,45 @@ test.log(f"Remaining time is correct: {ui_str}") else: test.fail(f"Remaining time incorrect. Expected {expected_str}, got {ui_str}") + +def verify_vitals_data_updated_no_rejection_reason(): + """ + Method to verify the vitals data updated + with no rejection reason + @param interval - (int) interval in min + """ + + while True: + # Read time from GUI + remaining_time = str(waitForObject(names.o_vitalCountdown_Text).text).strip() + + test.log(f"Current Remaining Time: {remaining_time}") + + # When GUI time becomes zero, return + if remaining_time in ("0:00", "00:01"): + test.log(remaining_time) + td.td_vitals( systolic= 80, + diastolic = 60, + heartRate = 140 ) + break + blood_pressure = waitForObjectExists(names.o_treatmentHome_bloodPressure_LabelValue).topText + test.compare("70"+"/"+"50", blood_pressure,"Blood pressure value should be ->"+str("70"+"/"+"50")) + heart_rate = waitForObjectExists(names.o_treatmentHome_heartBeat_LabelValue).topText + test.compare("140", heart_rate,"Heart Rate value should be ->"+str(120)) + +def verify_popup_with_no_rejectionReason(): + mouseClick(waitForObject(names.o_vitalsButton_VitalsButton)) + mouseClick(names.o_measureVitalsButton_TouchRect) + td.td_vitals( systolic = 70, + diastolic = 50, + heartRate = 120 ) + td.td_vitals_adjustment_response(vRejectionReason=0) + blood_pressure = waitForObjectExists(names.o_treatmentHome_bloodPressure_LabelValue).topText + test.compare("70"+"/"+"50", blood_pressure,"Blood pressure value should be ->"+str("70"+"/"+"50")) + heart_rate = waitForObjectExists(names.o_treatmentHome_heartBeat_LabelValue).topText + test.compare("120", heart_rate,"Heart Rate value should be ->"+str(120)) + verify_vitals_data_updated_no_rejection_reason() - def main(): utils.tstStart(__file__) startApplication(config.AUT_NAME) @@ -289,7 +326,7 @@ 0 , 0) utils.waitForGUI(1) - validate_time_interval(names.o_vitalCountdown_Text,10) + validate_time_interval(names.o_vitalCountdown_Text,5) test.endSection() test.startSection("Verify the minimum values in the vitals popup") @@ -346,19 +383,10 @@ test.endSection() test.startSection("Verify the vitals data send automatically populate on popup") - mouseClick(waitForObject(names.o_vitalsButton_VitalsButton)) - mouseClick(names.o_measureVitalsButton_TouchRect) - td.td_vitals( systolic = 70 , - diastolic = 50 , - heartRate = 120 ) - td.td_vitals_adjustment_response(vRejectionReason=0) - blood_pressure = waitForObjectExists(names.o_treatmentHome_bloodPressure_LabelValue).topText - test.compare(70+"/"+50, blood_pressure,"Blood pressure value should be ->"+str(70+"/"+50)) - heart_rate = waitForObjectExists(names.o_treatmentHome_heartBeat_LabelValue).topText - test.compare(120, heart_rate,"Heart Rate value should be ->"+str(120)) - + verify_popup_with_no_rejectionReason + #With rejection reasom - verify_interval_for_bpm() + verify_the_popup_with_rejectionReason() test.endSection() test.startSection("Verify the last read time in the UI")