Index: shared/scripts/configuration/config.py =================================================================== diff -u -r0cc92d3b75bfb96dc4ecafd760a9ce15e455033b -rd518b54a0543fdb11fb4ebd9f9eb9dd4334232b1 --- shared/scripts/configuration/config.py (.../config.py) (revision 0cc92d3b75bfb96dc4ecafd760a9ce15e455033b) +++ shared/scripts/configuration/config.py (.../config.py) (revision d518b54a0543fdb11fb4ebd9f9eb9dd4334232b1) @@ -32,3 +32,33 @@ BLOOD_PRIMING_TEXT = "Blood Priming" SALINE_UNIT = "mL" BLOOD_PRIMING_DEFAULT_VALUE = "0 mL" + +#tst_pretreatment_screens +PRE_TREATMENT_SCREENS = ["Create" , "Sample" , "Consumables" , "Disposables" , "Prime" , "Ultrafiltration" , "BP/HR" , "Connection" , "Start"] + +#tst_pretreatment_screens color palettes +CURRENT_COLOR = '#000000' +COMPLETE_COLOR= '#4290ec' +ENABLED_COLOR = '#fcfcfc' +INCOMPLETE_COLOR = '#607a91' + +CONSUMABLE_SELF_TEST_TEXT = "Consumables Self Test" +BICARB_PUMP_CHECK_TEXT = "BiCarb Pump Check" +ACID_PUMP_CHECK_TEXT = "Acid Pump Check" +SELF_TEST_COMPLETE_TEXT = "Self Test Complete!" +SYSTEM_SELF_TEST_TITLE = "System Self Test" +MAXIMUM_COUNTDOWN_TIME = 300 +MINIMUM_COUNTDOWN_TIME = 0 +LOOD_PRIMING_TEXT = "Blood Priming" +SALINE_UNIT = "mL" +BLOOD_PRIMING_DEFAULT_VALUE = "0 mL" +FILTER_FLUSH_TITLE = "Filter Flush" +BEGIN_PRIME_TITLE = "Begin Prime" +PRIMING_TITLE = "Priming" + +#Pre-Treatment Disposables +NEXT_BUTTON_TEXT = "NEXT" +BACK_BUTTON_TEXT = "BACK" +ENABLED = True +DISABLED = False +CONFIRM_BUTTON_TEXT = "CONFIRM" Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r0a5d97313c5b835c05180f14cf821eb4964f0f96 -rd518b54a0543fdb11fb4ebd9f9eb9dd4334232b1 --- shared/scripts/configuration/utility.py (.../utility.py) (revision 0a5d97313c5b835c05180f14cf821eb4964f0f96) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision d518b54a0543fdb11fb4ebd9f9eb9dd4334232b1) @@ -12,7 +12,8 @@ # ############################################################################ - +import object +import names import sys import time import test @@ -23,43 +24,6 @@ from cgitb import text hd_simulator = HDSimulator() - -def start_application(app_name): - """ - Function to start application and verify application status [running] - If application does not start or running status is false, test stops - Argument: - @param app_name : (str) - Name of the application - @param app_executable : (str) - Actual application - @return: handle for the application if the application is in running state, - or error (exist the application) - """ - counter = 0 - while True: - try: - counter += 1 - test.log("Starting {}".format(app_name)) - squish.startApplication(app_name) - if counter == 1: - test.log("Application launched at the "+str(counter)+" st try.") - elif counter == 2: - test.log("Application launched at the "+str(counter)+" nd try.") - elif counter == 3: - test.log("Application launched at the "+str(counter)+" rd try.") - else: - test.log("Application launched at the "+str(counter)+" th try.") - break - except RuntimeError: - if counter == 1: - test.log("Application failed to launch after "+str(counter)+" try - Please refer logs") - elif counter == 20: - test.log("Exiting after "+str(counter)+ " tries..") - sys.exit(1) - else: - test.log("Application failed to launch after "+str(counter)+ " tries - Please refer logs") - except: - logErrorDetails("Failed to start the application") - sys.exit(1) def check_if_object_is_within_the_container(obj=None, container=None): @@ -133,4 +97,157 @@ def self_test_dry_check_list_text(text): names.o_slef_test_dry_check_list_text["text"] = text - return names.o_slef_test_dry_check_list_text \ No newline at end of file + return names.o_slef_test_dry_check_list_text + + +def navigate_to_pretreatment_screen(mode): + """ + Method to navigate to sub mode under pre-treatment screen + @param mode - (int) pre treatment state + """ + hd_simulator.cmd_set_hd_operation_mode_data(5,0) + hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=mode, water_sample_state=0, + consumables_self_test_state=0, no_cartridge_self_test_state=0, + installation_state=0, dry_self_test_state=0, prime_state=0, + recirculate_state=0, patient_connection_state=0) + + +def convert_seconds_into_min_and_sec(seconds): + min_and_sec = time.strftime("%M:%S", time.gmtime(seconds)) + return min_and_sec + + + +def get_time(screen_title): + """ + Method to return the current count down + in the application + @param screen_title - (str) current title of the screen + @return time_text - (str) count down in the application + """ + if screen_title == config.BEGIN_PRIME_TITLE or screen_title == config.PRIMING_TITLE: + parent_object = object.parent(squish.waitForObjectExists(self_test_dry_check_list_text(screen_title))) + elif screen_title == config.SYSTEM_SELF_TEST_TITLE: + parent_object = object.parent(squish.waitForObjectExists(names.o_system_self_test)) + else: + parent_object = object.parent(squish.waitForObjectExists(names.o_PreTreatmentBase_Filter_Flush_Text)) + time_parent_children = object.children(parent_object) + progress_circle_parent = time_parent_children[4] + progress_circle_parent = object.children(progress_circle_parent) + progress_circle_parent = progress_circle_parent[0] + progress_circle_parent = object.children(progress_circle_parent) + progress_circle_children = object.children(progress_circle_parent[0]) + time_text = progress_circle_children[1] + return time_text.time + + +def verify_the_countdown(screen_title): + """ + Method to verify the count down + time in application + @param screen_title - (str) current title of the screen + """ + test.startSection("Verify the count down time in application") + for count_down in range(config.MAXIMUM_COUNTDOWN_TIME, config.MINIMUM_COUNTDOWN_TIME-1, -1): + if screen_title == config.BEGIN_PRIME_TITLE: + hd_simulator.cmd_send_pre_treatment_self_test_dry_progress_data(total=300, countdown=count_down) + elif screen_title == config.PRIMING_TITLE: + hd_simulator.cmd_send_pre_treatment_disposables_prime_progress_data(timeout=300, countdown=count_down) + elif screen_title == config.SYSTEM_SELF_TEST_TITLE: + hd_simulator.cmd_send_pre_treatment_self_test_no_cartridge_progress_data(total=300, countdown=count_down) + else: + dg_simulator.cmd_send_dg_pre_treatment_filter_flush_progress_data(total=300, countdown=count_down) + actual_time = get_time(screen_title) + expected_time = convert_seconds_into_min_and_sec(count_down) + test.compare(actual_time, expected_time, "Actual count down time: {} should be equal to expected count down time {}".format(actual_time, expected_time)) + verify_the_progress(count_down, screen_title) + test.endSection() + + +def verify_the_progress(count_down, screen_title): + """ + Method to verify the current progress + @param count_down - (int) current count down time, screen_title: (str) current title of the screen + """ + test.startSection("Verifying the current progress") + if screen_title == config.BEGIN_PRIME_TITLE or screen_title == config.PRIMING_TITLE: + current_progress = (squish.waitForObjectExists(names.o_self_test_dry_progress)).progressValue + elif screen_title == config.SYSTEM_SELF_TEST_TITLE: + current_progress = (squish.waitForObjectExists(names.o_system_self_test_progress)).progressValue + else: + current_progress = (squish.waitForObjectExists(names.o_filter_flush_progress)).progressValue + #Since progress value is equal maximum count down value - current count down value + expected_progress = config.MAXIMUM_COUNTDOWN_TIME - count_down + test.compare(current_progress, expected_progress, "{} should be the current progress".format(expected_progress)) + test.endSection() + +def page_step_indicator_verification(screen_obj, pre_treatment_step): + """ + Method to verify the Page Step indicators [the object on top of the screen which indicates the steps passed, current, remained] + @param pre_treatment_step : indicates the Current pre-treatment step + """ + + for page in range(len(config.PRE_TREATMENT_SCREENS)): + bullet_children = object.children(squish.waitForObjectExists(get_bullet_object(screen_obj, page))) + bullet_circle_color = bullet_children[0].color.name + bullet_border_color = bullet_children[0].border.color.name + step_title = squish.waitForObjectExists(get_text_object(screen_obj, config.PRE_TREATMENT_SCREENS[page])) + #To verify the step indicators of the completed pre treatment screens + if page < pre_treatment_step: + test.verify(squish.waitForObjectExists(get_bullet_object(screen_obj, page)).complete) + test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).current) + test.compare(bullet_circle_color, config.COMPLETE_COLOR) + test.compare(bullet_border_color, config.COMPLETE_COLOR) + test.compare(step_title.color.name, config.ENABLED_COLOR) + #To verify the step indicators of the current pre treatment screen + elif page == pre_treatment_step: + test.verify(squish.waitForObjectExists(get_bullet_object(screen_obj, page)).current,) + test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).complete) + test.compare(bullet_circle_color, config.CURRENT_COLOR) + test.compare(bullet_border_color, config.COMPLETE_COLOR) + test.compare(step_title.color.name, config.ENABLED_COLOR) + test.verify(step_title.font.bold) + #To verify the step indicators of the remaining pre-treatment screens + else: + test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).current,) + test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).complete,) + test.compare(step_title.color.name, config.INCOMPLETE_COLOR) + test.compare(bullet_circle_color, config.CURRENT_COLOR) + test.compare(bullet_border_color, config.INCOMPLETE_COLOR) + +def verification_of_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 + +def get_text_object(screen_obj, txt): + """ + Method to return the text object + @param screen_obj: the screen object ,txt: text of the object + @param return the text object + """ + names.o_text_object["container"] = screen_obj + names.o_text_object["text"] = txt + return names.o_text_object + + +def get_bullet_object(screen_obj, num): + """ + Method to return the bullet object + @param screen_obj: the screen object ,num: the number of bullet occurrence + @param return the bullet object + """ + names.o_bullet_object["container"] = screen_obj + names.o_bullet_object["occurrence"] = num + 1 + return names.o_bullet_object + + Index: shared/scripts/names.py =================================================================== diff -u -r40cfd285729c8aefd9c66f78d70ada6078951013 -rd518b54a0543fdb11fb4ebd9f9eb9dd4334232b1 --- shared/scripts/names.py (.../names.py) (revision 40cfd285729c8aefd9c66f78d70ada6078951013) +++ shared/scripts/names.py (.../names.py) (revision d518b54a0543fdb11fb4ebd9f9eb9dd4334232b1) @@ -59,3 +59,26 @@ o_self_test_dry_check_list_text = {"container": o_PreTreatmentPrimeStack_PreTreatmentBase_TreatmentFlowBase, "type": "Text", "unnamed": 1, "visible": True} #Priming title o_priming_title_text = {"container": o_PreTreatmentPrimeStack_PreTreatmentBase_TreatmentFlowBase, "text": "Priming", "type": "Text", "unnamed": 1, "visible": True} + + +#disposable +o_PreTreatmentStack_PreTreatmentDisposableStack_PreTreatmentDisposablesStack = {"container": o_PreTreatmentStack_PreTreatmentStack, "objectName": "_PreTreatmentDisposableStack", "type": "PreTreatmentDisposablesStack", "visible": True} +o_PreTreatmentDisposableStack_PreTreatmentBase_TreatmentFlowBase = {"container": o_PreTreatmentStack_PreTreatmentDisposableStack_PreTreatmentDisposablesStack, "objectName": "_PreTreatmentBase", "type": "TreatmentFlowBase", "visible": True} +o_system_self_test = {"container": o_PreTreatmentDisposableStack_PreTreatmentBase_TreatmentFlowBase, "text" : "System Self Test", "type": "Text", "unnamed": 1, "visible": True} +#progress +o_system_self_test_progress = {"container": o_PreTreatmentDisposableStack_PreTreatmentBase_TreatmentFlowBase, "objectName": "_TimeCircle", "type": "TimeCircle", "visible": True} +o_system_test_text = {"container": o_PreTreatmentDisposableStack_PreTreatmentBase_TreatmentFlowBase, "text": "System Self Test", "type": "Text", "unnamed": 1, "visible": True} +#right and left button +o_PreTreatmentBase_rightImage_Image={"container": o_PreTreatmentDisposableStack_PreTreatmentBase_TreatmentFlowBase, "id": "_rightImage", "source": "qrc:/images/iArrowRight", "type": "Image", "unnamed": 1, "visible": True} +o_PreTreatmentBase_leftImage_Image = {"container": o_PreTreatmentDisposableStack_PreTreatmentBase_TreatmentFlowBase, "id": "_leftImage", "source": "qrc:/images/iArrowLeft", "type": "Image", "unnamed": 1, "visible": True} +o_next_button_text = {"container": o_Gui_MainView, "text":"NEXT", "type": "Text", "unnamed": 1, "visible": True} +o_right_side_arrow = {"container": o_PreTreatmentDisposableStack_PreTreatmentBase_TreatmentFlowBase, "id": "_rightImage", "source": "qrc:/images/iArrowRight", "type": "Image", "unnamed": 1, "visible": True} +o_back_button_text = {"container": o_Gui_MainView, "text":"BACK", "type": "Text", "unnamed": 1, "visible": True} +o_confirm_button_text = {"container": o_PreTreatmentDisposableStack_PreTreatmentBase_TreatmentFlowBase, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} +o_PreTreatmentBase_swipeview_SwipeView = {"container": o_PreTreatmentDisposableStack_PreTreatmentBase_TreatmentFlowBase, "id": "_swipeview", "type": "SwipeView", "unnamed": 1, "visible": True} +o_cartridge_installation_screen1_text = {"container": o_PreTreatmentBase_swipeview_SwipeView, "text": "Open the front panel door.\nAnd check the cartridge.", "type": "Text", "unnamed": 1, "visible": True} +o_heparin_syringe_screen1_text = {"container": o_PreTreatmentBase_swipeview_SwipeView, "text": "Connect the cartridge blood and dialysis fluid lines to the dialyzer.", "type": "Text", "unnamed": 1, "visible": True} + +#text and bullet object +o_text_object = {"type": "Text", "unnamed": 1, "visible": True} +o_bullet_object = {"type": "StepBullet", "unnamed": 1, "visible": True} \ No newline at end of file Index: tst_pre_treatment_disposables/test.py =================================================================== diff -u --- tst_pre_treatment_disposables/test.py (revision 0) +++ tst_pre_treatment_disposables/test.py (revision d518b54a0543fdb11fb4ebd9f9eb9dd4334232b1) @@ -0,0 +1,258 @@ +# -*- 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_In_treatment +# date 2020/03/18 +# author Amritha Debnat +# + +import names + +from configuration.utility import * +from configuration.config import * +from dialin.ui import utils +from dialin.ui.hd_simulator import HDSimulator + +hd_simulator = HDSimulator() + +PRE_TREATMENT_STEP = 3 +NUM_OF_PRETREATMENT_BULLETS = len(PRE_TREATMENT_SCREENS) +SCREEN_OBJ = names.o_PreTreatmentDisposableStack_PreTreatmentBase_TreatmentFlowBase +CARTRIDGE_INSTALLATION = 1 +HEPARIN_SYRINGE = 2 +NUM_OF_CARTRIDGE_INSTALLATION_SCREENS = 4 +NUM_OF_HEPARIN_SYRINGE_SCREENS = 5 +CARTRIDGE_INSTALLATION_TEXT = "Open the front panel door.\nAnd check the cartridge." +HEPARIN_SYRINGE_TEXT = "Connect the cartridge blood and dialysis fluid lines to the dialyzer." + + +def navigate_to_disposables(): + """ + Method to navigate to disposables and verify + 'System Self Test' title is displayed + """ + test.startSection("Navigating to disposables and verifying 'System Self Test' title is displayed") + navigate_to_pretreatment_screen(mode=3) + test.compare(SYSTEM_SELF_TEST_TITLE, waitForObject(names.o_system_test_text).text, "'{} title should displayed when user is navigated to disposable screen".format(SYSTEM_SELF_TEST_TITLE)) + page_step_indicator_verification(SCREEN_OBJ, PRE_TREATMENT_STEP) + test.endSection() + +def verification_of_right_instruction_navigation(num_of_instruction, screen): + """ + Method to verify right arrow functionality and + verify the status of back, next and confirm button if available + @param num_of_instruction - (int) count the number of instructions, + @param screen - (int) current screen + """ + test.startSection("verifying right arrow functionality and verify the status of left, 'BACK', 'NEXT' and 'CONFIRM' button if available") + verification_of_missing_object(names.o_PreTreatmentBase_leftImage_Image) + for indicator in range(1, num_of_instruction, 1): + verification_of_bullet_navigation(indicator, num_of_instruction) + verification_of_next_button(DISABLED) + if screen == CARTRIDGE_INSTALLATION: + verification_of_back_button(DISABLED) + else: + verification_of_back_button(ENABLED) + if indicator != num_of_instruction: + mouseClick(waitForObject(names.o_PreTreatmentBase_rightImage_Image)) + + verification_of_missing_object(names.o_PreTreatmentBase_rightImage_Image) + verification_of_next_button(ENABLED) + test.endSection() + +def verification_of_left_instruction_navigation(num_of_instruction, screen): + """ + Method to verify left arrow functionality and + verify the status of back, next and confirm button if available + @param num_of_instruction - (int) count the number of instructions, + @param screen - (int) current screen + """ + test.startSection("verifying left arrow functionality and verify the status of left, 'BACK', 'NEXT' and 'CONFIRM' button if available") + verification_of_missing_object(names.o_PreTreatmentBase_rightImage_Image) + for indicator in range(num_of_instruction, 0, -1): + verification_of_bullet_navigation(indicator, num_of_instruction) + if indicator == num_of_instruction: + verification_of_next_button(ENABLED) + else: + verification_of_next_button(DISABLED) + if screen == CARTRIDGE_INSTALLATION: + verification_of_back_button(DISABLED) + else: + verification_of_back_button(ENABLED) + if indicator != 1: + mouseClick(waitForObject(names.o_PreTreatmentBase_leftImage_Image)) + + verification_of_missing_object(names.o_PreTreatmentBase_leftImage_Image) + test.endSection() + +def verification_of_bullet_navigation(num, num_of_instruction): + """ + Method to verify the status of bullets based + on the number of instruction screen + @param num - (int) number of indicator + @param num_of_instruction- (int) count the number of instructions + """ + test.startSection("instruction bullet verification for screens") + for instruction in range(1, num_of_instruction): + bullet_children = object.children(waitForObjectExists(get_bullet_object(SCREEN_OBJ,(NUM_OF_PRETREATMENT_BULLETS + 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, COMPLETE_COLOR) + test.compare(bullet_border_color,COMPLETE_COLOR) + test.log(str(instruction) + " Complete bullet") + else: + test.compare(bullet_circle_color, CURRENT_COLOR) + test.compare(bullet_border_color,INCOMPLETE_COLOR) + test.log(str(instruction) + " Incomplete bullet") + test.endSection() + +def verification_of_next_button(condition): + """ + Method to verify the status 'NEXT' button + @param condition - (bool) True/False + """ + test.startSection("Verifying the status of 'NEXT' button") + test.compare(str(waitForObjectExists(names.o_next_button_text).text), NEXT_BUTTON_TEXT, "'NEXT' button text should be {}".format(NEXT_BUTTON_TEXT)) + if condition: + test.compare(waitForObjectExists(names.o_next_button_text).enabled, condition, "'NEXT' button should be enabled") + else: + test.compare(waitForObjectExists(names.o_next_button_text).enabled, condition, "'NEXT' button should be disabled") + test.endSection() + +def click_on_next_button(): + """ + Method to click on 'NEXT' button + """ + mouseClick(waitForObjectExists(names.o_next_button_text)) + +def verification_of_back_button(condition): + """ + Method to verify the availability of 'BACK' + button verify the status of the same + @param condition - (bool) True/False + """ + test.startSection("Verifying the availability of 'BACK' button verify the status of the same") + if object.exists(names.o_back_button_text): + test.compare(str(waitForObjectExists(names.o_back_button_text).text), BACK_BUTTON_TEXT,"'BACK' button text should be {}".format(BACK_BUTTON_TEXT)) + if condition: + test.compare(waitForObjectExists(names.o_back_button_text).enabled , condition, "'BACK' button should be enabled") + else: + test.compare(waitForObjectExists(names.o_back_button_text).enabled , condition, "'BACK' button should be disabled") + else: + + test.passes("'BACK' Button should not exists") + test.endSection() + +def click_on_back_button(): + """ + Method to click on 'BACK' button + """ + mouseClick(waitForObjectExists(names.o_back_button_text)) + +def verify_cartridge_installation_first_screen_displayed(): + """ + Method to verify the screen 1 of cartridge_installation + of instructions is displayed + """ + test.startSection("Verifying the screen 1 of 'cartridge installation' of instructions is displayed") + expected_screen_text = waitForObject(names.o_cartridge_installation_screen1_text) + test.compare(expected_screen_text.text, CARTRIDGE_INSTALLATION_TEXT, "{} Should be displayed when navigated to cartridge_installationcartridge_installation by using 'BACK' button".format(CARTRIDGE_INSTALLATION_TEXT)) + test.endSection() + +def verify_heparin_syringe_first_screen_displayed(): + """ + Method to verify the screen 1 of heparin syringe + of instructions is displayed + """ + test.startSection("Verifying the screen 1 of 'heparin syringe' of instructions is displayed") + expected_screen_text = waitForObject(names.o_heparin_syringe_screen1_text) + test.compare(expected_screen_text.text, HEPARIN_SYRINGE_TEXT, "{} Should be displayed when navigated to Phase 2 by using BACK button".format(HEPARIN_SYRINGE_TEXT)) + test.endSection() + +def verification_of_confirm_button(): + """ + Method to verify the status 'CONFIRM' button + """ + test.startSection("Verifying the status 'CONFIRM' button") + test.compare(str(waitForObjectExists(names.o_confirm_button_text).text), CONFIRM_BUTTON_TEXT,"'CONFIRM' button text should be {}".format(CONFIRM_BUTTON_TEXT)) + test.compare(waitForObjectExists(names.o_confirm_button_text).enabled , True, "'CONFIRM' button should be enabled") + test.endSection() + +def verify_the_functionality_for_cartridge_installation(): + """ + Method to verify functionality of the + cartridge_installation screen's left, right navigation + and 'NEXT' button + """ + test.startSection("Verifying functionality of the cartridge installation screen's left, right navigation and 'NEXT' button") + navigate_to_pretreatment_screen(mode=4) + verification_of_right_instruction_navigation(NUM_OF_CARTRIDGE_INSTALLATION_SCREENS, CARTRIDGE_INSTALLATION) + verification_of_left_instruction_navigation(NUM_OF_CARTRIDGE_INSTALLATION_SCREENS, CARTRIDGE_INSTALLATION) + verification_of_right_instruction_navigation(NUM_OF_CARTRIDGE_INSTALLATION_SCREENS, CARTRIDGE_INSTALLATION) + click_on_next_button() + test.endSection() + +def verify_the_functionality_for_heparin_syringe(): + """ + Method to verify functionality of the + heparin syringe screen's left, right navigation + and 'NEXT' button + """ + test.startSection("Verifying functionality of the heparin syringe screen's left, right navigation, 'BACK'and 'NEXT' button") + verification_of_right_instruction_navigation(NUM_OF_HEPARIN_SYRINGE_SCREENS, HEPARIN_SYRINGE) + verification_of_left_instruction_navigation(NUM_OF_HEPARIN_SYRINGE_SCREENS, HEPARIN_SYRINGE) + click_on_back_button() + verify_cartridge_installation_first_screen_displayed() + verification_of_right_instruction_navigation(NUM_OF_CARTRIDGE_INSTALLATION_SCREENS, CARTRIDGE_INSTALLATION) + click_on_next_button() + verification_of_right_instruction_navigation(NUM_OF_HEPARIN_SYRINGE_SCREENS, HEPARIN_SYRINGE) + click_on_back_button() + verify_cartridge_installation_first_screen_displayed() + verification_of_right_instruction_navigation(NUM_OF_CARTRIDGE_INSTALLATION_SCREENS, CARTRIDGE_INSTALLATION) + click_on_next_button() + verification_of_right_instruction_navigation(NUM_OF_HEPARIN_SYRINGE_SCREENS, HEPARIN_SYRINGE) + click_on_next_button() + verification_of_confirm_button() + test.endSection() + +def verify_the_functionality_for_saline_bag(): + """ + Method to verify functionality of the + saline bag screen's left, right navigation + and 'NEXT', 'BACK' and 'CONFIRM' button + """ + test.startSection("Verifying functionality of the saline bag") + click_on_back_button() + verify_heparin_syringe_first_screen_displayed() + click_on_back_button() + verify_cartridge_installation_first_screen_displayed() + verification_of_right_instruction_navigation(NUM_OF_CARTRIDGE_INSTALLATION_SCREENS, CARTRIDGE_INSTALLATION) + click_on_next_button() + verification_of_right_instruction_navigation(NUM_OF_HEPARIN_SYRINGE_SCREENS, HEPARIN_SYRINGE) + click_on_next_button() + verification_of_confirm_button() + test.endSection() + +def main(): + utils.tstStart(__file__) + startApplication(AUT_NAME) + + navigate_to_disposables() + verify_the_countdown(SYSTEM_SELF_TEST_TITLE) + + + verify_the_functionality_for_cartridge_installation() + + utils.waitForGUI(1) + verify_the_functionality_for_heparin_syringe() + + utils.waitForGUI(1) + verify_the_functionality_for_saline_bag() + + utils.tstDone() + \ No newline at end of file