Index: suite_leahi/shared/scripts/configuration/config.py =================================================================== diff -u -r75e3ab588237239452761d2ec90e8b3aec6a916b -rb80889ae38266207964960df3070edaa8c467cd9 --- suite_leahi/shared/scripts/configuration/config.py (.../config.py) (revision 75e3ab588237239452761d2ec90e8b3aec6a916b) +++ suite_leahi/shared/scripts/configuration/config.py (.../config.py) (revision b80889ae38266207964960df3070edaa8c467cd9) @@ -89,6 +89,24 @@ CREATERX = "Rx" VALIDATE = "VALIDATE" CONFIRM = "CONFIRM" -NEXT ="Next" +NEXT = "Next" +SYSTOLIC = "Systolic" +DIASTOLIC = "Diastolic" +HEARTRATE = "Heart Rate" +MIN_SYSTOLIC = "60" +MIN_DIASTOLIC = "40" +MIN_HEARTRATE = "40" + +MAX_SYSTOLIC = "250" +MAX_DIASTOLIC = "200" +MAX_HEARTRATE = "180" + +SYSTOLIC_251 = "251" +DIASTOLIC_201 = "201" +HEARTRATE_181 = "181" + +VISIBLE = True + + Index: suite_leahi/shared/scripts/names.py =================================================================== diff -u -r9751968c3118396daa677c2e95961aba5b0bf001 -rb80889ae38266207964960df3070edaa8c467cd9 --- suite_leahi/shared/scripts/names.py (.../names.py) (revision 9751968c3118396daa677c2e95961aba5b0bf001) +++ suite_leahi/shared/scripts/names.py (.../names.py) (revision b80889ae38266207964960df3070edaa8c467cd9) @@ -123,26 +123,28 @@ #Create Treatment o_PreTreatmentCreateStack_PreTreatmentCreateStack = {"container": o_Gui_MainView, "objectName": "_PreTreatmentCreateStack", "type": "PreTreatmentCreateStack", } o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate = {"container": o_PreTreatmentCreateStack_PreTreatmentCreateStack, "objectName": "_PreTreatmentCreate", "type": "PreTreatmentCreate" , } +o_preTreatmentStack_PreTreatmentStack = {"container": o_Gui_MainView, "id": "_preTreatmentStack", "type": "PreTreatmentStack", "unnamed": 1 } +o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate = {"container": o_preTreatmentStack_PreTreatmentStack, "objectName": "_PreTreatmentCreate", "type": "PreTreatmentCreate" } o_bullet_object = { "type": "StepBullet", "unnamed": 1 } o_text_object = { "type": "Text", "unnamed": 1 } o_PreTreatmentCreate_gridSteps_Grid = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_gridSteps", "type": "Grid", "unnamed": 1 } o_PreTreatmentCreate_bloodFlowRate_LabelUnitContainer = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_bloodFlowRate", "type": "LabelUnitContainer", "unnamed": 1 } -o_PreTreatmentCreate_bloodFlowRateControl_ValueAdjuster = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_bloodFlowRateControl", "type": "ValueAdjuster", "unnamed": 1 } +o_PreTreatmentCreate_bloodFlowRateControl_ValueAdjuster = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_bloodFlowRateControl", "type": "ValueAdjuster", "unnamed": 1 } o_PatientIDEntry_TextEntry = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_pretreatmentPatientIDEntry", "type": "TextEntry", "unnamed": 1 } -o_PreTreatmentCreate_dialysateFlowRateControl_ValueAdjuster = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_dialysateFlowRateControl", "type": "ValueAdjuster", "unnamed": 1 } -o_PreTreatmentCreate_durationControl_ValueAdjuster = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_durationControl", "type": "ValueAdjuster", "unnamed": 1 } -o_PreTreatmentCreate_heparinBolusVolumeControl_ValueAdjuster = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_heparinBolusVolumeControl", "type": "ValueAdjuster", "unnamed": 1 } -o_PreTreatmentCreate_heparinDispensingRateControl_ValueAdjuster = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_heparinDispensingRateControl", "type": "ValueAdjuster", "unnamed": 1 } +o_PreTreatmentCreate_dialysateFlowRateControl_ValueAdjuster = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_dialysateFlowRateControl", "type": "ValueAdjuster", "unnamed": 1 } +o_PreTreatmentCreate_durationControl_ValueAdjuster = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_durationControl", "type": "ValueAdjuster", "unnamed": 1 } +o_PreTreatmentCreate_heparinBolusVolumeControl_ValueAdjuster = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_heparinBolusVolumeControl", "type": "ValueAdjuster", "unnamed": 1 } +o_PreTreatmentCreate_heparinDispensingRateControl_ValueAdjuster = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_heparinDispensingRateControl", "type": "ValueAdjuster", "unnamed": 1 } o_PreTreatmentCreate_heparinDispensingRate_LabelUnitContainer = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_heparinDispensingRate", "type": "LabelUnitContainer", "unnamed": 1 } o_PreTreatmentCreate_heparinDispensingRateControl_OffText = {"container": o_PreTreatmentCreate_heparinDispensingRateControl_ValueAdjuster, "type": "Text", "unnamed": 1 } -o_PreTreatmentCreate_heparinStopTimeControl_ValueAdjuster = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_heparinStopTimeControl", "type": "ValueAdjuster", "unnamed": 1 } -o_PreTreatmentCreate_dialysateTemperatureControl_ValueAdjuster = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_dialysateTemperatureControl", "type": "ValueAdjuster", "unnamed": 1 } -o_PreTreatmentCreate_salineBolusVolumeControl_ValueAdjuster = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_salineBolusVolumeControl", "type": "ValueAdjuster", "unnamed": 1 } +o_PreTreatmentCreate_heparinStopTimeControl_ValueAdjuster = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_heparinStopTimeControl", "type": "ValueAdjuster", "unnamed": 1 } +o_PreTreatmentCreate_dialysateTemperatureControl_ValueAdjuster = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_dialysateTemperatureControl", "type": "ValueAdjuster", "unnamed": 1 } +o_PreTreatmentCreate_salineBolusVolumeControl_ValueAdjuster = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_salineBolusVolumeControl", "type": "ValueAdjuster", "unnamed": 1 } o_PreTreatmentCreate_heparinBolusVolume_LabelUnitContainer = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_heparinBolusVolume", "type": "LabelUnitContainer", "unnamed": 1 } o_PreTreatmentCreate_heparinBolusVolume_Off_Text = {"container": o_PreTreatmentCreate_heparinBolusVolumeControl_ValueAdjuster, "type": "Text", "unnamed": 1 } -o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_dialyzerTypeComboBox", "type": "BaseComboBox", "unnamed": 1 } +o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_dialyzerTypeComboBox", "type": "BaseComboBox", "unnamed": 1 } o_saveButton_TouchRect = {"container": o_Overlay, "id": "_saveButton", "type": "TouchRect", "unnamed": 1 } -o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_acidConcentrateComboBox", "type": "BaseComboBox", "unnamed": 1 } +o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_acidConcentrateComboBox", "type": "BaseComboBox", "unnamed": 1 } o_PreTreatmentCreate_acidConcentrate_LabelUnitContainer = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_acidConcentrate", "type": "LabelUnitContainer", "unnamed": 1 } o_acidConcentrate_editbutton = {"container": o_PreTreatmentCreate_acidConcentrate_LabelUnitContainer, "id": "_editButton", "type": "IconButton", "unnamed": 1 } o_PreTreatmentCreate_acidConcentrate_Popup_Text = {"container": o_Overlay, "type": "TitleText", "unnamed": 1 } @@ -170,8 +172,8 @@ o_PreTreatmentCreate_heprainStopTime_slider_Slider = {"container": o_PreTreatmentCreate_heparinStopTimeControl_ValueAdjuster, "id": "_slider", "type": "Slider", "unnamed": 1 } o_PreTreatmentCreate_dialysateTemperature_slider_Slider = {"container": o_PreTreatmentCreate_dialysateTemperatureControl_ValueAdjuster, "id": "_slider", "type": "Slider", "unnamed": 1 } o_PreTreatmentCreate_salineBolusVolume_slider_Slider = {"container": o_PreTreatmentCreate_salineBolusVolumeControl_ValueAdjuster, "id": "_slider", "type": "Slider", "unnamed": 1 } -o_PreTreatmentCreate_bicarbonateConcentrateComboBox_BaseComboBox= {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_bicarbonateConcentrateComboBox", "type": "BaseComboBox", "unnamed": 1 } -o_PreTreatment_vitalsCombobox_BaseCombobox = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_bpMeasurementIntervalControl", "type": "BaseComboBox", "unnamed": 1 } +o_PreTreatmentCreate_bicarbonateConcentrateComboBox_BaseComboBox= {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_bicarbonateConcentrateComboBox", "type": "BaseComboBox", "unnamed": 1 } +o_PreTreatment_vitalsCombobox_BaseCombobox = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_bpMeasurementIntervalControl", "type": "BaseComboBox", "unnamed": 1 } o_PreTreatmentCreate_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "type": "Text", "unnamed": 1 } #prescription header bar @@ -213,4 +215,23 @@ #patient vitals o_treatmentVitals = {"container": mainTreatmentScreen, "objectName": "treatmentVitals", "type": "TreatmentVitals" } o_treatmentHome_editButton_IconButton = {"container": o_treatmentVitals, "id": "_editButton", "type": "IconButton", "unnamed": 1 } - +o_vitalsButton_VitalsButton = {"container": o_Gui_MainView, "id": "_vitalsButton", "type": "VitalsButton", "unnamed": 1 } +o_bloodPressureSystolic_TextEntry = {"container": o_Overlay, "id": "_bloodPressureSystolic", "type": "TextEntry", "unnamed": 1 } +o_bloodPressureDiastolic_TextEntry = {"container": o_Overlay, "id": "_bloodPressureDiastolic", "type": "TextEntry", "unnamed": 1 } +o_title_Text = {"container": o_Overlay, "type": "Text", "unnamed": 1 } +o_heartRate_TextEntry = {"container": o_Overlay, "id": "_heartRate", "type": "TextEntry", "unnamed": 1 } +o_confirm_button = {"container": o_Overlay, "id": "_confirmButton", "type": "ConfirmButton", "unnamed": 1 } +o_treatmentHome_bloodPressure_LabelValue = {"container": mainTreatmentScreen, "id": "_bloodPressure", "type": "LabelValue", "unnamed": 1 } +o_vitals_Interval_TitleText = {"container": o_Overlay, "type": "TitleText", "unnamed": 1 } +o_vitals_Interval_BaseComboBox = {"container": o_Overlay, "id": "_bpMeasurementIntervalControl", "type": "BaseComboBox", "unnamed": 1 } +o_treatmentHome_heartBeat_LabelValue = {"container": mainTreatmentScreen, "id": "_heartBeat", "type": "LabelValue", "unnamed": 1 } +o_vitals_close_btn = {"container": o_Overlay, "id": "_image", "source": "qrc:/images/iClose", "type": "Image", "unnamed": 1 } +o_back_space_key = {"container": o_Overlay, "source": "qrc:/images/iBackspace", "type": "Image", "unnamed": 1 } +o_PatientIDEntry_TextEntry = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_pretreatmentPatientIDEntry", "type": "TextEntry", "unnamed": 1 } +o_PatientIDEntry_TextEntry = {"container": o_preTreatmentStack_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 } +o_last_read = {"container": mainTreatmentScreen, "id":"_lastRecorded" , "type": "Text", "unnamed": 1 } +o_measureVitalsButton_TouchRect = {"container": o_Overlay, "id": "_measureVitalsButton", "type": "TouchRect", "unnamed": 1 } +o_preTreatmentStack_confirmButton_ConfirmButton = {"container": o_preTreatmentStack_PreTreatmentStack, "objectName": "_confirmButton", "type": "ConfirmButton" } Index: suite_leahi/tst_patient_vitals/test.py =================================================================== diff -u -rf0f3fc8e69813e78182948c8ae496275083c7e28 -rb80889ae38266207964960df3070edaa8c467cd9 --- suite_leahi/tst_patient_vitals/test.py (.../test.py) (revision f0f3fc8e69813e78182948c8ae496275083c7e28) +++ suite_leahi/tst_patient_vitals/test.py (.../test.py) (revision b80889ae38266207964960df3070edaa8c467cd9) @@ -34,78 +34,7 @@ td =TD_Messaging() can_interface = td.can_interface - -ACID_CONCENTRATE = ["1.0 K, 2.50 Ca, 1 Mg","2.0 K, 2.50 Ca, 1 Mg","3.0 K, 2.50 Ca, 1 Mg"] -DIALYZER_TYPE = ["Diacap Pro 13H","Diacap Pro 16H", "Diacap Pro 19H", "Optiflux F160NRe", "Optiflux F180NRe", "Optiflux F200NRe","Optiflux F250NRe"] -VITALS = ["OFF","5","10","15","20","30","60"] -BICARBONATE = ["Sodium Bicarbonate"] - -SYSTOLIC = "Systolic" -DIASTOLIC = "Diastolic" -HEARTRATE = "Heart Rate" - -MIN_SYSTOLIC = "60" -MIN_DIASTOLIC = "40" -MIN_HEARTRATE = "40" - -MAX_SYSTOLIC = "250" -MAX_DIASTOLIC = "200" -MAX_HEARTRATE = "180" - -SYSTOLIC_251 = "251" -DIASTOLIC_201 = "201" -HEARTRATE_181 = "181" - -VISIBLE = True - - -def verify_create_treatment_parameters(): - test.startSection("Pre treatment parameters") - for i in range(4): - mouseClick(waitForObject(names.o_preTreatmentStack_confirmButton_ConfirmButton)) - - mouseClick(waitForObject(names.o_PreTreatmentCreate_pretreatmentPatientIDEntry_TextEntry)) - waitForObject(names.o_PreTreatmentCreate_pretreatmentPatientIDEntry_TextEntry).text ="abcd" - utility.set_value_based_on_target(names.o_PreTreatmentCreate_bloodFlowRateControl_ValueAdjuster, 90) - utility.set_value_based_on_target(names.o_PreTreatmentCreate_dialysateFlowRateControl_ValueAdjuster, 100) - utility.set_value_based_on_target(names.o_PreTreatmentCreate_durationControl_ValueAdjuster, 105) - utility.set_value_based_on_target(names.o_PreTreatmentCreate_heparinBolusVolumeControl_ValueAdjuster, 0.4) - utility.set_value_based_on_target(names.o_PreTreatmentCreate_heparinDispensingRateControl_ValueAdjuster, 0.5) - utility.set_value_based_on_target(names.o_PreTreatmentCreate_heparinStopTimeControl_ValueAdjuster, 105) - utility.select_different_dropdown(names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox,ACID_CONCENTRATE,2) - 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,1) - utility.select_different_dropdown(names.o_PreTreatmentCreate_bicarbonateConcentrateComboBox_BaseComboBox,BICARBONATE,0) - mouseClick(waitForObject(names.o_preTreatmentStack_confirmButton_ConfirmButton)) - td.td_Treatment_Parameters_Validation( vAccepted = 1, - vBloodFlowRateRejectReason = 0, - vDialysateFlowRateRejectReason = 0, - vTreatmentDurationRejectReason = 0, - vSalineBolusVolumeRejectReason = 0, - vHeparinStopTimeRejectReason = 0, - vHeparinTypeRejectReason = 0, - vAcidConcentrateRejectReason = 0, - vBicarbonateConcentrateRejectReason = 0, - vDialyzerTypeRejectReason = 0, - vBloodPressureMeasureIntervalRejectReason = 0, - vRinsebackFlowRateRejectReason = 0, - vRinsebackVolumeRejectReason = 0, - vArterialPressureLimitWindowRejectReason = 0, - vVenousPressureLimitWindowRejectReason = 0, - vVenousPressureLimitAsymtrcRejectReason = 0, - vTransmembranePressureLimitWindowRejectReason= 0, - vDialysateTempRejectReason = 0, - vHeparinDispensingRateRejectReason = 0, - vHeparinBolusVolumeRejectReason = 0 - ) - - confirmButton = waitForObject(names.o_preTreatmentStack_confirmButton_ConfirmButton) - mouseClick(waitForObject(confirmButton)) - td.td_operation_mode(TDOpModes.MODE_PRET.value, 0) - test.endSection() - + def keyboard_object_map_helper(text): """ Method for setting custom object property's for keyboard keys @@ -158,7 +87,7 @@ close_btn = waitForObject(names.o_vitals_close_btn) 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") + test.compare(close_btn.visible, config.VISIBLE, "Popup close option is visible after the vitals pop up is opened automatically") 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() @@ -311,9 +240,9 @@ test.log("Condition not satisfied within 5 minutes. Exiting loop.") blood_pressure = waitForObjectExists(names.o_treatmentHome_bloodPressure_LabelValue).topText - test.compare("80"+"/"+"60", blood_pressure,"Blood pressure value should be ->"+str("80"+"/"+"60")) + test.compare("70"+"/"+"50", blood_pressure,"Blood pressure value should be ->"+str("80"+"/"+"60")) heart_rate = waitForObjectExists(names.o_treatmentHome_heartBeat_LabelValue).topText - test.compare("140", heart_rate,"Heart Rate value should be ->"+str(120)) + test.compare("120", heart_rate,"Heart Rate value should be ->"+str(120)) def main(): @@ -335,7 +264,7 @@ td.td_blood_set_auto_load_response(vRejectionReason = 0) test.startSection("Create the pretreatment values") - verify_create_treatment_parameters() + utility.verify_create_treatment_parameters() test.endSection() test.startSection("Verify the minimum values in the vitals popup") @@ -351,33 +280,33 @@ 0 , 0) 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) + verify_valid_vitals_through_keypad(config.SYSTOLIC,names.o_bloodPressureSystolic_TextEntry,config.MIN_SYSTOLIC,config.MIN_SYSTOLIC) + verify_valid_vitals_through_keypad(config.DIASTOLIC,names.o_bloodPressureDiastolic_TextEntry,config.MIN_DIASTOLIC,config.MIN_DIASTOLIC) + verify_valid_vitals_through_keypad(config.HEARTRATE, names.o_heartRate_TextEntry, config.MIN_HEARTRATE, config.MIN_HEARTRATE) mouseClick(waitForObject(names.o_confirm_button)) blood_pressure = waitForObjectExists(names.o_treatmentHome_bloodPressure_LabelValue).topText - test.compare(MIN_SYSTOLIC+"/"+MIN_DIASTOLIC, blood_pressure,"Blood pressure value should be ->"+str(MIN_SYSTOLIC+"/"+MIN_DIASTOLIC)) + test.compare(config.MIN_SYSTOLIC+"/"+config.MIN_DIASTOLIC, blood_pressure,"Blood pressure value should be ->"+str(config.MIN_SYSTOLIC+"/"+config.MIN_DIASTOLIC)) heart_rate = waitForObjectExists(names.o_treatmentHome_heartBeat_LabelValue).topText - test.compare(MIN_HEARTRATE, heart_rate,"Heart Rate value should be ->"+str(MIN_HEARTRATE)) + test.compare(config.MIN_HEARTRATE, heart_rate,"Heart Rate value should be ->"+str(config.MIN_HEARTRATE)) test.endSection() test.startSection("Verify the maximum values in the vitals popup") mouseClick(waitForObject(names.o_vitalsButton_VitalsButton)) - verify_valid_vitals_through_keypad(SYSTOLIC,names.o_bloodPressureSystolic_TextEntry,MAX_SYSTOLIC,MAX_SYSTOLIC) - verify_valid_vitals_through_keypad(DIASTOLIC,names.o_bloodPressureDiastolic_TextEntry,MAX_DIASTOLIC,MAX_DIASTOLIC) - verify_valid_vitals_through_keypad(HEARTRATE, names.o_heartRate_TextEntry, MAX_HEARTRATE, MAX_HEARTRATE) + verify_valid_vitals_through_keypad(config.SYSTOLIC,names.o_bloodPressureSystolic_TextEntry,config.MAX_SYSTOLIC,config.MAX_SYSTOLIC) + verify_valid_vitals_through_keypad(config.DIASTOLIC,names.o_bloodPressureDiastolic_TextEntry,config.MAX_DIASTOLIC,config.MAX_DIASTOLIC) + verify_valid_vitals_through_keypad(config.HEARTRATE, names.o_heartRate_TextEntry, config.MAX_HEARTRATE, config.MAX_HEARTRATE) mouseClick(waitForObject(names.o_confirm_button)) blood_pressure = waitForObjectExists(names.o_treatmentHome_bloodPressure_LabelValue).topText - test.compare(MAX_SYSTOLIC+"/"+MAX_DIASTOLIC, blood_pressure,"Blood pressure value should be ->"+str(MAX_SYSTOLIC+"/"+MAX_DIASTOLIC)) + test.compare(config.MAX_SYSTOLIC+"/"+config.MAX_DIASTOLIC, blood_pressure,"Blood pressure value should be ->"+str(config.MAX_SYSTOLIC+"/"+config.MAX_DIASTOLIC)) heart_rate = waitForObjectExists(names.o_treatmentHome_heartBeat_LabelValue).topText - test.compare(MAX_HEARTRATE, heart_rate,"Heart Rate value should be ->"+str(MAX_HEARTRATE)) + test.compare(config.MAX_HEARTRATE, heart_rate,"Heart Rate value should be ->"+str(config.MAX_HEARTRATE)) test.endSection() test.startSection("Verify the confirm button is disabled when user enter invalid values") mouseClick(waitForObject(names.o_vitalsButton_VitalsButton)) - verify_valid_vitals_through_keypad(SYSTOLIC,names.o_bloodPressureSystolic_TextEntry,SYSTOLIC_251,SYSTOLIC_251) - verify_valid_vitals_through_keypad(DIASTOLIC,names.o_bloodPressureDiastolic_TextEntry,DIASTOLIC_201,DIASTOLIC_201) - verify_valid_vitals_through_keypad(HEARTRATE, names.o_heartRate_TextEntry, HEARTRATE_181, HEARTRATE_181) + verify_valid_vitals_through_keypad(config.SYSTOLIC,names.o_bloodPressureSystolic_TextEntry,config.SYSTOLIC_251,config.SYSTOLIC_251) + verify_valid_vitals_through_keypad(config.DIASTOLIC,names.o_bloodPressureDiastolic_TextEntry,config.DIASTOLIC_201,config.DIASTOLIC_201) + verify_valid_vitals_through_keypad(config.HEARTRATE, names.o_heartRate_TextEntry, config.HEARTRATE_181, config.HEARTRATE_181) confirm_button =waitForObjectExists(names.o_confirm_button) test.verify(not confirm_button.enabled, "Confirm button is not enabled") mouseClick(waitForObject(names.o_vitals_close_btn)) @@ -388,17 +317,16 @@ #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")) - utility.select_different_dropdown(names.o_vitals_Interval_BaseComboBox,VITALS,0) - utility.select_different_dropdown(names.o_vitals_Interval_BaseComboBox,VITALS,1) - test.compare(waitForObject(names.o_vitals_Interval_BaseComboBox).currentText, VITALS[1], "Vitals interval value should be :"+str(VITALS[1])) - utility.select_different_dropdown(names.o_vitals_Interval_BaseComboBox,VITALS,2) - test.compare(waitForObject(names.o_vitals_Interval_BaseComboBox).currentText, VITALS[2], "Vitals interval value should be :"+str(VITALS[2])) - utility.select_different_dropdown(names.o_vitals_Interval_BaseComboBox,VITALS,3) - test.compare(waitForObject(names.o_vitals_Interval_BaseComboBox).currentText, VITALS[3], "Vitals interval value should be :"+str(VITALS[3])) - utility.select_different_dropdown(names.o_vitals_Interval_BaseComboBox,VITALS,4) - test.compare(waitForObject(names.o_vitals_Interval_BaseComboBox).currentText, VITALS[4], "Vitals interval value should be :"+str(VITALS[4])) - utility.select_different_dropdown(names.o_vitals_Interval_BaseComboBox,VITALS,5) - test.compare(waitForObject(names.o_vitals_Interval_BaseComboBox).currentText, VITALS[5], "Vitals interval value should be :"+str(VITALS[5])) + utility.select_different_dropdown(names.o_vitals_Interval_BaseComboBox,config.VITALS,1) + test.compare(waitForObject(names.o_vitals_Interval_BaseComboBox).currentText, config.VITALS[1], "Vitals interval value should be :"+str(config.VITALS[1])) + utility.select_different_dropdown(names.o_vitals_Interval_BaseComboBox,config.VITALS,2) + test.compare(waitForObject(names.o_vitals_Interval_BaseComboBox).currentText, config.VITALS[2], "Vitals interval value should be :"+str(config.VITALS[2])) + utility.select_different_dropdown(names.o_vitals_Interval_BaseComboBox,config.VITALS,3) + test.compare(waitForObject(names.o_vitals_Interval_BaseComboBox).currentText, config.VITALS[3], "Vitals interval value should be :"+str(config.VITALS[3])) + utility.select_different_dropdown(names.o_vitals_Interval_BaseComboBox,config.VITALS,4) + test.compare(waitForObject(names.o_vitals_Interval_BaseComboBox).currentText, config.VITALS[4], "Vitals interval value should be :"+str(config.VITALS[4])) + utility.select_different_dropdown(names.o_vitals_Interval_BaseComboBox,config.VITALS,5) + test.compare(waitForObject(names.o_vitals_Interval_BaseComboBox).currentText, config.VITALS[5], "Vitals interval value should be :"+str(config.VITALS[5])) mouseClick(waitForObject(names.o_vitals_close_btn)) test.endSection() @@ -410,9 +338,9 @@ 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) + verify_valid_vitals_through_keypad(config.SYSTOLIC,names.o_bloodPressureSystolic_TextEntry,config.MIN_SYSTOLIC,config.MIN_SYSTOLIC) + verify_valid_vitals_through_keypad(config.DIASTOLIC,names.o_bloodPressureDiastolic_TextEntry,config.MIN_DIASTOLIC,config.MIN_DIASTOLIC) + verify_valid_vitals_through_keypad(config.HEARTRATE, names.o_heartRate_TextEntry,config.MIN_HEARTRATE,config.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 @@ -423,11 +351,11 @@ test.startSection("Check the vitals in main treatment screen") mouseClick(waitForObject(names.o_treatmentHome_editButton_IconButton)) - utility.select_different_dropdown(names.o_vitals_Interval_BaseComboBox,VITALS,5) + utility.select_different_dropdown(names.o_vitals_Interval_BaseComboBox,config.VITALS,5) mouseClick(waitForObject(names.o_confirm_button,1000)) validate_time_interval(names.o_vitalCountdown_Text,30) mouseClick(waitForObject(names.o_treatmentHome_editButton_IconButton)) - utility.select_different_dropdown(names.o_vitals_Interval_BaseComboBox,VITALS,1) + utility.select_different_dropdown(names.o_vitals_Interval_BaseComboBox,config.VITALS,1) mouseClick(waitForObject(names.o_confirm_button,1000)) validate_time_interval(names.o_vitalCountdown_Text,5)