Index: suite_leahi/shared/scripts/configuration/config.py =================================================================== diff -u -r3077f8ad57d86a83814a8fe050182f82a61165a7 -r8534abdc1890b7d5c0ebbecd228ff0dd72982798 --- suite_leahi/shared/scripts/configuration/config.py (.../config.py) (revision 3077f8ad57d86a83814a8fe050182f82a61165a7) +++ suite_leahi/shared/scripts/configuration/config.py (.../config.py) (revision 8534abdc1890b7d5c0ebbecd228ff0dd72982798) @@ -167,42 +167,15 @@ "Close the blood pump door.", ] INSTALLATION_STEPPER_2_PAGE_TITLE = "Install Bloodlines" -INSTALL_BLOODLINES_CONTENTS = [ - "Insert saline line into the first slot.", - "Insert arterial line into the second slot.", - "Ensure the venous line is placed in the bubble detector.", - "Insert the venous line into the third slot.", - "Connect the arterial and venous bloodlines using the recirculation connector.", -] INSTALLATION_STEPPER_3_PAGE_TITLE = "Install Pressure Lines and Dialyzer" -INSTALL_PRESSURE_LINES_CONTENTS = [ - "Connect the arterial pressure line to the arterial pressure transducer port.", - "Connect the venous pressure line to the venous pressure transducer port.", - "Insert dialyzer into the holder and connect the dialysate lines.", - "Connect the bloodlines to the dialyzer.", - "Clamp the venous chamber line.", - "Clamp the heparin line.", -] +INSTALLATION_STEPPER_4_PAGE_TITLE = "Connect Saline Bag" SELF_TESTS_PAGE_CONTENTS = [ - "Auto-Load Blood Tubing", - "Cartridge Install Checks", + "Auto-Load Blood Tube Set", + "Blood Tube Set Verification", "Pressure Leak Check", ] -SALINE_PAGE_TITLE = "Connect Saline Bag" -SALINE_PAGE_CONTENTS = [ - "Hang saline bag on the hook.", - "Clamp saline line.", - "Use the saline line to spike saline bag.", - "Unclamp saline line.", -] PRIME_PAGE_CONTENTS = ["Blood Tubing Circuit Priming", "Dialysate Circuit Priming"] CONNECT_PAGE_TITLE = "Connect Bloodlines to the Patient" -CONNECT_PAGE_CONTENTS = [ - "Clamp arterial and venous bloodlines (2 clamps).", - "Remove recirculation connector from the bloodlines.", - "Connect bloodlines to patient access lines.", - "Unclamp arterial and venous bloodlines (2 clamps).", -] DISCONNECT_PAGE_TITLE = "Remove Concentrates and Blood Tubing Set" DISCONNECT_PAGE_CONTENTS = [ "Remove blood tubing set and dialyzer.", @@ -211,6 +184,6 @@ INSTALLATION_PAGE_TITLE = "Install Concentrates and Blood Tubing Set" INSTALLATION_PAGE_CONTENTS = [ "Install acid and bicarbonate concentrates.", - "Install blood tubing set and dialyzer.", + "Install blood tubing set, dialyzer, and saline bag.", ] START_TREATMENT_REJECTION_NOTIFICATION = "[1] Request is not allowed in the current operating mode" Index: suite_leahi/shared/scripts/names.py =================================================================== diff -u -r3077f8ad57d86a83814a8fe050182f82a61165a7 -r8534abdc1890b7d5c0ebbecd228ff0dd72982798 --- suite_leahi/shared/scripts/names.py (.../names.py) (revision 3077f8ad57d86a83814a8fe050182f82a61165a7) +++ suite_leahi/shared/scripts/names.py (.../names.py) (revision 8534abdc1890b7d5c0ebbecd228ff0dd72982798) @@ -379,3 +379,8 @@ 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 } + +o_pretreatmentInstallation_PreTreatmentBase_PreTreatmentBase_2 = {"container": o_preTreatmentStack_pretreatmentInstallation_PreTreatmentInstallStack, "objectName": "_PreTreatmentBase", "type": "PreTreatmentBase", "visible": True } +o_PreTreatmentBase_contentColumn_Column = {"container": o_pretreatmentInstallation_PreTreatmentBase_PreTreatmentBase_2, "id": "_contentColumn", "type": "Column", "unnamed": 1 } +o_preTreatmentStack_PreTreatmentBase_PreTreatmentBase_2 = {"container": o_preTreatmentStack_PreTreatmentStack, "objectName": "_PreTreatmentBase", "type": "PreTreatmentBase", "visible": True } +o_PreTreatmentBase_contentColumn_Column_2 = {"container": o_preTreatmentStack_PreTreatmentBase_PreTreatmentBase_2, "id": "_contentColumn", "type": "Column", "unnamed": 1 } Index: suite_leahi/tst_pre_treatment_foundation/test.py =================================================================== diff -u -r80c156369f3fe3fee359b0ad651db28ee18137e5 -r8534abdc1890b7d5c0ebbecd228ff0dd72982798 --- suite_leahi/tst_pre_treatment_foundation/test.py (.../test.py) (revision 80c156369f3fe3fee359b0ad651db28ee18137e5) +++ suite_leahi/tst_pre_treatment_foundation/test.py (.../test.py) (revision 8534abdc1890b7d5c0ebbecd228ff0dd72982798) @@ -86,52 +86,42 @@ ) -def set_treatment_params(blood, dial, dur, hep_vol, hep_rate, hep_stop, - acid_idx, temp, dialyzer_idx, saline, bp, bicarb_idx): - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_bloodFlowRateControl_ValueAdjuster, blood - ) - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_dialysateFlowRateControl_ValueAdjuster, dial - ) - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_durationControl_ValueAdjuster, dur - ) - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_heparinBolusVolumeControl_ValueAdjuster, hep_vol - ) - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_heparinDispensingRateControl_ValueAdjuster, hep_rate - ) - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_heparinStopTimeControl_ValueAdjuster, hep_stop - ) - utility.select_different_dropdown( - names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox, - config.ACID_CONCENTRATE, - acid_idx, - ) - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_dialysateTemperatureControl_ValueAdjuster, temp - ) - utility.select_different_dropdown( - names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox, - config.DIALYZER_TYPE, - dialyzer_idx, - ) - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_salineBolusVolumeControl_ValueAdjuster, saline - ) - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_bpMeasurementIntervalControl_ValueAdjusterCustom, bp - ) - utility.select_different_dropdown( - names.o_PreTreatmentCreate_bicarbonateConcentrateComboBox_BaseComboBox, - config.BICARBONATE, - bicarb_idx, - ) +def set_treatment_params(): + 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) + - def verify_start_treatment_request(): click_text(None, config.START) test.verify( @@ -156,7 +146,6 @@ # --- Flow 1: Full Pre-Treatment --- td_simulator.td_operation_mode(TDOpModes.MODE_STAN.value) - mouseClick(waitForObject(names.o_createTreatmentRect_TouchRect, 3000)) td_simulator.td_operation_mode(TDOpModes.MODE_PRET.value) # Concentrates @@ -193,18 +182,33 @@ config.INSTALLATION_STEPPER_2_PAGE_TITLE, "Installation Page Stepper 2", ) - for content in config.INSTALL_BLOODLINES_CONTENTS[1:5]: - click_text(None, content) + content_column = waitForObjectExists(names.o_PreTreatmentBase_contentColumn_Column) + values = utility.findAllObjectsById(content_column, "_message") + for content in values[1:5]: + mouseClick(content) click_next() wait_compare_text( names.o_preTreatmentStack_Text, config.INSTALLATION_STEPPER_3_PAGE_TITLE, "Installation Page Stepper 3", ) - for content in config.INSTALL_PRESSURE_LINES_CONTENTS[1:7]: - click_text(None, content) + content_column = waitForObjectExists(names.o_PreTreatmentBase_contentColumn_Column) + values = utility.findAllObjectsById(content_column, "_message") + for content in values[1:6]: + mouseClick(content) click_next() + + wait_compare_text( + names.o_preTreatmentStack_Text, + config.INSTALLATION_STEPPER_4_PAGE_TITLE, + "Installation Page Stepper 4", + ) + content_column = waitForObjectExists(names.o_PreTreatmentBase_contentColumn_Column) + values = utility.findAllObjectsById(content_column, "_message") + for content in values[1:3]: + mouseClick(content) + click_next() # Self Tests for content in config.SELF_TESTS_PAGE_CONTENTS: @@ -216,16 +220,6 @@ ) click_next() - # Saline - wait_compare_text( - names.o_preTreatmentStack_Text, - config.SALINE_PAGE_TITLE, - "Saline Page Title Text", - ) - for content in config.SALINE_PAGE_CONTENTS[1:5]: - mouseClick(utility.setObjectText(names.o_preTreatmentStack_Text, content)) - click_next() - # Prime for content in config.PRIME_PAGE_CONTENTS: obj = waitForObjectExists( @@ -235,25 +229,23 @@ click_next() # Create Rx Flow 1 - set_treatment_params(50, 50, 60, "0.2", "0.2", 60, 2, 37.0, 2, 100, 6.0, 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) - ) + set_treatment_params() # Connect wait_compare_text( names.o_preTreatmentStack_Text, config.CONNECT_PAGE_TITLE, "Connect Page Title Text", ) - for content in config.CONNECT_PAGE_CONTENTS[1:5]: - click_text(None, content) - + content_column = waitForObjectExists(names.o_PreTreatmentBase_contentColumn_Column_2) + values = utility.findAllObjectsById(content_column, "_message") + for content in values[1:3]: + mouseClick(content) + verify_start_treatment_request() + # click_next() + # for content in config.CONNECT_PAGE_CONTENTS[1:5]: + # click_text(None, content) td_simulator.td_operation_mode(TDOpModes.MODE_INIT.value, 0) @@ -278,7 +270,6 @@ ) mouseClick(treatment_menu) - mouseClick(waitForObject(names.o_createTreatmentRect_TouchRect, 3000)) td_simulator.td_operation_mode(TDOpModes.MODE_PRET.value) wait_compare_text( @@ -300,14 +291,6 @@ ) click_next() - # Saline - wait_compare_text( - names.o_preTreatmentStack_Text, - config.SALINE_PAGE_TITLE, - "Saline Page Title Text", - ) - click_next() - # Prime for content in config.PRIME_PAGE_CONTENTS: obj = waitForObjectExists( @@ -317,14 +300,7 @@ click_next() # Create Rx Flow 2 - set_treatment_params(60, 75, 75, "0.3", "0.3", 60, 2, 38.0, 2, 200, 3.0, 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) - ) + set_treatment_params() wait_compare_text( names.o_preTreatmentStack_Text,