Index: suite_leahi/tst_create_treatment/test.py =================================================================== diff -u -r7d316b6ea5f8bfeeea912930b6ab587ec8ad5868 -r0917bcb39a7346b452e56e961d19c928a71ef608 --- suite_leahi/tst_create_treatment/test.py (.../test.py) (revision 7d316b6ea5f8bfeeea912930b6ab587ec8ad5868) +++ suite_leahi/tst_create_treatment/test.py (.../test.py) (revision 0917bcb39a7346b452e56e961d19c928a71ef608) @@ -216,7 +216,7 @@ utility.set_value_based_on_target(names.o_PreTreatmentCreate_heparinStopTimeControl_ValueAdjuster, 90) test.compare(waitForObjectExists(names.o_PreTreatmentCreate_heparinStopTimeControl_ValueAdjuster).value,90.0) obj = waitForObject(names.o_PreTreatmentCreate_heparinStopTimeControl_ValueAdjuster) - right_arrow =utility.findObjectById(object,obj ,"_rightArrow") + right_arrow =utility.findObjectById(obj ,"_rightArrow") test.compare(not right_arrow.enabled, True, "Right arrow is disabled in Heparin stop time field") utility.set_value_based_on_target(names.o_PreTreatmentCreate_heparinDispensingRateControl_ValueAdjuster, "0.2") @@ -245,7 +245,7 @@ mouseClick(waitForObject(names.o_potassium_leftArrow_IconButton)) mouseClick(waitForObject(names.o_calcium_leftArrow_IconButton)) mouseClick(waitForObject(names.o_saveButton_TouchRect)) - utility.select_different_dropdowndropdown(names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox,ACID_CONCENTRATE,0) + utility.select_different_dropdown(names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox,ACID_CONCENTRATE,0) test.compare(waitForObject(names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox).currentText, ACID_CONCENTRATE[0], "Acid concentrate value should be :"+str(ACID_CONCENTRATE[0])) utility.select_different_dropdown(names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox,ACID_CONCENTRATE,1) test.compare(waitForObject(names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox).currentText, ACID_CONCENTRATE[1], "Acid concentrate value should be :"+str(ACID_CONCENTRATE[1])) @@ -275,7 +275,7 @@ test.endSection() utility.select_different_dropdown(names.o_PreTreatment_vitalsCombobox_BaseCombobox,VITALS,2) - select_different_dropdown(names.o_PreTreatmentCreate_bicarbonateConcentrateComboBox_BaseComboBox,BICARBONATE,0) + utility.select_different_dropdown(names.o_PreTreatmentCreate_bicarbonateConcentrateComboBox_BaseComboBox,BICARBONATE,0) test.verify(waitForObjectExists(names.o_PreTreatmentCreate_qrCode_Image), "QR Code is visible") #Verify all the parameters are populated test.compare(waitForObject(names.o_PreTreatmentCreate_bloodFlowRateControl_ValueAdjuster).value, 500) @@ -287,10 +287,32 @@ test.compare(waitForObject(names.o_PreTreatmentCreate_dialysateTemperatureControl_ValueAdjuster).value, 38.0) test.compare(waitForObject(names.o_PreTreatmentCreate_salineBolusVolumeControl_ValueAdjuster).value, 300) - + + confirmButton = waitForObject(names.o_PreTreatmentButton) test.compare(confirmButton.enabled, True, "Confirm button is enabled") mouseClick(waitForObject(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, + vTrancembrncPressureLimitWindowRejectReason = 0, + vDialysateTempRejectReason = 0, + vHeparinDispensingRateRejectReason = 0, + vHeparinBolusVolumeRejectReason = 0 + ) td.td_operation_mode(TDOpModes.MODE_PRET.value, 0) test.endSection() @@ -322,7 +344,7 @@ ) utils.waitForGUI(3) mouseClick(waitForObjectExists(names.o_PreTreatmentButton)) - select_different_dropdown(names.o_prescription_menuButton,BUTTON_TYPE,0) + utility.select_different_dropdown(names.o_prescription_menuButton,BUTTON_TYPE,0) test.startSection("Verification of blood flow values") test.compare(waitForObject(names.o_PreTreatmentCreate_bloodFlowRate_LabelUnitContainer).text, BLOOD_FLOW_RATE, "Parameter should be -> "+str(BLOOD_FLOW_RATE)) for blood_flow_rate in CREATE_TREATMENT_PARAMETER[BLOOD_FLOW_RATE]: @@ -409,7 +431,7 @@ ) utils.waitForGUI(1) mouseClick(waitForObjectExists(names.o_PreTreatmentButton)) - select_different_dropdown(names.o_prescription_menuButton,BUTTON_TYPE,2) + utility.select_different_dropdown(names.o_prescription_menuButton,BUTTON_TYPE,2) button = waitForObjectExists(names.o_PreTreatmentButton) test.verify(not button.enabled, "Validate that the button is disabled") test.endSection() @@ -446,7 +468,7 @@ for expected_treatment_title,object in zip(CREATE_TREATMENT_PARAMETERS,CREATE_TREATEMENT_OBJ): - parameter_object = utility.set_parameter_type(text = expected_treatment_title,obj =object) + parameter_object = utility.set_property_text(text = expected_treatment_title,obj =object) parameter_text = waitForObject(parameter_object) parameter_text_color = parameter_text.border.color.name test.compare(COLOR_CODES, parameter_text_color, "parameter color should be ' \red for' " + expected_treatment_title +" , if the confirmation get rejected !") @@ -457,7 +479,6 @@ test.startSection("Verifying slider functionality of custom treatment") td.td_operation_mode(TDOpModes.MODE_STAN.value) td.td_operation_mode(TDOpModes.MODE_TPAR.value, 0 ) - utils.waitForGUI(5) utility.set_value_with_slider(names.o_PreTreatmentCreate_bloodFlowRateControl_ValueAdjuster,names.o_PreTreatmentCreate_bloodFlowRate_slider_Slider,BLOOD_FLOW_RATE) utility.set_value_with_slider(names.o_PreTreatmentCreate_dialysateFlowRateControl_ValueAdjuster,names.o_PreTreatmentCreate_dialysateFlowRate_slider_Slider,DIALYSATE_FLOW_RATE) utility.set_value_with_slider(names.o_PreTreatmentCreate_durationControl_ValueAdjuster,names.o_PreTreatmentCreate_duration_slider_Slider,DURATION)