Index: suite_leahi/shared/scripts/configuration/config.py =================================================================== diff -u -r1b4a8409464a1d775122829f582e0873fe1a0a58 -r34c323eff3ef9a472dfc6dc83bd1b2015fb3fcc2 --- suite_leahi/shared/scripts/configuration/config.py (.../config.py) (revision 1b4a8409464a1d775122829f582e0873fe1a0a58) +++ suite_leahi/shared/scripts/configuration/config.py (.../config.py) (revision 34c323eff3ef9a472dfc6dc83bd1b2015fb3fcc2) @@ -63,10 +63,10 @@ DISABLED = False #Create Rx -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"] +ACID_CONCENTRATE = ["1.0 K, 2.50 Ca","2.0 K, 2.50 Ca","3.0 K, 2.50 Ca"] 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"] +BICARBONATE = ["650 g","720 g","760 g", "900 g", "1100 g","1250 g"] #Heparin heparin_off = { "Heparin Type" :"OFF", Index: suite_leahi/shared/scripts/configuration/utility.py =================================================================== diff -u -r4b929ef6eef32479f10e84325b0ad12173474a4d -r34c323eff3ef9a472dfc6dc83bd1b2015fb3fcc2 --- suite_leahi/shared/scripts/configuration/utility.py (.../utility.py) (revision 4b929ef6eef32479f10e84325b0ad12173474a4d) +++ suite_leahi/shared/scripts/configuration/utility.py (.../utility.py) (revision 34c323eff3ef9a472dfc6dc83bd1b2015fb3fcc2) @@ -161,15 +161,15 @@ target_value = target_value # Wait for all objects - parent_obj = squish.waitForObjectExists(obj) + parent_obj = squish.waitForObject(obj) # change range as per your screen count left_arrow = findObjectById(parent_obj, "_leftArrow") right_arrow =findObjectById(parent_obj, "_rightArrow") # Read current value (supports invisible text too) - current_value = round(float(squish.findObject(obj).value),1) + current_value = round(float(squish.waitForObject(obj).value), 1) # Determine direction while current_value != float(target_value): @@ -179,11 +179,11 @@ elif current_value > float(target_value): squish.mouseClick(squish.waitForObject(left_arrow)) - current_value = round(float(squish.findObject(obj).value),1) + current_value = round(float(squish.waitForObject(obj).value), 1) test.log(f"Updated value: {current_value}") - test.log(f"✅ Target value reached: {current_value}") + test.log(f"✅ Target value reached: {current_value}") def select_different_dropdown(object,type,whichTypeIndex): """ Index: suite_leahi/shared/scripts/names.py =================================================================== diff -u -r1b4a8409464a1d775122829f582e0873fe1a0a58 -r34c323eff3ef9a472dfc6dc83bd1b2015fb3fcc2 --- suite_leahi/shared/scripts/names.py (.../names.py) (revision 1b4a8409464a1d775122829f582e0873fe1a0a58) +++ suite_leahi/shared/scripts/names.py (.../names.py) (revision 34c323eff3ef9a472dfc6dc83bd1b2015fb3fcc2) @@ -361,3 +361,20 @@ o_PreTreatmentSampleStack_button_TouchRect = {"container": o_PreTreatmentSampleStack_PreTreatmentWaterSample, "id": "_button", "type": "TouchRect", "unnamed": 1 } o_preTreatmentStack_repeater_Repeater = {"container": o_preTreatmentStack_PreTreatmentStack, "id": "repeater", "type": "Repeater", "unnamed": 1 } +#New design create Rx +o_createHDTreatment_TouchRect = {"container": o_standByScreen_MainHome, "id": "_createHDTreatment", "type": "TouchRect", "unnamed": 1 } +o_PreTreatmentCreate_leftColumn_Column = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_leftColumn", "type": "Column", "unnamed": 1 } +o_PreTreatmentCreate_rightColumn_Column = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_rightColumn", "type": "Column", "unnamed": 1 } +o_LabelUnitValueAdjuster_LabelUnitValueAdjuster = {"container": o_Overlay, "objectName": "_LabelUnitValueAdjuster", "type": "LabelUnitValueAdjuster" } +o_heparinDispensingRate_LabelUnitValueAdjuster = {"container": o_Overlay, "objectName": "_LabelUnitValueAdjuster", "id": "_heparinDispensingRate", "type": "LabelUnitValueAdjuster" } +o_heparinDeliveryDuration_LabelUnitValueAdjuster = {"container": o_Overlay, "objectName": "_LabelUnitValueAdjuster", "id": "_heparinDeliveryDuration", "type": "LabelUnitValueAdjuster" } +o_PreTreatmentCreate_leftColumn_Column_2 = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_leftColumn", "type": "Column", "unnamed": 1 } +o_PreTreatmentCreate_rightColumn_Column_2 = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_rightColumn", "type": "Column", "unnamed": 1 } +o_PreTreatmentCreate_sodium_LabelUnitValueAdjuster = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_sodium", "objectName": "_LabelUnitValueAdjuster", "type": "LabelUnitValueAdjuster" } +o_PreTreatmentCreate_bicarbonate_LabelUnitValueAdjuster = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_bicarbonate", "objectName": "_LabelUnitValueAdjuster", "type": "LabelUnitValueAdjuster" } +o_PreTreatmentCreate_fluidBolusVolume_LabelUnitValueAdjuster = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_fluidBolusVolume", "objectName": "_LabelUnitValueAdjuster", "type": "LabelUnitValueAdjuster" } +o_PreTreatmentCreate_primeRinsebackVolume_LabelUnitValueAdjuster= {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_primeRinsebackVolume", "objectName": "_LabelUnitValueAdjuster", "type": "LabelUnitValueAdjuster" } +o_PreTreatmentCreate_listView_ListView = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_listView", "type": "ListView", "unnamed": 1 } +o_createHDFTreatment_TouchRect = {"container": o_standByScreen_MainHome, "id": "_createHDFTreatment", "type": "TouchRect", "unnamed": 1 } +o_PreTreatmentCreate_hdfTreatmentMode_LabelUnitContainer = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_hdfTreatmentMode", "type": "LabelUnitContainer", "unnamed": 1 } +o_PreTreatmentCreate_treatmentModalityComboBox_BaseComboBox = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_treatmentModalityComboBox", "type": "BaseComboBox", "unnamed": 1 } 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