Index: tst_pre_treatment_disposables/test.py =================================================================== diff -u -r4e525fac94941a1451bd54f2390f47ece7f4f1b0 -r65a63eb034a83a62e22cdc33b793a6e650b4b6fa --- tst_pre_treatment_disposables/test.py (.../test.py) (revision 4e525fac94941a1451bd54f2390f47ece7f4f1b0) +++ tst_pre_treatment_disposables/test.py (.../test.py) (revision 65a63eb034a83a62e22cdc33b793a6e650b4b6fa) @@ -237,53 +237,11 @@ click_on_next_button() verify_right_instruction_navigation(NUM_OF_HEPARIN_SYRINGE_SCREENS, HEPARIN_SYRINGE) click_on_next_button() - test_state - test_rejection_message_on_saline_bolus + hd_simulator.cmd_send_post_treatment_disposable_removal_confirm_response(config.ACCEPTED, 0) verify_confirm_button() mouseClick(waitForObject(names.o_confirm_button_text)) test.endSection() - -def test_state(accept_status, button_text, target, saline_states): - """ - Method to verify rejection message and transition state of saline bolus parameter. - @param accept_status: (int) boolean accept/reject response - @param button_text: (str) "START"/"STOP" based on button text. - @param target: (int) saline bolus Target volume - @param saline_states: (int) saline bolus transition State - @return: none - """ - rejection_reason = 0 - # when rejected reason set 16 -> saline bolus in progress - if (not accept_status): rejection_reason = rejectReason.REQUEST_REJECT_REASON_SALINE_BOLUS_IN_PROGRESS.value - hd_simulator.cmd_set_saline_bolus_response(accepted = accept_status, reason = rejection_reason, target = target) - if (not accept_status): test.compare(waitForObjectExists(utility.rejection_msg(config.REJECTION_REASON[rejection_reason])).text, config.REJECTION_REASON[rejection_reason], \ - "expected rejection {msg} displayed".format(msg=config.REJECTION_REASON[rejection_reason])) - - #set saline transition state. - hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state=saline_states, heparin_state= 0, - rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, - treatment_end_state=0, treatment_stop_state= 0, dialysis_state=0 ) - - test.compare(str(waitForObjectExists(names.o_treatmentStart_SalineSection).buttonText), "{} BOLUS".format(button_text)) - verification_of_target_value(expected_target_value = target) - - -def test_rejection_message_on_saline_bolus(accept_status, target, saline_states): - """ - verification of rejection messages on saline bolus. - @param accept_status: (int) boolean accept/reject response - @param target: (int) saline bolus Target volume - @param saline_states: (int) saline bolus transition State - @return: none - """ - test.startSection("verification of rejection messages on saline bolus") - for rejection in range(1, config.NUM_OF_REQUEST_REJECT_REASONS): - hd_simulator.cmd_set_saline_bolus_response(accepted = accept_status, reason = rejection, target = target) - rejection_message = waitForObjectExists(utility.rejection_msg(config.REJECTION_REASON[rejection])) - test.compare(rejection_message.text, config.REJECTION_REASON[rejection], "expected rejection {msg} displayed".format(msg=config.REJECTION_REASON[rejection])) - - test.endSection() def main(): utils.tstStart(__file__) startApplication(AUT_NAME)