Index: suite_leahi/shared/scripts/configuration/navigation.py =================================================================== diff -u -r0130028593cbcfc6ec7e97af4b4c48f26b96898b -r3b1585c8cf24c14498f1ebd55f571d09f55e472e --- suite_leahi/shared/scripts/configuration/navigation.py (.../navigation.py) (revision 0130028593cbcfc6ec7e97af4b4c48f26b96898b) +++ suite_leahi/shared/scripts/configuration/navigation.py (.../navigation.py) (revision 3b1585c8cf24c14498f1ebd55f571d09f55e472e) @@ -36,8 +36,6 @@ ), ) - - def get_ini_value(conf_path: str , section: str, key: str): """ Method to get the advanced option from the System.conf file @@ -66,40 +64,29 @@ """ test.startSection("Method to navigation in the pretreatment page ") + stepId = squish.waitForObjectExists(names.o_preTreatmentStack_stepIndicator_StepIndicator) + stepnames = utility.findAllObjectsById(stepId, "_text") value = get_ini_value("/home/denali/Public/luis/config/configurations/Settings/System.conf", section ="AdvancedMode", key ="AdvancedMode") + standard = stepnames[1:] if value == "0": + standard = stepnames[3:] Nextbutton = utility.setObjectText(obj =names.o_preTreatmentStack_Text, text =config.NEXT) squish.mouseClick(squish.waitForObject(Nextbutton)) - autoLoadbutton = utility.setObjectText(obj =names.o_preTreatmentStack_Text, text ="Auto Load") - squish.mouseClick(squish.waitForObject(autoLoadbutton)) - td_simulator.td_blood_set_auto_load_response(vRejectionReason = 0) - stepId = squish.waitForObjectExists(names.o_preTreatmentStack_stepIndicator_StepIndicator) - values = utility.findAllObjectsById(stepId, "_text") - for input_field in values[3:]: - test.log(str(input_field.text)) - if str(input_field.text) == "Water Sample": - squish.mouseClick(squish.waitForObject(names.o_PreTreatmentSampleStack_button_TouchRect)) - if str(input_field.text) == vStep_name: - break - else: - Nextbutton = utility.setObjectText(obj =names.o_preTreatmentStack_Text, text =config.NEXT) - squish.mouseClick(Nextbutton) - else: - autoLoadbutton = utility.setObjectText(obj =names.o_preTreatmentStack_Text, text ="Auto Load") - squish.mouseClick(squish.waitForObject(autoLoadbutton)) - td_simulator.td_blood_set_auto_load_response(vRejectionReason = 0) - stepId = squish.waitForObjectExists(names.o_preTreatmentStack_stepIndicator_StepIndicator) - values = utility.findAllObjectsById(stepId, "_text") - for input_field in values[3:]: - test.log(str(input_field.text)) - if str(input_field.text) == "Water Sample": - squish.mouseClick(waitForObject(names.o_PreTreatmentSampleStack_button_TouchRect)) + + autoLoadbutton = utility.setObjectText(obj =names.o_preTreatmentStack_Text, text ="Auto Load") + squish.mouseClick(squish.waitForObject(autoLoadbutton)) + td_simulator.td_blood_set_auto_load_response(vRejectionReason = 0) + stepId = squish.waitForObjectExists(names.o_preTreatmentStack_stepIndicator_StepIndicator) + values = utility.findAllObjectsById(stepId, "_text") + for input_field in standard: + test.log(str(input_field.text)) + if str(input_field.text) == "Water Sample": + squish.mouseClick(squish.waitForObject(names.o_PreTreatmentSampleStack_button_TouchRect)) - if str(input_field.text) == vStep_name: - break - else: - Nextbutton = utility.setObjectText(obj =names.o_preTreatmentStack_Text, text =config.NEXT) - squish.mouseClick(Nextbutton) + if str(input_field.text) == vStep_name: + break + else: + Nextbutton = utility.setObjectText(obj =names.o_preTreatmentStack_Text, text =config.NEXT) + squish.mouseClick(Nextbutton) - test.endSection() - \ No newline at end of file + test.endSection() \ No newline at end of file Index: suite_leahi/shared/scripts/configuration/utility.py =================================================================== diff -u -r0130028593cbcfc6ec7e97af4b4c48f26b96898b -r3b1585c8cf24c14498f1ebd55f571d09f55e472e --- suite_leahi/shared/scripts/configuration/utility.py (.../utility.py) (revision 0130028593cbcfc6ec7e97af4b4c48f26b96898b) +++ suite_leahi/shared/scripts/configuration/utility.py (.../utility.py) (revision 3b1585c8cf24c14498f1ebd55f571d09f55e472e) @@ -136,9 +136,11 @@ set_value_based_on_target(names.o_PreTreatmentCreate_bloodFlowRateControl_ValueAdjuster, 60) set_value_based_on_target(names.o_PreTreatmentCreate_dialysateFlowRateControl_ValueAdjuster, 75) set_value_based_on_target(names.o_PreTreatmentCreate_durationControl_ValueAdjuster, 75) - set_value_based_on_target(names.o_PreTreatmentCreate_heparinBolusVolumeControl_ValueAdjuster, 0.4) - set_value_based_on_target(names.o_PreTreatmentCreate_heparinDispensingRateControl_ValueAdjuster, 0.5) - set_value_based_on_target(names.o_PreTreatmentCreate_heparinStopTimeControl_ValueAdjuster, 60) + heparinValue =navigation.get_ini_value("/home/denali/Public/luis/config/configurations/Settings/System.conf", section ="Feature Configurations", key ="HeparinSyringePump") + if heparinValue == "1": + set_value_based_on_target(names.o_PreTreatmentCreate_heparinBolusVolumeControl_ValueAdjuster, 0.4) + set_value_based_on_target(names.o_PreTreatmentCreate_heparinDispensingRateControl_ValueAdjuster, 0.5) + set_value_based_on_target(names.o_PreTreatmentCreate_heparinStopTimeControl_ValueAdjuster, 60) select_different_dropdown(names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox,config.ACID_CONCENTRATE,2) set_value_based_on_target(names.o_PreTreatmentCreate_dialysateTemperatureControl_ValueAdjuster,37.0) select_different_dropdown(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox,config.DIALYZER_TYPE,2) @@ -167,12 +169,9 @@ vDialysateTempRejectReason = 0, vHeparinDispensingRateRejectReason = 0, vHeparinBolusVolumeRejectReason = 0 - ) - - # confirm = squish.waitFor(lambda:object.exists(names.o_preTreatmentStack_confirmButton_ConfirmButton), 3000) - # step_id = squish.waitForObjectExists(names.o_preTreatmentStack_PreTreatmentStack) - squish.mouseClick(names.o_preTreatmentStack_confirmButton_ConfirmButton) - + ) + confirm = squish.waitForObjectExists(names.o_preTreatmentStack_confirmButton_ConfirmButton, 3000) + squish.mouseClick(confirm) test.endSection() def findAllObjectsById(parent, target_id): Index: suite_leahi/tst_edit_parameters/test.py =================================================================== diff -u -r84fec1666e63db5d9cf5ab57113c467376aca2d6 -r3b1585c8cf24c14498f1ebd55f571d09f55e472e --- suite_leahi/tst_edit_parameters/test.py (.../test.py) (revision 84fec1666e63db5d9cf5ab57113c467376aca2d6) +++ suite_leahi/tst_edit_parameters/test.py (.../test.py) (revision 3b1585c8cf24c14498f1ebd55f571d09f55e472e) @@ -490,7 +490,7 @@ rejectionReason = utility.get_object_from_names(names.o_treatmentHome_notification_NotificationBarSmall) test.compare(rejectionReason.text, "[1] Request is not allowed in the current operating mode", "Rejection Reason text should be :" + str("[1] Request is not allowed in the current operating mode")) - #rejection reason is 1 + #rejection reason is 0 payload = conversions.integer_to_bytearray(1) payload += conversions.integer_to_bytearray(0) td.cmd_send_general_response(message_id =MsgIds.MSG_ID_TD_TREATMENT_SET_POINT_BLOOD_FLOW_CHANGE_RESPONSE.value,