Index: suite_leahi/tst_blood_set_auto/test.py =================================================================== diff -u -r03b58f8973c9bf457ae38f28ca7807bbe6bc7b72 -r34c323eff3ef9a472dfc6dc83bd1b2015fb3fcc2 --- suite_leahi/tst_blood_set_auto/test.py (.../test.py) (revision 03b58f8973c9bf457ae38f28ca7807bbe6bc7b72) +++ suite_leahi/tst_blood_set_auto/test.py (.../test.py) (revision 34c323eff3ef9a472dfc6dc83bd1b2015fb3fcc2) @@ -46,7 +46,7 @@ global bloodSetAutoEject bloodSetAutoEject = True - + def main(): utils.tstStart(__file__) if can_interface is None: @@ -77,7 +77,7 @@ ) mouseClick(waitForObject(utility.findChildByText(pre_treatment, config.NEXT), 3000)) - mouseClick(utility.setObjectText(names.o_preTreatmentStack_Text, config.AUTO_LOAD)) + mouseClick(waitForObject(utility.setObjectText(names.o_preTreatmentStack_Text, config.AUTO_LOAD), 3000)) test.verify( waitFor(lambda: bloodSetAutoLoad == True, 10000), "Testing UI -> TD message Auto Load" @@ -97,7 +97,7 @@ stepcount = waitForObjectExists(names.o_preTreatmentStack_repeater_Repeater) - td_simulator.td_blood_set_auto_load_response(vRejectionReason=0) + td_simulator.td_blood_set_auto_load_response(0) stepId = waitForObjectExists(names.o_preTreatmentStack_stepIndicator_StepIndicator) values = utility.findAllObjectsById(stepId, "_text") if stepcount.count == 9: @@ -128,61 +128,41 @@ obj=names.o_preTreatmentStack_Text, text=config.NEXT ) mouseClick(Nextbutton) - - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_bloodFlowRateControl_ValueAdjuster, 50 - ) - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_dialysateFlowRateControl_ValueAdjuster, 50 - ) - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_durationControl_ValueAdjuster, 60 - ) - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_heparinBolusVolumeControl_ValueAdjuster, "0.2" - ) - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_heparinDispensingRateControl_ValueAdjuster, "0.2" - ) - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_heparinStopTimeControl_ValueAdjuster, 60 - ) - utility.select_different_dropdown( - names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox, - config.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, - config.DIALYZER_TYPE, - 2, - ) - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_salineBolusVolumeControl_ValueAdjuster, 100 - ) - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_bpMeasurementIntervalControl_ValueAdjusterCustom, 6.0 - ) - utility.select_different_dropdown( - names.o_PreTreatmentCreate_bicarbonateConcentrateComboBox_BaseComboBox, - config.BICARBONATE, - 0, - ) - - mouseClick( - waitForObjectExists(names.o_preTreatmentStack_confirmButton_ConfirmButton, 3000) - ) - - td_simulator.td_Treatment_Parameters_Validation(vAccepted=1) - mouseClick( - waitForObjectExists(names.o_preTreatmentStack_confirmButton_ConfirmButton, 3000) - ) - - mouseClick(waitForObject(utility.setObjectText(names.o_preTreatmentStack_Text, config.START), 3000)) - + + mouseClick(waitForObject(names.o_PreTreatmentCreate_pretreatmentPatientIDEntry_TextEntry)) + waitForObject(names.o_PreTreatmentCreate_pretreatmentPatientIDEntry_TextEntry).text ="1234" + parent_obj = waitForObject(names.o_PreTreatmentCreate_leftColumn_Column, 3000) + blood_flow_rate = utility.findObjectById(parent_obj, "_bloodFlowRate") + utility.set_value_based_on_target(blood_flow_rate, 60) + dialysate_flow_rate = utility.findObjectById(parent_obj, "_dialysateFlowRate") + utility.set_value_based_on_target(dialysate_flow_rate, 75) + duration = utility.findObjectById(parent_obj,"_duration") + utility.set_value_based_on_target(duration, 75) + right_obj = waitForObject(names.o_PreTreatmentCreate_rightColumn_Column) + ultrafiltration_volume = utility.findObjectById(right_obj,"_ufVolume") + utility.set_value_based_on_target(ultrafiltration_volume,0.10) + heparin_rx = utility.findObjectById(right_obj,"_heparinRx") + heparin_right_arrow = utility.findObjectById(heparin_rx, "_rightArrow") + mouseClick(heparin_right_arrow) + heparin_obj = waitForObject(names.o_LabelUnitValueAdjuster_LabelUnitValueAdjuster) + heparin_bolus = utility.findObjectById(heparin_obj,"_heparinBolusVolume") + utility.set_value_based_on_target(heparin_bolus, 0.2) + utility.set_value_based_on_target(names.o_heparinDispensingRate_LabelUnitValueAdjuster,0.3) + utility.set_value_based_on_target(names.o_heparinDeliveryDuration_LabelUnitValueAdjuster, 75) + mouseClick(waitForObject(names.o_confirmButton_ConfirmButton)) + utility.select_different_dropdown(names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox,config.ACID_CONCENTRATE,2) + utility.select_different_dropdown(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox,config.DIALYZER_TYPE,2) + utility.select_different_dropdown(names.o_PreTreatmentCreate_bicarbonateConcentrateComboBox_BaseComboBox,config.BICARBONATE,0) + Nextbutton = utility.setObjectText(obj =names.o_preTreatmentStack_Text, text =config.NEXT) + mouseClick(waitForObject(Nextbutton)) + utility.set_value_based_on_target(names.o_PreTreatmentCreate_sodium_LabelUnitValueAdjuster, 139) + utility.set_value_based_on_target(names.o_PreTreatmentCreate_bicarbonate_LabelUnitValueAdjuster, 35) + utility.set_value_based_on_target(names.o_PreTreatmentCreate_fluidBolusVolume_LabelUnitValueAdjuster,300) + utility.set_value_based_on_target(names.o_PreTreatmentCreate_primeRinsebackVolume_LabelUnitValueAdjuster,310) + confirm_button = waitForObjectExists(names.o_preTreatmentStack_confirmButton_ConfirmButton) + mouseClick(confirm_button) + td_simulator.td_Treatment_Parameters_Validation(vAccepted= 1) + td_simulator.td_operation_mode(TDOpModes.MODE_TREA.value, 0) td_simulator.td_tx_state( TDTreatmentStates.TREATMENT_DIALYSIS_STATE.value, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -197,7 +177,7 @@ waitFor(lambda: bloodSetAutoEject == True, 10000), "Testing UI -> TD message Auto Eject" ) - td_simulator.td_blood_set_auto_eject_response(1) + td_simulator.td_blood_set_auto_eject_response(0,1) auto_eject_reject_notification = utility.findChildByText( post_treatment, config.BLOOD_SET_AUTO_EJECT_REJECTION ) @@ -209,7 +189,7 @@ test.compare(1, digit_int, f"Rejection reason number comparison for reason {1}") test.log(f"Rejection reason text is {auto_eject_reject_notification_text}") - td_simulator.td_blood_set_auto_eject_response(0) + td_simulator.td_blood_set_auto_eject_response(0,0) td_simulator.td_operation_mode(TDOpModes.MODE_INIT.value, 0) navigation.navigate_to_device_settings_using_service_password() @@ -229,15 +209,13 @@ main_menu_container = waitForObject(names.o_mainMenu_MainMenu, 2000) mouseClick(utility.findChildByText(main_menu_container, config.PRESCRIPTIONS)) mouseClick(utility.findChildByText(main_menu_container, config.TREATMENT)) - mouseClick(waitForObject(names.o_createTreatmentRect_TouchRect, 2000)) td_simulator.td_operation_mode(TDOpModes.MODE_PRET.value) pre_treatment = waitForObjectExists( names.o_preTreatmentStack_PreTreatmentStack, 3000 ) - mouseClick(utility.findChildByText(pre_treatment, config.AUTO_LOAD)) - td_simulator.td_blood_set_auto_load_response(0) mouseClick(utility.setObjectText(names.o_preTreatmentStack_Text, config.NEXT)) - test.endSection() \ No newline at end of file + test.endSection() + \ No newline at end of file