Index: tst_end_treatment/test.py =================================================================== diff -u -reca0afd252f1c84a6711492854c08ec03266ca9e -r11b9ea474027364c3d22024e209ff14890a136eb --- tst_end_treatment/test.py (.../test.py) (revision eca0afd252f1c84a6711492854c08ec03266ca9e) +++ tst_end_treatment/test.py (.../test.py) (revision 11b9ea474027364c3d22024e209ff14890a136eb) @@ -38,6 +38,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() def verification_of_end_treatment_paused_state(): @@ -52,9 +53,18 @@ 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() +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__)