Index: suite_leahi/tst_patient_vitals/test.py =================================================================== diff -u -r30aa33698b5c5b0559841590c4bf0e87f9ccf820 -r21b154585b774a106ae9f703ae78654a0aa1ec79 --- suite_leahi/tst_patient_vitals/test.py (.../test.py) (revision 30aa33698b5c5b0559841590c4bf0e87f9ccf820) +++ suite_leahi/tst_patient_vitals/test.py (.../test.py) (revision 21b154585b774a106ae9f703ae78654a0aa1ec79) @@ -1,4 +1,5 @@ # Subject/Title: LDT -2280 Patient Vitals - SW - 02 - Q&R - 15: SIT - Software Integration Tests - Squish Qt +# and LDT-4555 NON-FEATURE: SW Misc & Enhc - SW - 02 - SW Integration - Vitals - Q&R # # Functionalities: Testing all functionalities of Patient Vitals in the main treatment screen # @@ -8,10 +9,10 @@ # - Verify the Diastolic minimum ,mid and maximum values in Vital Popup # - Verify the Heart Rate minimum,mid and maximum values in Vital Popup # - Verify the time intervals in the vital interval Popup -# - Verify the vitals popup is opened automatically once the BPM interval time is elapsed when the rejection reason is 1 +# - Verify the vitals popup is opened automatically oncse the BPM interval time is elapsed when the rejection reason is 1 # - Verify the confirm button is disabled when user enters out of range values in the systolic, diastolic and heart rate parameters # - Verify the vitals interval time with current system time - +# - Request a Measure Vitals, Respond with Vitals Data and Confirm data is correct on Vitals dialog # Python import os import can @@ -427,15 +428,18 @@ test.endSection() test.startSection("Verify the vitals interval popup") - mouseClick(waitForObject(names.o_treatmentHome_editButton_IconButton)) + parent_obj = waitForObject(names.o_treatmentHome_treatmentVitals_TreatmentVitals) + edit_button = utility.findObjectById(parent_obj,"_editButton") + mouseClick(waitForObject(edit_button)) #check the title text in the popup vitals_titleText = waitForObjectExists(names.o_vitals_Interval_TitleText).text - test.compare("Vitals Interval", vitals_titleText, "Vitals Interval popup text should be ->"+str("Vitals Interval")) + test.compare("Vitals Settings", vitals_titleText, "Vitals Interval popup text should be ->"+str("Vitals Interval")) parent_obj = waitForObject(names.o_bpMeasurementIntervalControl_ValueAdjusterCustom) vitals_interval = utility.findObjectById(parent_obj, "_rightArrow") mouseClick(vitals_interval) # set_value_based_on_target_patientvitals(names.o_bpMeasurementIntervalControl_ValueAdjusterCustom, 5) mouseClick(waitForObject(names.o_confirm_button)) + mouseClick(waitForObject(names.o_vitals_close_btn)) test.endSection() test.startSection("Verify the vitals data send automatically populate on popup") @@ -458,15 +462,41 @@ test.endSection() test.startSection("Check the vitals in main treatment screen") - mouseClick(waitForObject(names.o_treatmentHome_editButton_IconButton)) + parent_obj = waitForObject(names.o_treatmentHome_treatmentVitals_TreatmentVitals) + edit_button = utility.findObjectById(parent_obj,"_editButton") + mouseClick(waitForObject(edit_button)) set_value_based_on_target_patientvitals(names.o_bpMeasurementIntervalControl_ValueAdjusterCustom, 30) mouseClick(waitForObject(names.o_confirm_button,1000)) + mouseClick(waitForObject(names.o_vitals_close_btn)) validate_time_interval(names.o_vitalCountdown_Text,30) - mouseClick(waitForObject(names.o_treatmentHome_editButton_IconButton)) + + mouseClick(waitForObject(edit_button)) set_value_based_on_target_patientvitals(names.o_bpMeasurementIntervalControl_ValueAdjusterCustom, 5) mouseClick(waitForObject(names.o_confirm_button,1000)) + mouseClick(waitForObject(names.o_vitals_close_btn)) validate_time_interval(names.o_vitalCountdown_Text,5) + test.endSection() + test.startSection("Request a Measure Vitals, Respond with Vitals Data and Confirm data is correct on Vitals dialog") + mouseClick(utility.get_object_from_names(names.o_vitalsButton_VitalsButton)) + mouseClick(utility.get_object_from_names(names.o_measureVitalsButton_TouchRect)) + test.verify(waitFor( lambda: vitalsrequest == True, 3000), "Measure Vitals UI Sending the request to FW") + td.td_vitals( + systolic = 121, + diastolic = 81, + heartRate = 76 + ) + vitals_sent_time = utility.get_current_date_and_time(date_format="%m/%d/%Y %H:%M:%S") + mouseClick(utility.get_object_from_names(names.o_vitalsButton_VitalsButton)) + vitals_popup_last_read_time = utility.get_object_text(names.o_Overlay_lastRecordedText) + test.compare(vitals_sent_time, vitals_popup_last_read_time, "Vitals popup Last read time") + popup_blood_pressure = utility.get_object_from_names(names.o_bloodPressure_LabelValue) + blood_pressure = utility.findObjectById(popup_blood_pressure, "_topText") + test.compare(blood_pressure.text, config.SYSTOLIC_121+"/"+config.DIASTOLIC_81, "Vitals Popup Blood Pressure Data") + popup_heart_beat = utility.get_object_from_names(names.o_heartBeat_LabelValue) + heart_beat = utility.findObjectById(popup_heart_beat, "_topText") + test.compare(str(heart_beat.text), config.HEARTRATE_76, "Vitals Popup Heart Beat Data") + test.endSection() utils.tstDone()