Index: tst_end_treatment/test.py =================================================================== diff -u -rfc2bd008f7fbaa68dc4b29f9219c506a2830cce1 -rbcc1a6e17ebd009e7c08228b24deca470a0dba18 --- tst_end_treatment/test.py (.../test.py) (revision fc2bd008f7fbaa68dc4b29f9219c506a2830cce1) +++ tst_end_treatment/test.py (.../test.py) (revision bcc1a6e17ebd009e7c08228b24deca470a0dba18) @@ -39,6 +39,7 @@ test.compare(str(waitForObjectExists(names.o_start_rinseback_button_text).text), config.RINSEBACK_BUTTON_TEXT, "Rinseback button text must be {}".format(config.RINSEBACK_BUTTON_TEXT)) test.verify(waitForObjectExists(names.o_start_rinseback_button_text).enabled, " Start Rinseback button must be active") mouseClick(waitForObject(names.o_start_rinseback_button_text)) + verify_end_treatment_states_rejection_msg() test.endSection() test.startSection("verifying End treatment Treatment Paused state screens") @@ -49,9 +50,19 @@ test.compare(str(waitForObject(names.o_end_treatment_complete_paused_state).text),config.END_TREATMENT_COMPLETE_PAUSED_STATE_TEXT, "Treatment text must be {}".format(config.END_TREATMENT_COMPLETE_PAUSED_STATE_TEXT)) test.endSection() test.endSection() - - +def verify_end_treatment_states_rejection_msg(): + """ + Method to verify rinseback setup rejection messages + """ + test.startSection("verifying rejection messages in rinseback screens ") + for reason_id in range(1, config.NUM_OF_REQUEST_REJECT_REASONS + 1): + hd_simulator.cmd_send_treatment_adjust_end_response(accepted = 0, reason= reason_id) + rejection_message = waitForObjectExists(utility.end_treatment_states_rejection_msg(text=config.REJECTION_REASON[reason_id])) + test.compare(rejection_message.text, config.REJECTION_REASON[reason_id], "expected rejection {msg} displayed".format(msg=config.REJECTION_REASON[reason_id])) + test.endSection() + + def main(): utils.tstStart(__file__)