Index: suite_leahi/tst_water_dialysate_blood_sampling/test.py =================================================================== diff -u -rb29968830a0ad7bfb6b1711404ece8e3f6b656eb -r7e1fc4c4a21e642c1bf7e36dc83120fe58347b47 --- suite_leahi/tst_water_dialysate_blood_sampling/test.py (.../test.py) (revision b29968830a0ad7bfb6b1711404ece8e3f6b656eb) +++ suite_leahi/tst_water_dialysate_blood_sampling/test.py (.../test.py) (revision 7e1fc4c4a21e642c1bf7e36dc83120fe58347b47) @@ -1,16 +1,14 @@ -# Subject/Title: LDT -2973 Heparin - SW - 02 - Q&R - 15: SIT - Software Integration Tests - Squish Qt -# Functionalities: Testing all functionalities of Heparin in the main treatment screen +# Subject/Title: LDT -3449 Water, Dialysate, and Blood Sampling - SW - 02 - Water sample & Dialysate Checks - Q&R - 15: SIT - Software Integration Tests - Squish Qt +# Functionalities: Testing all functionalities of Water, Dialysate, and Blood Sampling checks # # Steps: -# Heparin: -# 1 Navigate to create treatement and set Heparin dispensing, Heparin bolus and stop values to OFF state -# And Verify the values in heparin page -# 2 Navigate to create treatement and set Heparin dispensing, Heparin bolus and stop values to some state -# And Verify the same parameter display in Heparin page -# 3 In the Heparin page verify the different Heparin states -# Paused State -# Resume State -# Completed state +# Dialsyate and Water Sampling: +# 1 Navigate to create treatement and set Acid concentrate value +# 2 Click on Water sample option and check Water sample dialog page is visible +# 3 In the Water sample dialog check the FW recieves the result +# a. Select the Chlorine level > 0.1 mg/L value and check FW receieves the result +# b. Select the Chlorine level ≤ 0.1 mg/L value and check FW receieves the result +# 4 import names import can @@ -49,30 +47,10 @@ 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) test.endSection() - -def main(): - utils.tstStart(__file__) - startApplication(config.AUT_NAME) - can_interface = td.can_interface - global watersample - - # handle sent messages from UI - if can_interface is not None: - channel_id = CAN.DenaliChannels.ui_to_td_ch_id - message_id = MsgIds.MSG_ID_UI_WATER_SAMPLE_RESULT_REQUEST.value - can_interface.register_receiving_publication_function(channel_id, - message_id, - handle_water_sample_request) - - test.startSection("Navigate to the create Rx page and set the acid concentrate option") - td.td_operation_mode(TDOpModes.MODE_STAN.value) - mouseClick(waitForObject(names.o_createTreatmentRect_TouchRect)) - td.td_operation_mode(TDOpModes.MODE_PRET.value) - td.td_blood_set_auto_load_response(vRejectionReason = 0) - set_acid_concentrate() - #open water sample dialog + +def water_sample_tab(): + test.startSection("Test Water Sample Result Messgae") mouseClick(waitForObject(names.o_waterSample_IconButton)) - #Check the dialog is opened water_sample = waitForObject(names.o_menu_MainMenu) test.compare(water_sample.visible,True ,"Water sample dialog is visible") chlorine_level = waitForObject(names.o_Column) @@ -84,6 +62,10 @@ mouseClick(waitForObject(pass_chlorine)) mouseClick(waitForObject(names.o_confirmButton_ConfirmButton_2,2000)) test.verify(waitFor( lambda: watersample == 1, 3000), "Testing FW received Chlorine level ≤ 0.1 mg/L Value") + test.endSection() + +def dialysate_tab(): + test.startSection("Check the values in the dialysate tab") dialysate_checks = waitForObject(names.o_touchRect1_TouchRect) dialysate_checks_text =utility.findChildByText(dialysate_checks, "Dialysate Checks") mouseClick(waitForObject(dialysate_checks_text)) @@ -115,3 +97,28 @@ actualRO_RejectionPercentage_text = utility.findObjectById(actualRO_RejectionPercentage,"_actualRORejectionPercentageText") test.log(str(actualRO_RejectionPercentage_text.text)) test.endSection() + + +def main(): + utils.tstStart(__file__) + startApplication(config.AUT_NAME) + can_interface = td.can_interface + global watersample + + # handle sent messages from UI + if can_interface is not None: + channel_id = CAN.DenaliChannels.ui_to_td_ch_id + message_id = MsgIds.MSG_ID_UI_WATER_SAMPLE_RESULT_REQUEST.value + can_interface.register_receiving_publication_function(channel_id, + message_id, + handle_water_sample_request) + + test.startSection("Verify the water sample, dialysate and Blood sampling ") + td.td_operation_mode(TDOpModes.MODE_STAN.value) + mouseClick(waitForObject(names.o_createTreatmentRect_TouchRect)) + td.td_operation_mode(TDOpModes.MODE_PRET.value) + td.td_blood_set_auto_load_response(vRejectionReason = 0) + set_acid_concentrate() + water_sample_tab() + dialysate_tab() + utils.tstDone()