Index: shared/scripts/configuration/config.py =================================================================== diff -u -r0cc92d3b75bfb96dc4ecafd760a9ce15e455033b -rfb0cd1adaf0297a23ee5ef06cb9e1663ac7851af --- shared/scripts/configuration/config.py (.../config.py) (revision 0cc92d3b75bfb96dc4ecafd760a9ce15e455033b) +++ shared/scripts/configuration/config.py (.../config.py) (revision fb0cd1adaf0297a23ee5ef06cb9e1663ac7851af) @@ -32,3 +32,36 @@ BLOOD_PRIMING_TEXT = "Blood Priming" SALINE_UNIT = "mL" BLOOD_PRIMING_DEFAULT_VALUE = "0 mL" + +#Filter Flush + +BEGIN_PRIME_TITLE = "Begin Prime" +PRIMING_TITLE = "Priming" +FILTER_FLUSH_TITLE = "Filter Flush" +MAXIMUM_COUNTDOWN_TIME = 300 +MINIMUM_COUNTDOWN_TIME = 0 +SYSTEM_SELF_TEST_TITLE = "System Self Test" + +#Pre_treatment_water_sample +SAMPLE_TEXT = "Sample" +CREATE_TEXT = "Create" +NEXT_BUTTON_TEXT = "NEXT" +WATER_SAMPLE_BUTTON_TEXT = "WATER SAMPLE" +BACK_BUTTON_TEXT = "BACK" +PASS_TEXT = "PASS" +FAIL_TEXT = "FAIL" +OK_TEXT = "OK" + + +#pretreatment_screen_bullets +PRE_TREATMENT_SCREENS = ["Create" , "Sample" , "Consumables" , "Disposables" , "Prime" , "Ultrafiltration" , "BP/HR" , "Connection" , "Start"] + +CURRENT_COLOR = '#000000' +COMPLETE_COLOR= '#4290ec' +ENABLED_COLOR = '#fcfcfc' +INCOMPLETE_COLOR = '#607a91' + +MAXIMUM_COUNTDOWN_TIME = 300 +MINIMUM_COUNTDOWN_TIME = 0 + + Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r0cc92d3b75bfb96dc4ecafd760a9ce15e455033b -rfb0cd1adaf0297a23ee5ef06cb9e1663ac7851af --- shared/scripts/configuration/utility.py (.../utility.py) (revision 0cc92d3b75bfb96dc4ecafd760a9ce15e455033b) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision fb0cd1adaf0297a23ee5ef06cb9e1663ac7851af) @@ -7,18 +7,26 @@ # # @file utils.py # -# @author (last) Joseph varghese +# @author (last) LTTS # @date (last) 15-Jan-2022 # ############################################################################ - +import object +import names import sys import test import squish -from configuration import config from builtins import int as pyInt +import time +from configuration import config +from configuration.config import * +from dialin.ui.hd_simulator import HDSimulator +from dialin.ui.dg_simulator import DGSimulator +hd_simulator = HDSimulator() +dg_simulator = DGSimulator() + def start_application(app_name): """ @@ -108,3 +116,136 @@ raise LookupError("zone object is not in view to the user after " + \ "trying 100 times") + + + +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 == BEGIN_PRIME_TITLE or screen_title == PRIMING_TITLE: + parent_object = object.parent(squish.waitForObjectExists(self_test_dry_check_list_text(screen_title))) + elif screen_title == SYSTEM_SELF_TEST_TITLE: + parent_object = object.parent(squish.waitForObjectExists(names.o_system_self_test)) + else: + parent_object = object.parent(squish.waitForObjectExists(names.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(MAXIMUM_COUNTDOWN_TIME, MINIMUM_COUNTDOWN_TIME-1, -1): + if screen_title == BEGIN_PRIME_TITLE: + hd_simulator.cmd_send_pre_treatment_self_test_dry_progress_data(total=300, countdown=count_down) + elif screen_title == PRIMING_TITLE: + hd_simulator.cmd_send_pre_treatment_disposables_prime_progress_data(timeout=300, countdown=count_down) + elif screen_title == 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 + """ + test.startSection("Verifying the current progress") + if screen_title == BEGIN_PRIME_TITLE or screen_title == PRIMING_TITLE: + current_progress = (squish.waitForObjectExists(names.o_self_test_dry_progress)).progressValue + elif screen_title == 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 = 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 + """ + test.startSection("verification of page step indicators") + 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) + test.endSection() + + +def get_text_object(screen_obj, txt): + names.text_object["container"] = screen_obj + names.text_object["text"] = txt + return names.text_object + + +def get_bullet_object(screen_obj, num): + names.bullet_object["container"] = screen_obj + names.bullet_object["occurrence"] = num + 1 + return names.bullet_object + + + +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) + + + + + Index: shared/scripts/names.py =================================================================== diff -u -rd132e765fb23ee3309cbdad3d10fe9f6f508405a -rfb0cd1adaf0297a23ee5ef06cb9e1663ac7851af --- shared/scripts/names.py (.../names.py) (revision d132e765fb23ee3309cbdad3d10fe9f6f508405a) +++ shared/scripts/names.py (.../names.py) (revision fb0cd1adaf0297a23ee5ef06cb9e1663ac7851af) @@ -82,7 +82,43 @@ 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} +#Filter Flush +o_Gui_MainView = {"type": "Gui::MainView", "unnamed": 1, "visible": True} +o_PreTreatmentStack_PreTreatmentStack = {"container": o_Gui_MainView, "objectName": "_PreTreatmentStack", "type": "PreTreatmentStack", "visible": True} +o_PreTreatmentStack_PreTreatmentSampleStack_PreTreatmentWaterSampleStack = {"container": o_PreTreatmentStack_PreTreatmentStack, "objectName": "_PreTreatmentSampleStack", "type": "PreTreatmentWaterSampleStack", "visible": True} +o_PreTreatmentSampleStack_PreTreatmentBase_TreatmentFlowBase = {"container": o_PreTreatmentStack_PreTreatmentSampleStack_PreTreatmentWaterSampleStack, "objectName": "_PreTreatmentBase", "type": "TreatmentFlowBase", "visible": True} +Filter_Flush_Text = {"container": o_PreTreatmentSampleStack_PreTreatmentBase_TreatmentFlowBase, "text": "Filter Flush", "type": "Text", "unnamed": 1, "visible": True} +o_filter_flush_progress = {"container": o_PreTreatmentSampleStack_PreTreatmentBase_TreatmentFlowBase, "objectName": "_TimeCircle", "type": "TimeCircle", "visible": True} +#Water Sample Pretreatment +text_object = {"type": "Text", "unnamed": 1, "visible": True} +bullet_object = {"type": "StepBullet", "unnamed": 1, "visible": True} +o_Gui_MainView = {"type": "Gui::MainView", "unnamed": 1, "visible": True} +o_PreTreatmentStack_PreTreatmentStack = {"container": o_Gui_MainView, "objectName": "_PreTreatmentStack", "type": "PreTreatmentStack", "visible": True} +o_PreTreatmentStack_PreTreatmentSampleStack_PreTreatmentWaterSampleStack = {"container": o_PreTreatmentStack_PreTreatmentStack, "objectName": "_PreTreatmentSampleStack", "type": "PreTreatmentWaterSampleStack", "visible": True} +o_PreTreatmentSampleStack_PreTreatmentBase_TreatmentFlowBase = {"container": o_PreTreatmentStack_PreTreatmentSampleStack_PreTreatmentWaterSampleStack, "objectName": "_PreTreatmentBase", "type": "TreatmentFlowBase", "visible": True} +#Filter flush title object +o_filter_flush_text = {"container": o_PreTreatmentSampleStack_PreTreatmentBase_TreatmentFlowBase, "text": "Filter Flush", "type": "Text", "unnamed": 1, "visible": True} +#Filter Flush Progress bar object +o_filter_flush_progress = {"container": o_PreTreatmentSampleStack_PreTreatmentBase_TreatmentFlowBase, "objectName": "_TimeCircle", "type": "TimeCircle", "visible": True} +#Next Button object +o_next_button = {"container": o_Gui_MainView, "type": "Text", "unnamed": 1, "visible": True} +#Water Sample button object +o_water_sample_button = {"container": o_PreTreatmentSampleStack_PreTreatmentBase_TreatmentFlowBase, "text": "WATER SAMPLE", "type": "Text", "unnamed": 1, "visible": True} +#Back button object +o_back_button = {"container": o_Gui_MainView, "type": "Text", "unnamed": 1, "visible": True} +#Pass button object +o_pass_button = {"container": o_PreTreatmentSampleStack_PreTreatmentBase_TreatmentFlowBase, "text": "PASS", "type": "Text", "unnamed": 1, "visible": True} +#Fail button object +o_fail_button = {"container": o_PreTreatmentSampleStack_PreTreatmentBase_TreatmentFlowBase, "text": "FAIL", "type": "Text", "unnamed": 1, "visible": True} +#Ok button object +o_ok_button = {"container": o_PreTreatmentSampleStack_PreTreatmentBase_TreatmentFlowBase, "text": "OK", "type": "Text", "unnamed": 1, "visible": True} +#Indicator Headstep bullet object +o_stephead_indicator = {"container": o_PreTreatmentSampleStack_PreTreatmentBase_TreatmentFlowBase, "id": "_headStepBullet", "occurrence": 2, "type": "StepBullet", "unnamed": 1, "visible": True} + + + + Index: tst_pre_treatment_water_sample/test.py =================================================================== diff -u -rd132e765fb23ee3309cbdad3d10fe9f6f508405a -rfb0cd1adaf0297a23ee5ef06cb9e1663ac7851af --- tst_pre_treatment_water_sample/test.py (.../test.py) (revision d132e765fb23ee3309cbdad3d10fe9f6f508405a) +++ tst_pre_treatment_water_sample/test.py (.../test.py) (revision fb0cd1adaf0297a23ee5ef06cb9e1663ac7851af) @@ -1,164 +1,77 @@ -# -*- coding: utf-8 -*- +# file tst__pre_treatment_water_sample +# date 2022/03/14 +# author Akshay Rajaram Dhawan +# author Ajina S M +# author Amol Shinde +# NOTE: +# This test contradicts verification of Filter Flush Progress, Screen Titles, Page Step Indicators, Screen navigations, and buttons. + import names from dialin.ui import utils from dialin.ui.hd_simulator import HDSimulator -from dialin.ui.utils import waitForGUI -from random import randint -from dialin.ui.dg_simulator import DGSimulator +from configuration import config +from configuration import utility -hd_simulator = HDSimulator() -dg_simulator = DGSimulator() -MIN_TIME_RANGE = 0 -MAX_TIME_RANGE = 300 +hd_simulator = HDSimulator() +PRE_TREATMENT_STEP= 1 -FILTER_FLUSH_TEXT = "Filter Flush" -CREATE = "Create" -SAMPLE = "Sample" -CONSUMABLES = "Consumables" -DISPOSABLES = "Disposables" -PRIME = "Prime" -ULTRAFILTERATION = "Ultrafiltration" -BP_HR = "BP/HR" -CONNECTION = "Connection" -START = "Start" - - -FILTER_FLUSH_DEFAULT_VALUE = "0" - -def verify_filter_flush_text(): +def verification_of_sample_water_state_screens(): """ - Verify Filter Flush Text on UI Screen + Method to verify the text and current state of the buttons and verify navigation within screen """ - test.log("Verifying the text 'Filter Flush'") - test.compare(str(waitForObjectExists(names.o_PreTreatmentBase_Filter_Flush_Text).text),FILTER_FLUSH_TEXT, "Verified Filter Flush text") - test.compare(str(waitForObjectExists(names.o_PreTreatmentBase_Create_Text).text),CREATE, "Verified Create text") - test.compare(str(waitForObjectExists(names.o_PreTreatmentBase_Sample_Text).text),SAMPLE, "Verified Sample text") - test.compare(str(waitForObjectExists(names.o_PreTreatmentBase_Consumables_Text).text),CONSUMABLES, "Verified Consumables text") - test.compare(str(waitForObjectExists(names.o_PreTreatmentBase_Disposables_Text).text),DISPOSABLES, "Verified Disposables text") - test.compare(str(waitForObjectExists(names.o_PreTreatmentBase_Prime_Text).text),PRIME, "Verified PRIME text") - test.compare(str(waitForObjectExists(names.o_PreTreatmentBase_Ultrafiltration_Text).text),ULTRAFILTERATION, "Verified Ultrafilteration text") - test.compare(str(waitForObjectExists(names.o_PreTreatmentBase_BP_HR_Text).text),BP_HR, "Verified BP/HR text") - test.compare(str(waitForObjectExists(names.o_PreTreatmentBase_Connection_Text).text),CONNECTION, "Verified Connection text") - test.compare(str(waitForObjectExists(names.o_PreTreatmentBase_Start_Text).text),START, "Verified Start text") - -def navigate_to_pretreatment_screen(): - """ - 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=1, water_sample_state=1, - 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 filter_flush_screen_navigation(): - """ - 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=1, 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 filter_flush_verification(total): - #hd_simulator.cmd_send_pre_treatment_self_test_dry_progress_data(filter_flush_progress_value,filter_flush_countdown_value) - #test.compare(waitForObject(names.o_PreTreatmentBase_TimeText_TimeText).text, - test.startSection("Verify the seconds values inside Progress bar and on timer 'Time in seconds'") - reset_treatment_time_verification(total) - start_treatment_time_verification(total) - test.endSection() -def verification_Bullets_text(): - test.verify((names.o_PreTreatmentBase_headStepBullet_StepBullet).visible, "Verify headstep bullet") - test.verify((names.o_PreTreatmentBase_indicator_StepIndicator).enable, "Verified indicator") + test.log("Navigating to water sample main screen for verification") + hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=1, water_sample_state=1,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 reset_treatment_time_verification(vTotal): - """ - Method to reset and verify Actual time in seconds - to Maximum & Minimum values on UI screen in seconds - @param vTotal: (int) Total time in seconds - """ + utility.page_step_indicator_verification(names.o_PreTreatmentSampleStack_PreTreatmentBase_TreatmentFlowBase,PRE_TREATMENT_STEP) + test.compare(str(waitForObjectExists(names.o_water_sample_button).text), config.WATER_SAMPLE_BUTTON_TEXT,"Water Sample button text should be {}".format(config.WATER_SAMPLE_BUTTON_TEXT)) + test.compare(waitForObjectExists(names.o_water_sample_button).enabled , True, "Water Sample button should be enabled") + mouseClick(waitForObject(names.o_water_sample_button)) + test.compare(waitForObjectExists(names.o_stephead_indicator).enabled, True,"Water Sample indicator should be enabled") - dg_simulator.cmd_send_dg_pre_treatment_filter_flush_progress_data(0,vTotal) - test.compare(waitForObjectExists(names.Time_text).parent.parent.maximum, vTotal, "Reset maximum value and compare it expected value{}".format(vTotal)) - test.compare(waitForObjectExists(names.Time_text).parent.parent.minimum, 0, "Reset minimun value and compare it expected value{}".format(0)) - -def start_treatment_time_verification(vTotal): - """ - Method to verify Actual time in seconds to Time appear on UI Screen in seconds. - Also it compare the Progress bar value in seconds - @param vTotal: (int) Total time in seconds ##as per behrouz comment @param vTotal - (int) Total time in seconds - """ - test.log("Start time") - for i in range(0,vTotal+1): - test.log("IN for loop") - dg_simulator.cmd_send_dg_pre_treatment_filter_flush_progress_data(300, vTotal - i) - test.compare(waitForObjectExists(names.progress_circle).parent.progressValue, i, "progress value should be {}".format(i)) - test.compare(waitForObjectExists(names.Time_text).parent.parent.timeTextValue, vTotal - i, "Expected Time on UI should be in seconds{}".format(vTotal - i)) - - -def total_time(): - """ - Method for providing two random values between the time duration range as per SRSUI documents from 60 to 480 Minutes + test.log("Navigating to water sample result screen") + test.compare(str(waitForObjectExists(names.o_next_button).text), config.NEXT_BUTTON_TEXT, "Next Button text should be {}".format(config.NEXT_BUTTON_TEXT)) + test.compare(waitForObjectExists(names.o_next_button).enabled , True,"Next button should be enabled") + mouseClick(waitForObject(names.o_next_button)) - """ - - totaltime_list = [] - id_count = 0 - while id_count < 2: - id = randint(MIN_TIME_RANGE, MAX_TIME_RANGE) - test.log(str(id),"Random total Seconds arrived by randint function") - if id in totaltime_list: - pass - else: - totaltime_list.append(id) - id_count += 1 - return totaltime_list - -def main_screen_verification(): - test.verify(waitForObjectExists(names.o_PreTreatmentBase_WATER_SAMPLE_Text).visible, "Sample text is bold") - test.verify(waitForObjectExists(names.o_PreTreatmentBase_NEXT_Text).visible, "Next button is enabled") - mouseClick(waitForObject(names.o_PreTreatmentBase_NEXT_Text)) + utility.page_step_indicator_verification(names.o_PreTreatmentSampleStack_PreTreatmentBase_TreatmentFlowBase,PRE_TREATMENT_STEP) + test.compare(str(waitForObjectExists(names.o_pass_button).text), config.PASS_TEXT,"Pass button text should be {}".format(config.PASS_TEXT)) + test.compare(waitForObjectExists(names.o_pass_button).enabled , True, "Pass button should be enabled") + mouseClick(waitForObject(names.o_pass_button)) + test.compare(waitForObjectExists(names.o_stephead_indicator).enabled, True,"Verifying Water Sample result indicator should be enabled") -def verify_water_sample_screen(): - test.verify(waitForObjectExists(names.o_PreTreatmentBase_PASS_Text).visible,"Verify pass button") - test.verify(waitForObjectExists(names.o_PreTreatmentBase_NEXT_Text).visible,"Verify Fail button") - mouseClick(waitForObject(names.o_PreTreatmentBase_PASS_Text)) - mouseClick(waitForObject(names.o_PreTreatmentBase_BACK_Text)) - mouseClick(waitForObject(names.o_PreTreatmentBase_NEXT_Text)) - mouseClick(waitForObject(names.o_PreTreatmentBase_FAIL_Text)) + test.log("Navigating to water sample screen for verification of back button") + test.compare(str(waitForObjectExists(names.o_back_button).text), config.BACK_BUTTON_TEXT,"Back button text should be {}".format(config.BACK_BUTTON_TEXT)) + test.compare(waitForObjectExists(names.o_back_button).enabled , True, "Back button should be enabled") + mouseClick(waitForObject(names.o_back_button)) + + test.log("Navigating to water sample result screen") + test.compare(str(waitForObjectExists(names.o_next_button).text), config.NEXT_BUTTON_TEXT, "Next Button text should be {}".format(config.NEXT_BUTTON_TEXT)) + test.compare(waitForObjectExists(names.o_next_button).enabled , True,"Next button should be enabled") + mouseClick(waitForObject(names.o_next_button)) + + test.log("Navigating to water sample result failed screen") + test.compare(str(waitForObjectExists(names.o_fail_button).text), config.FAIL_TEXT,"Fail button text should be {}".format(config.FAIL_TEXT)) + test.compare(waitForObjectExists(names.o_fail_button).enabled , True, "Fail button should be enabled") + mouseClick(waitForObject(names.o_fail_button)) + + utility.page_step_indicator_verification(names.o_PreTreatmentSampleStack_PreTreatmentBase_TreatmentFlowBase,PRE_TREATMENT_STEP) + test.compare(str(waitForObjectExists(names.o_ok_button).text), config.OK_TEXT,"OK button text should be {}".format(config.OK_TEXT)) + test.compare(waitForObjectExists(names.o_ok_button).enabled , True, "OK button should be enabled") + mouseClick(waitForObject(names.o_ok_button)) + test.compare(waitForObjectExists(names.o_stephead_indicator).enabled, True,"Verifying Water result failed indicator should be enabled") + -def verify_failed_water_sample_screen(): - test.log("Verify") - test.verify(waitForObjectExists(names.o_PreTreatmentBase_OK_Text).visible,"Verify ok button") - def main(): utils.tstStart(__file__) - startApplication("denaliSquish") - - filter_flush_screen_navigation() - waitForGUI(10) - verify_filter_flush_text() - #verification_Bullets_text() - dg_simulator.cmd_send_dg_pre_treatment_filter_flush_progress_data(300,100) - waitForGUI(5) - total_time_list = total_time() - for value in total_time_list: - filter_flush_verification(value) - #filter_flush_verification(total=5) - waitForGUI(5) - navigate_to_pretreatment_screen() - waitForGUI(5) - main_screen_verification() - waitForGUI(10) - verify_water_sample_screen() - waitForGUI(10) - verify_failed_water_sample_screen() - waitForGUI(10) - - utils.tstDone() - - \ No newline at end of file + startApplication(config.AUT_NAME) + test.log("Navigating to Filter Flush screen") + utility.navigate_to_pretreatment_screen(mode=1) + utility.page_step_indicator_verification(names.o_PreTreatmentSampleStack_PreTreatmentBase_TreatmentFlowBase,PRE_TREATMENT_STEP) + utility.verify_the_countdown(config.FILTER_FLUSH_TITLE) + utility.page_step_indicator_verification(names.o_PreTreatmentSampleStack_PreTreatmentBase_TreatmentFlowBase,PRE_TREATMENT_STEP) + verification_of_sample_water_state_screens() + utils.tstDone() \ No newline at end of file