Index: suite_leahi/shared/scripts/names.py =================================================================== diff -u -r0130028593cbcfc6ec7e97af4b4c48f26b96898b -r84fec1666e63db5d9cf5ab57113c467376aca2d6 --- suite_leahi/shared/scripts/names.py (.../names.py) (revision 0130028593cbcfc6ec7e97af4b4c48f26b96898b) +++ suite_leahi/shared/scripts/names.py (.../names.py) (revision 84fec1666e63db5d9cf5ab57113c467376aca2d6) @@ -233,11 +233,7 @@ o_tmpWindow_LabelUnitValueAdjuster = {"container": o_Overlay, "objectName": "_tmpWindow", "type": "LabelUnitValueAdjuster" } o_PreTreatmentSampleStack_button_TouchRect = {"container": o_preTreatmentStack_PreTreatmentSampleStack_PreTreatmentWaterSample, "id": "_button", "type": "TouchRect", "unnamed": 1 } o_preTreatmentStack_repeater_Repeater = {"container": o_preTreatmentStack_PreTreatmentStack, "id": "repeater", "type": "Repeater", "unnamed": 1 } -# o_preTreatmentStack_gridSteps_Grid = {"container": o_preTreatmentStack_PreTreatmentStack, "id": "_gridSteps", "type": "Grid", "unnamed": 1, "visible": True} -# o_preTreatmentStack_gridSteps_Grid_2 = {"container": o_preTreatmentStack_PreTreatmentStack, "id": "_gridSteps", "occurrence": 2, "type": "Grid", "unnamed": 1, "visible": True} o_PreTreatmentCreate_bpMeasurementIntervalControl_ValueAdjusterCustom = {"container": o_preTreatmentStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_bpMeasurementIntervalControl", "type": "ValueAdjusterCustom", "unnamed": 1 } - -# o_preTreatmentStack_Validate_Text = {"container": o_preTreatmentStack_PreTreatmentStack, "text": "Validate", "type": "Text", "unnamed": 1, "visible": True} o_notification_bar = {"container": o_Overlay, "objectName": "NotificationBar", "type": "NotificationBarSmall" } o_treatmentHome_editButton_IconButton = {"container": mainTreatmentScreen, "id": "_editButton", "type": "IconButton", "unnamed": 1 } o_treatmentHome_treatmentPressures_TreatmentPressures = {"container": mainTreatmentScreen, "objectName": "treatmentPressures", "type": "TreatmentPressures" } @@ -255,8 +251,6 @@ o_timeElapsed_LabelUnitText = {"container": o_Overlay, "objectName": "_timeElapsed", "type": "LabelUnitText" } o_newTreatmentDuration_LabelUnitValueAdjuster = {"container": o_Overlay, "objectName": "_newTreatmentDuration", "type": "LabelUnitValueAdjuster" } o_preTreatmentStack_confirmButton_ConfirmButton = {"container": o_preTreatmentStack_PreTreatmentStack, "objectName": "_confirmButton", "type": "ConfirmButton" , "visible": True } -# o_preTreatmentStack_titleBar_StepNavigationTitleBar = {"container": o_preTreatmentStack_PreTreatmentStack, "id": "_titleBar", "type": "StepNavigationTitleBar", "unnamed": 1} -# o_preTreatmentStack_mouseArea_MouseArea = {"container": o_preTreatmentStack_PreTreatmentStack, "id": "_mouseArea", "occurrence": 2, "type": "MouseArea", "unnamed": 1, "visible": True} o_ufRate_LabelUnitText = {"container": o_Overlay, "objectName": "_ufRate", "type": "LabelUnitText" } o_newTreatmentDuration_LabelUnitText = {"container": o_Overlay, "objectName": "_newTreatmentDuration", "type": "LabelUnitText" } Index: suite_leahi/tst_edit_parameters/test.py =================================================================== diff -u -r0130028593cbcfc6ec7e97af4b4c48f26b96898b -r84fec1666e63db5d9cf5ab57113c467376aca2d6 --- suite_leahi/tst_edit_parameters/test.py (.../test.py) (revision 0130028593cbcfc6ec7e97af4b4c48f26b96898b) +++ suite_leahi/tst_edit_parameters/test.py (.../test.py) (revision 84fec1666e63db5d9cf5ab57113c467376aca2d6) @@ -62,11 +62,11 @@ bloodflowrate = None dialysateflow = None dialysatetemp = None -bloodFlowrate = 0 +bloodFlowrate = None dialtemperature = None dialflow = 0 durationvalue = 0 -durationconfirm = 0 +durationconfirm = None @@ -395,7 +395,12 @@ bloodFlow = utility.get_object_from_names(names.o_blood_flow_value) bloodFlow_properties = object.properties(bloodFlow) changedbloodflow = bloodFlow_properties["value"] - + if can_interface is not None: + channel_id = CAN.DenaliChannels.ui_to_td_ch_id + message_id = MsgIds.MSG_ID_UI_TREATMENT_SET_POINT_BLOOD_FLOW_CHANGE_REQUEST.value + can_interface.register_receiving_publication_function(channel_id, + message_id, + handle_bloodflow_request) # handle_bloodflow_request(MsgIds.MSG_ID_UI_TREATMENT_SET_POINT_BLOOD_FLOW_CHANGE_REQUEST.value) test.verify(waitFor( lambda: bloodFlowrate == changedbloodflow+10, 10000), "Testing FW received blood flow Value in main treatment screen") @@ -425,7 +430,7 @@ message_id, handle_dialflow_request) - test.verify(waitFor( lambda: dialflow == changeddialflow+5, 10000), "Testing FW received dial flow Value in main treatment screen") + test.verify(waitFor( lambda: dialflow == changeddialflow+5, 3000), "Testing FW received dial flow Value in main treatment screen") dialysateflowdownarrowbutton = utility.findObjectById(dialysateflowuparrow,"_downArrowIcon") mouseClick(dialysateflowdownarrowbutton) @@ -439,7 +444,7 @@ message_id, handle_dialflow_request) - test.verify(waitFor( lambda: dialflow == changeddialflow-20, 10000), "Testing FW received dial flow Value in main treatment screen") + test.verify(waitFor( lambda: dialflow == changeddialflow-20, 3000), "Testing FW received dial flow Value in main treatment screen") dialysatetmpuparrow = waitForObject(names.o_dial_tmp_value) @@ -455,7 +460,7 @@ message_id, handle_dialtmp_request) - test.verify(waitFor( lambda: dialtemperature == changeddialtmp+0.5, 20000), "Testing FW received dial tmp Value in main treatment screen") + test.verify(waitFor( lambda: dialtemperature == changeddialtmp+0.5, 3000), "Testing FW received dial tmp Value in main treatment screen") dialysatetmpdownarrowbutton = utility.findObjectById(dialysatetmpuparrow,"_downArrowIcon") mouseClick(dialysatetmpdownarrowbutton) @@ -469,7 +474,7 @@ message_id, handle_dialtmp_request) - test.verify(waitFor( lambda: dialtemperature == changeddialtmp-0.5, 30000), "Testing FW received dial tmp Value in main treatment screen") + test.verify(waitFor( lambda: dialtemperature == changeddialtmp-0.5, 3000), "Testing FW received dial tmp Value in main treatment screen") #rejection reason is 1 @@ -509,26 +514,26 @@ message_id, handle_bloodflow_request) - test.verify(waitFor( lambda: bloodFlowrate == 100, 40000), "Testing FW received blood flow Value in main treatment screen") + test.verify(waitFor( lambda: bloodFlowrate == 100, 3000), "Testing FW received blood flow Value in main treatment screen") dialysateflowuparrow = waitForObject(names.o_dial_flow_value) dialysateflowuparrowbutton = utility.findObjectById(dialysateflowuparrow,"_upArrowIcon") mouseClick(dialysateflowuparrowbutton) if can_interface is not None: channel_id = CAN.DenaliChannels.ui_to_td_ch_id - message_id = MsgIds.MSG_ID_TD_TREATMENT_SET_POINT_DIALYSATE_FLOW_CHANGE_RESPONSE.value + message_id = MsgIds.MSG_ID_UI_TREATMENT_SET_POINT_DIALYSATE_FLOW_CHANGE_REQUEST.value can_interface.register_receiving_publication_function(channel_id, message_id, handle_bloodflow_request) - test.verify(waitFor( lambda: dialflow == 100, 40000), "Testing FW received dial flow Value in main treatment screen") + test.verify(waitFor( lambda: dialflow == 100, 3000), "Testing FW received dial flow Value in main treatment screen") dialysatetempuparrow = waitForObject(names.o_dial_tmp_value) dialysatetempuparrowbutton = utility.findObjectById(dialysatetempuparrow,"_upArrowIcon") mouseClick(dialysatetempuparrowbutton) if can_interface is not None: channel_id = CAN.DenaliChannels.ui_to_td_ch_id - message_id = MsgIds.MSG_ID_TD_TREATMENT_SET_POINT_DIALYSATE_TEMPERATURE_CHANGE_RESPONSE.value + message_id = MsgIds.MSG_ID_UI_TREATMENT_SET_POINT_DIALYSATE_TEMPERATURE_CHANGE_REQUEST.value can_interface.register_receiving_publication_function(channel_id, message_id, handle_bloodflow_request) @@ -562,9 +567,13 @@ utility.set_value_based_on_target(names.o_newTreatmentDuration_LabelUnitValueAdjuster,300) mouseClick(names.o_continueButton_TouchRect) + td.td_duration_validate_response(vRejectionReason =0, + vDuration= 0, + vUFVolume= 0.0, + vUFRate= 0.0) if can_interface is not None: channel_id = CAN.DenaliChannels.ui_to_td_ch_id - message_id = MsgIds.MSG_ID_TD_DURATION_VALIDATE_RESPONSE.value + message_id = MsgIds.MSG_ID_UI_DURATION_VALIDATE_REQUEST.value can_interface.register_receiving_publication_function(channel_id, message_id, handle_duration_request) @@ -580,13 +589,13 @@ 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")) td.td_duration_validate_response(vRejectionReason =0, vDuration= 78, - vUFVolume= 0.9, + vUFVolume= 0.5, vUFRate= 0.6) #check the values in the ui newufrate = waitForObject(names.o_ufRate_LabelUnitText).value - test.compare(newufrate,0.60,"Duration value is updated in"+str(newufrate)) + test.compare(newufrate,"0.60","Duration value is updated in"+str(newufrate)) newduration = waitForObject(names.o_newTreatmentDuration_LabelUnitText).value - test.compare(int(newduration),78,"UF rate value is updated in"+str(newduration)) + test.compare(newduration,"78","UF rate value is updated in"+str(newduration)) payload = conversions.integer_to_bytearray(0) payload += conversions.integer_to_bytearray(1) @@ -611,14 +620,15 @@ parameters_payload= payload) if can_interface is not None: channel_id = CAN.DenaliChannels.ui_to_td_ch_id - message_id = MsgIds.MSG_ID_TD_DURATION_CONFIRM_RESPONSE.value + message_id = MsgIds.MSG_ID_UI_DURATION_CONFIRM_REQUEST.value can_interface.register_receiving_publication_function(channel_id, message_id, handle_duration_confirm_request) - test.verify(waitFor( lambda: durationconfirm == 78, 50000), "Testing FW received duration Value in main treatment screen") + test.verify(waitFor( lambda: durationconfirm == 78, 5000), "Testing FW received duration Value in main treatment screen") treatmentpopup = waitFor(lambda: not object.exists(names.o_HeaderBar_WiFi_Popup), 3000) - test.compare(treatmentpopup, True, "Popup is not present") + test.compare(treatmentpopup, True, "Popup is not present") + test.endSection() def main():