Index: tst_recirculate/test.py =================================================================== diff -u -r84c1284ecff1f30169d50afb688be18934eb8506 -r5d6a0bb96d04a86cc10936ac3f303c28be3bb249 --- tst_recirculate/test.py (.../test.py) (revision 84c1284ecff1f30169d50afb688be18934eb8506) +++ tst_recirculate/test.py (.../test.py) (revision 5d6a0bb96d04a86cc10936ac3f303c28be3bb249) @@ -21,26 +21,32 @@ from dialin.ui.hd_simulator import HDSimulator from configuration import config from configuration import utility -from dialin.common.hd_defs import TreatmentStates, TreatmentRinsebackStates, TreatmentRecircStates +from dialin.common.hd_defs import TreatmentStates, TreatmentRinsebackStates, TreatmentRecircStates, BloodLeakZeroingStates hd_simulator = HDSimulator() SCREEN_OBJ = names.o_EndTreatmentRecirculateStack_EndTreatmentBase_EndTreatmentBase COUNT_DOWN_VALUE = 121 TIMER_DEFAULT_VALUE = 1 -NUM_OF_INSTRUCTION = 3 +NUM_OF_INSTRUCTION = 1 def verify_recirculate_recirculate_state(): """ Method to verify Treatment Recirculate Recirculate state screens """ test.startSection("verifying Treatment Recirculate Recirculate state screens") hd_simulator.cmd_set_treatment_time(sec_total = 120, sec_elapsed = 20, sec_remain = 100) - hd_simulator.cmd_set_treatment_states_data(sub_mode = TreatmentStates.TREATMENT_RECIRC_STATE.value , uf_state = TreatmentStates.TREATMENT_START_STATE.value, - saline_state = TreatmentStates.TREATMENT_START_STATE.value, heparin_state = TreatmentStates.TREATMENT_START_STATE.value, - rinseback_state= TreatmentStates.TREATMENT_START_STATE.value, recirculate_state = TreatmentRecircStates.TREATMENT_RECIRC_RECIRC_STATE.value, - blood_prime_state = TreatmentStates.TREATMENT_START_STATE.value,treatment_end_state = TreatmentStates.TREATMENT_START_STATE.value, - treatment_stop_state = TreatmentStates.TREATMENT_START_STATE.value, dialysis_state = TreatmentStates.TREATMENT_START_STATE.value) + hd_simulator.cmd_set_treatment_states_data(sub_mode = TreatmentStates.TREATMENT_RECIRC_STATE.value , + uf_state = TreatmentStates.TREATMENT_START_STATE.value, + saline_state = TreatmentStates.TREATMENT_START_STATE.value, + heparin_state = TreatmentStates.TREATMENT_START_STATE.value, + rinseback_state= TreatmentStates.TREATMENT_START_STATE.value, + recirculate_state = TreatmentRecircStates.TREATMENT_RECIRC_RECIRC_STATE.value, + blood_prime_state = TreatmentStates.TREATMENT_START_STATE.value, + treatment_end_state = TreatmentStates.TREATMENT_START_STATE.value, + treatment_stop_state = TreatmentStates.TREATMENT_START_STATE.value, + dialysis_state = TreatmentStates.TREATMENT_START_STATE.value, + bloodLeakZeoringState = BloodLeakZeroingStates.BLD_ZEROING_IDLE_STATE.value) test.startSection("Verifying Timer count down timer " + config.RECIRCULATE_TEXT) for num in range(TIMER_DEFAULT_VALUE, COUNT_DOWN_VALUE): hd_simulator.cmd_send_treatment_recirculate_data(timeout_total=num, timeout_count_down=num) @@ -67,11 +73,17 @@ Method to verify Treatment Recirculate stopped state screens """ test.startSection("verifying Treatment Recirculate stopped state screens") - hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_RECIRC_STATE.value, uf_state=TreatmentStates.TREATMENT_START_STATE.value, - saline_state=TreatmentStates.TREATMENT_START_STATE.value, heparin_state=TreatmentStates.TREATMENT_START_STATE.value, - rinseback_state=TreatmentRinsebackStates.RINSEBACK_STOP_INIT_STATE.value, recirculate_state=TreatmentRecircStates.TREATMENT_RECIRC_STOPPED_STATE.value, - blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value,treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, - treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, dialysis_state=TreatmentStates.TREATMENT_START_STATE.value) + hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_RECIRC_STATE.value, + uf_state=TreatmentStates.TREATMENT_START_STATE.value, + saline_state=TreatmentStates.TREATMENT_START_STATE.value, + heparin_state=TreatmentStates.TREATMENT_START_STATE.value, + rinseback_state=TreatmentRinsebackStates.RINSEBACK_STOP_INIT_STATE.value, + recirculate_state=TreatmentRecircStates.TREATMENT_RECIRC_STOPPED_STATE.value, + blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, + dialysis_state=TreatmentStates.TREATMENT_START_STATE.value, + bloodLeakZeoringState = BloodLeakZeroingStates.BLD_ZEROING_IDLE_STATE.value) test.startSection("Verifying Timer count down timer on Recirculate Stopped state") for num in range(TIMER_DEFAULT_VALUE, COUNT_DOWN_VALUE): hd_simulator.cmd_send_treatment_recirculate_data(timeout_total=num, timeout_count_down=num) @@ -80,15 +92,15 @@ test.compare(str(waitForObject(names.o_EndTreatmentBase_TimeText_minute_Text).text), str(sec),"Verifying seconds on Timer in recirculate stopped state") test.compare(str(waitForObject(names.o_EndTreatmentBase_TimeText_hour_Text).text), str(min),"Verifying minutes on Timer in recirculate stopped state") test.endSection() - test.compare(str(waitForObject(names.o_EndTreatmentBase_Reconnect_Text).text), config.RECONNECT_TEXT, "Reconnect text must be {}".format(config.RECONNECT_TEXT)) + test.compare(str(waitForObject(names.o_EndTreatmentBase_ReturnToRecirculate_Text).text), config.RETURN_TO_RECIRCULATE, "Reconnect text must be {}".format(config.RETURN_TO_RECIRCULATE)) test.compare(str(waitForObjectExists(names.o_EndTreatmentBase_BACK_TO_RECIRCULATE_Text).text), config.BACK_TO_RECIRCULATE_TEXT, "Back to recirculate button text must be {}".format(config.BACK_TO_RECIRCULATE_TEXT)) test.verify(waitForObjectExists(names.o_EndTreatmentBase_BACK_TO_RECIRCULATE_Text).enabled, "Back to recirculate button must be active") mouseClick(waitForObject(names.o_EndTreatmentBase_mouseArea_MouseArea_2)) test.compare(str(waitForObjectExists(names.o_EndTreatmentBase_END_TREATMENT_Text).text), config.END_TREATMENT_BUTTON_TEXT, "End Treatment button text must be {}".format(config.END_TREATMENT_BUTTON_TEXT)) test.verify(waitForObjectExists(names.o_EndTreatmentBase_END_TREATMENT_Text).enabled, "End Treatment button on recirculate stopped state screen must be active") mouseClick(waitForObject(names.o_EndTreatmentBase_mouseArea_MouseArea)) test.verify(waitForObjectExists(names.o_EndTreatmentBase_confirm_Text).enabled, "Confirm button on recirculate stopped state screen must be active") - mouseClick(waitForObject(names.o_EndTreatmentBase_mouseArea_MouseArea_3)) + mouseClick(waitForObject(names.o_EndTreatmentBase_ButtonEndTreatment)) verify_rejection_messages_for_recirculate() test.endSection()