Index: shared/scripts/configuration/config.py =================================================================== diff -u -r0cc92d3b75bfb96dc4ecafd760a9ce15e455033b -r0d29de114c4155f07fc8c2d1c83544643a18a334 --- shared/scripts/configuration/config.py (.../config.py) (revision 0cc92d3b75bfb96dc4ecafd760a9ce15e455033b) +++ shared/scripts/configuration/config.py (.../config.py) (revision 0d29de114c4155f07fc8c2d1c83544643a18a334) @@ -32,3 +32,24 @@ BLOOD_PRIMING_TEXT = "Blood Priming" SALINE_UNIT = "mL" BLOOD_PRIMING_DEFAULT_VALUE = "0 mL" + +#end-treatment screens +CURRENT_COLOR = '#000000' +COMPLETE_COLOR= '#000000' +ENABLED_COLOR = '#fcfcfc' +INCOMPLETE_COLOR = '#607a91' +END_TREATMENT_SCREEN = ["Rinseback Setup", "Recirculate", "Treatment Complete", "Treatment Paused State"] + +#rinseback-setup +RINSE_BACK_SETUP_TEXT = "Rinseback Setup" +RINSEBACK_BUTTON_TEXT = "START RINSEBACK" +END_IMAGE_BUTTON_TEXT = "End" +DECELERATE_BUTTON_TEXT = "Decelerate" +ACCELERATE_BUTTON_TEXT = "Accelerate" +PAUSE_BUTTON_TEXT = "Pause" +RESUME_BUTTON_TEXT = "Resume" +RINSEBACK_TEXT = "Rinseback" +RINSEBACK_COMPLETE_TEXT = "Rinseback Complete" +END_TREATMENT_BUTTON_TEXT = "END TREATMENT" +ADDITIONAL_BUTTON_TEXT = "ADDITIONAL" +ADDITIONAL_RINSEBACK_TEXT = "Additional Rinseback" \ No newline at end of file Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r0cc92d3b75bfb96dc4ecafd760a9ce15e455033b -r0d29de114c4155f07fc8c2d1c83544643a18a334 --- shared/scripts/configuration/utility.py (.../utility.py) (revision 0cc92d3b75bfb96dc4ecafd760a9ce15e455033b) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 0d29de114c4155f07fc8c2d1c83544643a18a334) @@ -12,7 +12,7 @@ # ############################################################################ - +import names import sys import test import squish @@ -108,3 +108,28 @@ raise LookupError("zone object is not in view to the user after " + \ "trying 100 times") + +def get_bullet_object(screen_obj, num): + """ + To obtain a bullet object based on occurrence provided. + @param screen_obj: provides the container on which the bullet must be present + @param num: provides the occurrence value + @returns a real name object + """ + names.o_bullet_object["container"] = screen_obj + names.o_bullet_object["occurrence"] = num + 1 + return names.o_bullet_object + +def verify_missing_object(object_to_check): + """ + Method to verify the given object is invisible or is not present on the screen + @param object_to_check: the object whose invisibility must be verified + """ + try: + squish.testSettings.objectNotFoundDebugging = False + squish.waitForObject(object_to_check,3000) + test.fail("Given object should not be present initially") + except LookupError as _: + test.passes("object is not present as expected") + + squish.testSettings.objectNotFoundDebugging = True \ No newline at end of file Index: shared/scripts/names.py =================================================================== diff -u -r0cc92d3b75bfb96dc4ecafd760a9ce15e455033b -r0d29de114c4155f07fc8c2d1c83544643a18a334 --- shared/scripts/names.py (.../names.py) (revision 0cc92d3b75bfb96dc4ecafd760a9ce15e455033b) +++ shared/scripts/names.py (.../names.py) (revision 0d29de114c4155f07fc8c2d1c83544643a18a334) @@ -47,6 +47,32 @@ o_fluid_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Volume Delivered", "type": "Text", "unnamed": 1, "visible": True} o_cumulative_fluid_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Cumulative Delivered", "type": "Text", "unnamed": 1, "visible": True} +#end-treatment screens +o_text_object = {"type": "Text", "unnamed": 1, "visible": True} +o_bullet_object = {"type": "StepBullet", "unnamed": 1, "visible": True} +#rinseback-setup +o_EndTreatmentRinsebackStack_EndTreatmentRinsebackStack = {"container": o_Gui_MainView, "objectName": "_EndTreatmentRinsebackStack", "type": "EndTreatmentRinsebackStack", "visible": True} +o_EndTreatmentRinsebackStack_EndTreatmentRinsebackInit_EndTreatmentRinsebackInit = {"container": o_EndTreatmentRinsebackStack_EndTreatmentRinsebackStack, "objectName": "_EndTreatmentRinsebackInit", "type": "EndTreatmentRinsebackInit", "visible": True} +o_EndTreatmentRinsebackInit_rightImage_Image = {"container": o_EndTreatmentRinsebackStack_EndTreatmentRinsebackInit_EndTreatmentRinsebackInit, "id": "_rightImage", "source": "qrc:/images/iArrowRight", "type": "Image", "unnamed": 1, "visible": True} +o_EndTreatmentRinsebackInit_leftImage_Image = {"container": o_EndTreatmentRinsebackStack_EndTreatmentRinsebackInit_EndTreatmentRinsebackInit, "id": "_leftImage", "source": "qrc:/images/iArrowLeft", "type": "Image", "unnamed": 1, "visible": True} +o_EndTreatmentEndStack_EndTreatmentEndStack = {"container": o_Gui_MainView, "objectName": "_EndTreatmentEndStack", "type": "EndTreatmentEndStack", "visible": True} +o_EndTreatmentEndStack_EndTreatmentBase_EndTreatmentBase = {"container": o_EndTreatmentEndStack_EndTreatmentEndStack, "objectName": "_EndTreatmentBase", "type": "EndTreatmentBase", "visible": True} +o_rinse_back_text = {"container": o_EndTreatmentRinsebackStack_EndTreatmentRinsebackInit_EndTreatmentRinsebackInit, "text": "Rinseback Setup", "type": "Text", "unnamed": 1, "visible": True} +o_start_rinseback_button_text = {"container": o_EndTreatmentEndStack_EndTreatmentBase_EndTreatmentBase, "text": "START RINSEBACK", "type": "Text", "unnamed": 1, "visible": True} +o_rinseback_setup_rinseback_button = {"container": o_EndTreatmentRinsebackStack_EndTreatmentRinsebackInit_EndTreatmentRinsebackInit, "text": "START RINSEBACK", "type": "Text", "unnamed": 1, "visible": True} +o_EndTreatmentRinsebackStack_EndTreatmentRinseback_EndTreatmentRinseback = {"container": o_EndTreatmentRinsebackStack_EndTreatmentRinsebackStack, "objectName": "_EndTreatmentRinseback", "type": "EndTreatmentRinseback", "visible": True} +o_EndTreatmentRinseback_imageEnd_ImageText = {"container": o_EndTreatmentRinsebackStack_EndTreatmentRinseback_EndTreatmentRinseback, "id": "_imageEnd", "source": "qrc:/images/iRedCrossWCircle", "type": "ImageText", "unnamed": 1, "visible": True} +o_EndTreatmentRinseback_imageDecelerate_ImageText = {"container": o_EndTreatmentRinsebackStack_EndTreatmentRinseback_EndTreatmentRinseback, "id": "_imageDecelerate", "source": "qrc:/images/iDecelerate", "type": "ImageText", "unnamed": 1, "visible": True} +o_EndTreatmentRinseback_imageAccelerate_ImageText = {"container": o_EndTreatmentRinsebackStack_EndTreatmentRinseback_EndTreatmentRinseback, "id": "_imageAccelerate", "source": "qrc:/images/iAccelerate", "type": "ImageText", "unnamed": 1, "visible": True} +o_EndTreatmentRinseback_imagePause_ImageText = {"container": o_EndTreatmentRinsebackStack_EndTreatmentRinseback_EndTreatmentRinseback, "id": "_imagePause", "source": "qrc:/images/iPauseLightBlue", "type": "ImageText", "unnamed": 1, "visible": True} +o_EndTreatmentRinseback_Rinseback_Text = {"container": o_EndTreatmentRinsebackStack_EndTreatmentRinseback_EndTreatmentRinseback, "text": "Rinseback", "type": "Text", "unnamed": 1, "visible": True} +o_EndTreatmentRinseback_imageResume_ImageText = {"container": o_EndTreatmentRinsebackStack_EndTreatmentRinseback_EndTreatmentRinseback, "id": "_imageResume", "source": "qrc:/images/iResume", "type": "ImageText", "unnamed": 1, "visible": True} +o_EndTreatmentRinsebackStack_EndTreatmentRinsebackComplete_EndTreatmentRinsebackComplete = {"container": o_EndTreatmentRinsebackStack_EndTreatmentRinsebackStack, "objectName": "_EndTreatmentRinsebackComplete", "type": "EndTreatmentRinsebackComplete", "visible": True} +o_EndTreatmentRinsebackComplete_Rinseback_Complete_Text = {"container": o_EndTreatmentRinsebackStack_EndTreatmentRinsebackComplete_EndTreatmentRinsebackComplete, "text": "Rinseback Complete", "type": "Text", "unnamed": 1, "visible": True} +o_EndTreatmentRinsebackComplete_END_TREATMENT_Text = {"container": o_EndTreatmentRinsebackStack_EndTreatmentRinsebackComplete_EndTreatmentRinsebackComplete, "text": "END TREATMENT", "type": "Text", "unnamed": 1, "visible": True} +o_EndTreatmentRinsebackComplete_ADDITIONAL_Text = {"container": o_EndTreatmentRinsebackStack_EndTreatmentRinsebackComplete_EndTreatmentRinsebackComplete, "text": "ADDITIONAL", "type": "Text", "unnamed": 1, "visible": True} +o_EndTreatmentRinsebackStack_EndTreatmentAdditional_EndTreatmentBase = {"container": o_EndTreatmentRinsebackStack_EndTreatmentRinsebackStack, "objectName": "_EndTreatmentAdditional", "type": "EndTreatmentBase", "visible": True} +o_EndTreatmentAdditional_Additional_Rinseback_Text = {"container": o_EndTreatmentRinsebackStack_EndTreatmentAdditional_EndTreatmentBase, "text": "Additional Rinseback", "type": "Text", "unnamed": 1, "visible": True} Index: suite.conf =================================================================== diff -u -r8df6f936193bbd9127d3ec940562e62db0060bcb -r0d29de114c4155f07fc8c2d1c83544643a18a334 --- suite.conf (.../suite.conf) (revision 8df6f936193bbd9127d3ec940562e62db0060bcb) +++ suite.conf (.../suite.conf) (revision 0d29de114c4155f07fc8c2d1c83544643a18a334) @@ -1,6 +1,6 @@ AUT=denaliSquish LANGUAGE=Python OBJECTMAPSTYLE=script -TEST_CASES=tst_environment tst_post tst_standbymode tst_In_treatment +TEST_CASES=tst_environment tst_post tst_standbymode tst_In_treatment tst_rinseback_setup VERSION=3 WRAPPERS=Qt Index: tst_rinseback_setup/test.py =================================================================== diff -u --- tst_rinseback_setup/test.py (revision 0) +++ tst_rinseback_setup/test.py (revision 0d29de114c4155f07fc8c2d1c83544643a18a334) @@ -0,0 +1,181 @@ +# -*- coding: utf-8 -*-" + +## +# Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. +# copyright +# THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, +# IN PART OR IN WHOLE, +# WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. +# +# file tst_post_treatment_disconnection +# date 2022/06/06 +# author Ajina S M +# author Amol Shinde +# author Amrita Debnath +# author Shweta POlicepatil +# NOTE: +# This test contradicts verification of post treatment section. + +import names +import builtins +from dialin.ui import utils +from dialin.ui.hd_simulator import HDSimulator +from configuration import config +from configuration import utility +from dialin.common.hd_defs import HDOpModes, HDOpSubModes, TreatmentStates, TreatmentEndStates, TreatmentRinsebackStates + +hd_simulator = HDSimulator() +SCREEN_OBJ1 = names.o_EndTreatmentRinsebackStack_EndTreatmentRinsebackInit_EndTreatmentRinsebackInit + +num_of_instructions = 3 +rightarrow_obj_names = [names.o_EndTreatmentRinsebackInit_rightImage_Image] +leftarrow_obj_names = [names.o_EndTreatmentRinsebackInit_leftImage_Image] + +def verify_bullet_navigation(num, num_of_instructions, screen_obj): + """ + Method to verify status of bullets based + on number of instruction screen + @param num - (int) number of indicator + @param num_of_instructions- (int) count the number of instructions + @param object - screen_obj - (str) Screen object + """ + test.startSection("instruction bullet verification for screens") + for instruction in range(1, num_of_instructions): + bullet_children = object.children(waitForObjectExists(utility.get_bullet_object(screen_obj,(0 + instruction) - 1))) + bullet_circle_color = bullet_children[0].color.name + bullet_border_color = bullet_children[0].border.color.name + if instruction <= num: +# test.compare(bullet_circle_color, config.COMPLETE_COLOR) +# test.compare(bullet_border_color,config.COMPLETE_COLOR) + test.log(str(instruction) + " Complete bullet") + else: + test.compare(bullet_circle_color, config.CURRENT_COLOR) + test.compare(bullet_border_color,config.INCOMPLETE_COLOR) + test.log(str(instruction) + " Incomplete bullet") + test.endSection() + +def verification_of_rinseback_setup_state(): + """ + Method to navigate to End-Treatment Rinseback Setup screens + """ + test.startSection("verifying Rinseback Setup state screens") + test.startSection("verifying Rinseback Stop INIT state screens") + hd_simulator.cmd_send_hd_operation_mode(op_mode = HDOpModes.MODE_TREA.value , sub_mode=HDOpSubModes.SUBMODE_START.value) + hd_simulator.cmd_set_treatment_states_data(sub_mode = TreatmentStates.TREATMENT_RINSEBACK_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 = TreatmentStates.TREATMENT_START_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) + test.compare(str(waitForObject(names.o_rinse_back_text).text),config.RINSE_BACK_SETUP_TEXT, "Rinseback Setup text must be {}".format(config.RINSE_BACK_SETUP_TEXT)) +# test.compare(str(waitForObjectExists(names.o_rinse_back_text).text), config.RINSEBACK_BUTTON_TEXT, "Rinseback button text must be {}".format(config.RINSEBACK_BUTTON_TEXT)) + test.verify(waitForObjectExists(names.o_rinse_back_text).enabled, " Start Rinseback button must be active") + mouseClick(waitForObject(names.o_rinse_back_text)) + verify_right_instruction_in_rinseback_setup_state(num_of_instructions) + verify_left_instruction_in_rinseback_setup_state(num_of_instructions) + verify_right_instruction_in_rinseback_setup_state(num_of_instructions) + test.endSection() + + test.startSection("verifying Rinseback RUN state screens") + hd_simulator.cmd_set_treatment_states_data(sub_mode = TreatmentStates.TREATMENT_RINSEBACK_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_RUN_STATE.value, recirculate_state = TreatmentStates.TREATMENT_START_STATE.value, + blood_prime_state = TreatmentStates.TREATMENT_START_STATE.value,treatment_end_state = TreatmentEndStates.TREATMENT_END_PAUSED_STATE.value, treatment_stop_state = TreatmentStates.TREATMENT_START_STATE.value, dialysis_state = TreatmentStates.TREATMENT_START_STATE.value) + test.compare(str(waitForObject(names.o_EndTreatmentRinseback_Rinseback_Text).text),config.RINSEBACK_TEXT, "Rinseback text must be {}".format(config.RINSEBACK_TEXT)) + test.compare(str(waitForObject(names.o_EndTreatmentRinseback_imageEnd_ImageText).text),config.END_IMAGE_BUTTON_TEXT, "END button text must be {}".format(config.END_IMAGE_BUTTON_TEXT)) + test.verify(waitForObjectExists(names.o_EndTreatmentRinseback_imageEnd_ImageText).enabled, " END button must be active") + mouseClick(waitForObject(names.o_EndTreatmentRinseback_imageEnd_ImageText)) + + test.compare(str(waitForObject(names.o_EndTreatmentRinseback_imageDecelerate_ImageText).text),config.DECELERATE_BUTTON_TEXT, "Decelerate button text must be {}".format(config.DECELERATE_BUTTON_TEXT)) + test.verify(waitForObjectExists(names.o_EndTreatmentRinseback_imageDecelerate_ImageText).enabled, " Decelerate button must be active") + mouseClick(waitForObject(names.o_EndTreatmentRinseback_imageDecelerate_ImageText)) + + test.compare(str(waitForObject(names.o_EndTreatmentRinseback_imageAccelerate_ImageText).text),config.ACCELERATE_BUTTON_TEXT, "Accelerate button text must be {}".format(config.ACCELERATE_BUTTON_TEXT)) + test.verify(waitForObjectExists(names.o_EndTreatmentRinseback_imageAccelerate_ImageText).enabled, " Accelerate button must be active") + mouseClick(waitForObject(names.o_EndTreatmentRinseback_imageAccelerate_ImageText)) + + test.compare(str(waitForObject(names.o_EndTreatmentRinseback_imagePause_ImageText).text),config.PAUSE_BUTTON_TEXT, "Pause button text must be {}".format(config.PAUSE_BUTTON_TEXT)) + test.verify(waitForObjectExists(names.o_EndTreatmentRinseback_imagePause_ImageText).enabled, " Pause button must be active") + mouseClick(waitForObject(names.o_EndTreatmentRinseback_imagePause_ImageText)) + test.endSection() + + test.startSection("verifying Rinseback Paused state screens") + hd_simulator.cmd_set_treatment_states_data(sub_mode = TreatmentStates.TREATMENT_RINSEBACK_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_PAUSED_STATE.value, recirculate_state = TreatmentStates.TREATMENT_START_STATE.value, + blood_prime_state = TreatmentStates.TREATMENT_START_STATE.value,treatment_end_state = TreatmentEndStates.TREATMENT_END_PAUSED_STATE.value, treatment_stop_state = TreatmentStates.TREATMENT_START_STATE.value, dialysis_state = TreatmentStates.TREATMENT_START_STATE.value) + test.compare(str(waitForObject(names.o_EndTreatmentRinseback_Rinseback_Text).text),config.RINSEBACK_TEXT, "Rinseback text must be {}".format(config.RINSEBACK_TEXT)) + test.compare(str(waitForObject(names.o_EndTreatmentRinseback_imageEnd_ImageText).text),config.END_IMAGE_BUTTON_TEXT, "END button text must be {}".format(config.END_IMAGE_BUTTON_TEXT)) + test.verify(waitForObjectExists(names.o_EndTreatmentRinseback_imageEnd_ImageText).enabled, " END button must be active") + mouseClick(waitForObject(names.o_EndTreatmentRinseback_imageEnd_ImageText)) + + +# test.compare(str(waitForObject(names.o_EndTreatmentRinseback_imageAccelerate_ImageText).text),config.ACCELERATE_BUTTON_TEXT, "Accelerate button text must be {}".format(config.ACCELERATE_BUTTON_TEXT)) +# test.verify(waitForObjectExists(names.o_EndTreatmentRinseback_imageAccelerate_ImageText).enabled, " Accelerate button must be active") +# mouseClick(waitForObject(names.o_EndTreatmentRinseback_imageAccelerate_ImageText)) +# +# test.compare(str(waitForObject(names.o_EndTreatmentRinseback_imageDecelerate_ImageText).text),config.DECELERATE_BUTTON_TEXT, "Decelerate button text must be {}".format(config.DECELERATE_BUTTON_TEXT)) +# test.verify(waitForObjectExists(names.o_EndTreatmentRinseback_imageDecelerate_ImageText).enabled, " Decelerate button must be active") +# mouseClick(waitForObject(names.names.o_EndTreatmentRinseback_imageDecelerate_ImageText)) + + test.compare(str(waitForObject(names.o_EndTreatmentRinseback_imageResume_ImageText).text),config.RESUME_BUTTON_TEXT, "Resume button text must be {}".format(config.RESUME_BUTTON_TEXT)) + test.verify(waitForObjectExists(names.o_EndTreatmentRinseback_imageResume_ImageText).enabled, " Resume button must be active") + mouseClick(waitForObject(names.o_EndTreatmentRinseback_imageResume_ImageText)) + test.endSection() + + test.startSection("verifying Rinseback Stop state screens") + hd_simulator.cmd_set_treatment_states_data(sub_mode = TreatmentStates.TREATMENT_RINSEBACK_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_STATE.value, recirculate_state = TreatmentStates.TREATMENT_START_STATE.value, + blood_prime_state = TreatmentStates.TREATMENT_START_STATE.value,treatment_end_state = TreatmentEndStates.TREATMENT_END_PAUSED_STATE.value, treatment_stop_state = TreatmentStates.TREATMENT_START_STATE.value, dialysis_state = TreatmentStates.TREATMENT_START_STATE.value) + + test.compare(str(waitForObject(names.o_EndTreatmentRinsebackComplete_Rinseback_Complete_Text).text),config.RINSEBACK_COMPLETE_TEXT, "Rinseback Complete text must be {}".format(config.RINSEBACK_COMPLETE_TEXT)) + test.compare(str(waitForObjectExists(names.o_EndTreatmentRinsebackComplete_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_EndTreatmentRinsebackComplete_END_TREATMENT_Text).enabled, "END TREATMENT button must be active") + mouseClick(waitForObject(names.o_EndTreatmentRinsebackComplete_END_TREATMENT_Text)) + + test.compare(str(waitForObjectExists(names.o_EndTreatmentRinsebackComplete_ADDITIONAL_Text).text), config.ADDITIONAL_BUTTON_TEXT, "ADDITIONAL button text must be {}".format(config.ADDITIONAL_BUTTON_TEXT)) + test.verify(waitForObjectExists(names.o_EndTreatmentRinsebackComplete_ADDITIONAL_Text).enabled, "ADDITIONAL button must be active") + mouseClick(waitForObject(names.o_EndTreatmentRinsebackComplete_ADDITIONAL_Text)) + test.endSection() + + test.startSection("verifying Rinseback Run Additional State screens") + hd_simulator.cmd_set_treatment_states_data(sub_mode = TreatmentStates.TREATMENT_RINSEBACK_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_RUN_ADDITIONAL_STATE.value, recirculate_state = TreatmentStates.TREATMENT_START_STATE.value, + blood_prime_state = TreatmentStates.TREATMENT_START_STATE.value,treatment_end_state = TreatmentEndStates.TREATMENT_END_PAUSED_STATE.value, treatment_stop_state = TreatmentStates.TREATMENT_START_STATE.value, dialysis_state = TreatmentStates.TREATMENT_START_STATE.value) + + test.compare(str(waitForObject(names.o_EndTreatmentAdditional_Additional_Rinseback_Text).text),config.ADDITIONAL_RINSEBACK_TEXT, "Additional Rinseback text must be {}".format(config.ADDITIONAL_RINSEBACK_TEXT)) + test.endSection() + test.endSection() + +def verify_right_instruction_in_rinseback_setup_state(num_of_instructions): + """. + Method to verify right arrow functionality + @param num_of_instructions - (int) count the number of instructions + """ + test.startSection("verifying right arrow functionality for rinseback setup state Screen") + utility.verify_missing_object(leftarrow_obj_names) + for indicator in range(1, num_of_instructions, 1): + verify_bullet_navigation(indicator, num_of_instructions, SCREEN_OBJ1) + if indicator != num_of_instructions: + mouseClick(waitForObject(names.o_EndTreatmentRinsebackInit_rightImage_Image)) + test.compare(str(waitForObjectExists(names.o_rinse_back_text).text), config.RINSE_BACK_SETUP_TEXT, "Rinseback Setup text must be {}".format(config.RINSE_BACK_SETUP_TEXT)) + utility.verify_missing_object(rightarrow_obj_names) + test.endSection() + +def verify_left_instruction_in_rinseback_setup_state(num_of_instructions): + """ + Method to verify left arrow functionality for rinseback setup state + + """ + test.startSection("verifying left arrow functionality for rinseback setup state screens") + utility.verify_missing_object(rightarrow_obj_names) + for indicator in range(num_of_instructions, 0, -1): + verify_bullet_navigation(indicator, num_of_instructions, SCREEN_OBJ1) + if indicator != 1: + mouseClick(waitForObject(names.o_EndTreatmentRinsebackInit_leftImage_Image)) + test.compare(str(waitForObjectExists(names.o_rinse_back_text).text), config.RINSE_BACK_SETUP_TEXT, "Rinseback Setup text must be {}".format(config.RINSE_BACK_SETUP_TEXT)) + utility.verify_missing_object(leftarrow_obj_names) + test.endSection() + +def main(): + + utils.tstStart(__file__) + startApplication(config.AUT_NAME) + verification_of_rinseback_setup_state() \ No newline at end of file