Index: shared/scripts/configuration/config.py =================================================================== diff -u -rbb798f36abcf369278c91d168e16c35003d0b55a -r0cc92d3b75bfb96dc4ecafd760a9ce15e455033b --- shared/scripts/configuration/config.py (.../config.py) (revision bb798f36abcf369278c91d168e16c35003d0b55a) +++ shared/scripts/configuration/config.py (.../config.py) (revision 0cc92d3b75bfb96dc4ecafd760a9ce15e455033b) @@ -15,13 +15,20 @@ import os -Application_name = "denaliSquish" +AUT_NAME = "denaliSquish" -COMMON_PATH = f"{os.environ['HOME']}/Projects" +COMMON_PATH = os.environ['HOME']+"/Projects" COLOR_CODES = {"Aqua": "#81ffff", "Blue": "#017dea", "Blue 2": "#1090d5", "Green": "#29fd2d", "Grey": "#d3d3d3", "Lavender": "#db98f5", "Light Blue": "#acd7f1", "Light Teal": "#29f1da","Lime": "#b7fc36", "Magenta":"#fd28fd", "Orange": "#f2721c", "Peach":"#f1979a", "Red": "#c53b33", "Rose":"#fc178d", "Slate blue":"#7f7ffa", "Violet": "#6435c9", "White": "#ffffff", "Yellow": "#fcfc4d"} +#standby mode +GOODMORNING_START_TIME_SEC = 0 +GOODEVENING_START_TIME_SEC = 43200 + +BLOOD_PRIMING_TEXT = "Blood Priming" +SALINE_UNIT = "mL" +BLOOD_PRIMING_DEFAULT_VALUE = "0 mL" Index: shared/scripts/configuration/utility.py =================================================================== diff -u -rbb798f36abcf369278c91d168e16c35003d0b55a -r0cc92d3b75bfb96dc4ecafd760a9ce15e455033b --- shared/scripts/configuration/utility.py (.../utility.py) (revision bb798f36abcf369278c91d168e16c35003d0b55a) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 0cc92d3b75bfb96dc4ecafd760a9ce15e455033b) @@ -17,10 +17,7 @@ import test import squish from configuration import config - from builtins import int as pyInt -#from builtins import str as pyStr -#from builtins import float as pyFloat def start_application(app_name): @@ -38,50 +35,35 @@ try: counter += 1 test.log("Starting {}".format(app_name)) - squish.startApplication(config.Application_name) + squish.startApplication(app_name) if counter == 1: - test.log(f"Application launched at the {counter}'st try.") + test.log("Application launched at the "+str(counter)+" st try.") elif counter == 2: - test.log(f"Application launched at the {counter}'nd try.") + test.log("Application launched at the "+str(counter)+" nd try.") elif counter == 3: - test.log(f"Application launched at the {counter}'rd try.") + test.log("Application launched at the "+str(counter)+" rd try.") else: - test.log(f"Application launched at the {counter}'th try.") - squish.snooze(20) + test.log("Application launched at the "+str(counter)+" th try.") break except RuntimeError: if counter == 1: - test.log(f"Application failed to launch after {counter} try - Please refer logs") + test.log("Application failed to launch after "+str(counter)+" try - Please refer logs") elif counter == 20: - test.log(f"Exiting after {counter} tries..") + test.log("Exiting after "+str(counter)+ " tries..") sys.exit(1) else: - test.log(f"Application failed to launch after {counter} tries - Please refer logs") + test.log("Application failed to launch after "+str(counter)+ " tries - Please refer logs") except: logErrorDetails("Failed to start the application") sys.exit(1) - -def color_verification(exp_val = "Red", act_val = "#c53b33"): - """ - Function to verify item color verification - Argument: - exp_val - Expected required value - act_val - Color displayed on UI - Return: - handle the application for log - """ - test.compare(config.COLOR_CODES[color_name],(act_val.color[name])) - - + def check_if_object_is_within_the_container(obj=None, container=None): """ check if an object is inside a container - Arguments: - obj - child UI object - container - container UI object - Return: - bool + @param obj - child UI object + @param container - container UI object + @return boolean true/false """ container = squish.findObject(container) containerPos = container.mapToGlobal(squish.QPoint(0, 0)) @@ -100,15 +82,12 @@ return False - def scroll_to_zone(zone=None, screen_object=None): """ scroll to the numeric if object is hidden - Arguments: - zone - UI object - screen_object - UI object (UI Home screen = waveforms + numerics) - Return: - bool + @param zone - UI object + @param screen_object - UI object (UI Home screen = waveforms + numerics) + @return boolean true/false """ counter = 0 while counter <= 100: Index: shared/scripts/names.py =================================================================== diff -u -r8df6f936193bbd9127d3ec940562e62db0060bcb -r0cc92d3b75bfb96dc4ecafd760a9ce15e455033b --- shared/scripts/names.py (.../names.py) (revision 8df6f936193bbd9127d3ec940562e62db0060bcb) +++ shared/scripts/names.py (.../names.py) (revision 0cc92d3b75bfb96dc4ecafd760a9ce15e455033b) @@ -1,10 +1,8 @@ # encoding: UTF-8 -AUT_NAME = "denaliSquish" from objectmaphelper import * - o_Gui_MainView = {"type": "Gui::MainView", "unnamed": 1, "visible": True} o_Overlay = {"container": o_Gui_MainView, "type": "Overlay", "unnamed": 1, "visible": True} o_borderRect_Rectangle = {"container": o_Overlay, "gradient": 0, "id": "_borderRect", "type": "Rectangle", "unnamed": 1, "visible": True} @@ -14,49 +12,40 @@ o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase = {"container": o_PreTreatmentCreateStack_PreTreatmentCreateStack, "objectName": "_PreTreatmentBase", "type": "TreatmentFlowBase", "visible": True} o_PreTreatmentBase_titleBar_StepNavigationTitleBar = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "gradient": 0, "id": "_titleBar", "type": "StepNavigationTitleBar", "unnamed": 1, "visible": True} o_titleBar_Rectangle = {"container": o_Overlay, "gradient": 0, "id": "_titleBar", "type": "Rectangle", "unnamed": 1, "visible": True} +o_treatmentStack_TreatmentStack = {"container": o_Gui_MainView, "objectName": "TreatmentStack", "type": "TreatmentStack", "visible": True} +o_treatmentStack_TreatmentBloodPrime_ScreenItem = {"container": o_treatmentStack_TreatmentStack, "objectName": "_TreatmentBloodPrime", "type": "ScreenItem", "visible": True} o_PreTreatmentBase_input_TextInput = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "echoMode": 0, "id": "_input", "type": "TextInput", "unnamed": 1, "visible": True} o_PreTreatmentBase_CONFIRM_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate = {"container": o_PreTreatmentCreateStack_PreTreatmentCreateStack, "objectName": "_PreTreatmentCreate", "type": "PreTreatmentCreate", "visible": True} o_PreTreatmentCreate_bloodFlowRate_SliderCreateTreatment = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "gradient": 0, "objectName": "_bloodFlowRate", "type": "SliderCreateTreatment", "visible": True} o_PreTreatmentCreate_bloodFlowRateSlider_Slider = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "gradient": 0, "objectName": "_bloodFlowRateSlider", "type": "Slider", "visible": True} o_PreTreatmentCreate_dialysateFlowRate_SliderCreateTreatment = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "gradient": 0, "objectName": "_dialysateFlowRate", "type": "SliderCreateTreatment", "visible": True} o_PreTreatementCreateStack_PreTreatmentBase_TreatmentFlowBase = {"container":o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase,"objectName":"_PreTreatmentBase","type":"TreatmentFlowBase", "visible": True} -back_b = {"container": o_PreTreatementCreateStack_PreTreatmentBase_TreatmentFlowBase, "gradient": 0, "objectName": "_backButton", "type": "BackButton", "visible": True} - -conform_c={"container": o_Gui_MainView, "gradient": 0, "objectName": "_confirmButton", "type": "TouchRect", "visible": False} +o_treatmentStack_treatmentHome_TreatmentHome = {"container": o_treatmentStack_TreatmentStack, "id": "_treatmentHome", "type": "TreatmentHome", "unnamed": 1, "visible": True} o_confirmButton_TouchRect = {"container": o_Gui_MainView, "gradient": 0, "objectName": "_confirmButton", "type": "TouchRect", "visible": False} o_backButton_BackButton = {"container": o_Gui_MainView, "gradient": 0, "objectName": "_backButton", "type": "BackButton", "visible": False} o_NinePatchImage = {"container": o_Gui_MainView, "occurrence": 6, "type": "NinePatchImage", "unnamed": 1, "visible": False} o_PreTreatmentBase_backgroundRect_Rectangle = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "gradient": 0, "id": "_backgroundRect", "type": "Rectangle", "unnamed": 1, "visible": True} -keyBackground_Rectangle = {"container": o_Gui_MainView, "gradient": 0, "id": "keyBackground", "type": "Rectangle", "unnamed": 1, "visible": True} -t_Text = {"container": o_Gui_MainView, "text": "t", "type": "Text", "unnamed": 1, "visible": True} o_PreTreatmentBase_confirmButton_TouchRect = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "gradient": 0, "objectName": "_confirmButton", "type": "TouchRect", "visible": True} #standbymode -patient_id = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "echoMode": 0, "id": "_input", "type": "TextInput", "unnamed": 1, "visible": True} o_MainHome_MainHome = {"container": o_Gui_MainView, "objectName": "_MainHome", "type": "MainHome", "visible": True} -standby_page = {"container": o_MainHome_MainHome, "type": "Column", "unnamed": 1, "visible": True} -displayed_time = {"container": o_Gui_MainView, "text": "01/06/2022 02:22:07", "type": "Text", "unnamed": 1, "visible": True} -create_treatment_rectangle = {"container": o_MainHome_MainHome, "gradient": 0, "id": "_createTreatmentRect", "type": "TouchRect", "unnamed": 1, "visible": True} -treatmentStack_TreatmentStack = {"container": o_Gui_MainView, "objectName": "TreatmentStack", "type": "TreatmentStack", "visible": True} -treatmentStack_TreatmentBloodPrime_ScreenItem = {"container": treatmentStack_TreatmentStack, "objectName": "_TreatmentBloodPrime", "type": "ScreenItem", "visible": True} +o_standby_page = {"container": o_MainHome_MainHome, "type": "Column", "unnamed": 1, "visible": True} #in-treatment -blood_priming = {"container": treatmentStack_TreatmentBloodPrime_ScreenItem, "text": "Blood Priming", "type": "Text", "unnamed": 1, "visible": True} -blood_priming_value_by_default = {"container": treatmentStack_TreatmentBloodPrime_ScreenItem, "text": "0 mL", "type": "Text", "unnamed": 1, "visible": True} -treatmentStack_treatmentHome_TreatmentHome = {"container": treatmentStack_TreatmentStack, "id": "_treatmentHome", "type": "TreatmentHome", "unnamed": 1, "visible": True} -uf_minimum_value = {"container": treatmentStack_treatmentHome_TreatmentHome, "text": "0.000", "type": "Text", "unnamed": 1, "visible": True} -uf_maximum_value = {"container": treatmentStack_treatmentHome_TreatmentHome, "text": "0.600", "type": "Text", "unnamed": 1, "visible": True} -uf_minimum_value_pop_up = {"container": o_Overlay, "text": "0.000", "type": "Text", "unnamed": 1, "visible": True} -uf_maximum_value_pop_up = {"container": o_Overlay, "text": "0.600", "type": "Text", "unnamed": 1, "visible": True} -edit_uf_value = {"container": o_Overlay, "text": "EDIT ULTRAFILTRATION VOLUME", "type": "Text", "unnamed": 1, "visible": True} -uf_maximum_title = {"container": o_Overlay, "text": "0.600", "type": "Text", "unnamed": 1, "visible": True} -uf_back_button = {"container": o_Overlay, "text": "BACK", "type": "Text", "unnamed": 1, "visible": True} -uf_close_button = {"container": o_Overlay, "id": "_image", "source": "qrc:/images/iClose", "type": "Image", "unnamed": 1, "visible": True} -fluid_text = {"container": treatmentStack_treatmentHome_TreatmentHome, "text": "Volume Delivered", "type": "Text", "unnamed": 1, "visible": True} -cumulative_fluid_text = {"container": treatmentStack_treatmentHome_TreatmentHome, "text": "Cumulative Delivered", "type": "Text", "unnamed": 1, "visible": True} +o_blood_priming = {"container": o_treatmentStack_TreatmentBloodPrime_ScreenItem, "text": "Blood Priming", "type": "Text", "unnamed": 1, "visible": True} +o_blood_priming_value_by_default = {"container": o_treatmentStack_TreatmentBloodPrime_ScreenItem, "text": "0 mL", "type": "Text", "unnamed": 1, "visible": True} +o_uf_minimum_value = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "0.000", "type": "Text", "unnamed": 1, "visible": True} +o_uf_maximum_value = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "0.600", "type": "Text", "unnamed": 1, "visible": True} +o_uf_minimum_value_pop_up = {"container": o_Overlay, "text": "0.000", "type": "Text", "unnamed": 1, "visible": True} +o_uf_maximum_value_pop_up = {"container": o_Overlay, "text": "0.600", "type": "Text", "unnamed": 1, "visible": True} +o_edit_uf_value = {"container": o_Overlay, "text": "EDIT ULTRAFILTRATION VOLUME", "type": "Text", "unnamed": 1, "visible": True} +o_uf_back_button = {"container": o_Overlay, "text": "BACK", "type": "Text", "unnamed": 1, "visible": True} +o_uf_close_button = {"container": o_Overlay, "id": "_image", "source": "qrc:/images/iClose", "type": "Image", "unnamed": 1, "visible": True} +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} Index: tst_In_treatment/test.py =================================================================== diff -u -r48849c79a27af51cb7c8c580b26694b3a880c603 -r0cc92d3b75bfb96dc4ecafd760a9ce15e455033b --- tst_In_treatment/test.py (.../test.py) (revision 48849c79a27af51cb7c8c580b26694b3a880c603) +++ tst_In_treatment/test.py (.../test.py) (revision 0cc92d3b75bfb96dc4ecafd760a9ce15e455033b) @@ -16,20 +16,14 @@ # section import names -import squish import re -from time import sleep from dialin.ui import utils from dialin.ui import unittests - from dialin.ui.hd_simulator import HDSimulator from builtins import str as pyStr -from builtins import int as pyInt +from configuration import utility, config -BLOOD_PRIMING_TEXT = "Blood Priming" -SALINE_UNIT = "mL" -BLOOD_PRIMING_DEFAULT_VALUE = "0 mL" UF_MINIMUM_VALUE = 0.000 UF_MAXIMUM_VALUE = 0.600 UF_DEFAULT_VALUE = 0.000 @@ -44,12 +38,12 @@ @return: N/A """ - blood_priming_page = waitForObject(names.blood_priming) + blood_priming_page = waitForObject(names.o_blood_priming) blood_priming_text = blood_priming_page.text - test.compare(blood_priming_text, BLOOD_PRIMING_TEXT) - blood_priming_value = waitForObject(names.blood_priming_value_by_default) + test.compare(blood_priming_text, config.BLOOD_PRIMING_TEXT) + blood_priming_value = waitForObject(names.o_blood_priming_value_by_default) blood_priming_text = blood_priming_value.text - test.compare(blood_priming_text, BLOOD_PRIMING_DEFAULT_VALUE) + test.compare(blood_priming_text, config.BLOOD_PRIMING_DEFAULT_VALUE) def verification_of_uf_from_dialysis_state(): @@ -58,10 +52,10 @@ @return: N/A """ - uf_minimum = waitForObject(names.uf_minimum_value) + uf_minimum = waitForObject(names.o_uf_minimum_value) uf_minimum_value = uf_minimum.text test.compare(format(UF_MINIMUM_VALUE, ".3f"), uf_minimum_value) - uf_maximum = waitForObject(names.uf_maximum_value) + uf_maximum = waitForObject(names.o_uf_maximum_value) uf_maximum_value = uf_maximum.text test.compare(format(UF_MAXIMUM_VALUE,".3f"), uf_maximum_value) @@ -72,7 +66,7 @@ @input: expected target value. """ - saline_value = waitForObject(names.fluid_text) + saline_value = waitForObject(names.o_fluid_text) saline_target = object.children(saline_value)[0] target_value = saline_target.text target_value_displayed = re.findall(r'\d+', pyStr(target_value)) @@ -85,9 +79,9 @@ @input: expected cumulative value. """ - saline_text = waitForObject(names.cumulative_fluid_text) + saline_text = waitForObject(names.o_cumulative_fluid_text) saline_unit = object.children(saline_text)[0] - if saline_unit.text == SALINE_UNIT: + if saline_unit.text == config.SALINE_UNIT: saline_cumulative = object.children(saline_text)[1] test.compare(pyStr(expected_cumulative_value), pyStr(saline_cumulative.text)) else: @@ -100,9 +94,9 @@ @input: expected delivered value. """ - saline_text = waitForObject(names.fluid_text) + saline_text = waitForObject(names.o_fluid_text) saline_unit = object.children(saline_text)[1] - if saline_unit.text == SALINE_UNIT: + if saline_unit.text == config.SALINE_UNIT: saline_cumulative = object.children(saline_text)[2] test.compare(pyStr(expected_delivered_value), pyStr(saline_cumulative.text)) else: @@ -116,33 +110,33 @@ @return: N/A """ #user clicks on ultra filteration section - uf_maximum = waitForObject(names.uf_maximum_value) + uf_maximum = waitForObject(names.o_uf_maximum_value) mouseClick(uf_maximum) utils.waitForGUI(0.5) - uf_minimum = waitForObject(names.uf_minimum_value_pop_up) + uf_minimum = waitForObject(names.o_uf_minimum_value_pop_up) uf_minimum_value = uf_minimum.text test.compare(format(UF_MINIMUM_VALUE, ".3f"), uf_minimum_value) - test.log(f"Uf minimum value should be {format(UF_MINIMUM_VALUE,'.3f')}") + test.log("Uf minimum value should be "+format(UF_MINIMUM_VALUE,'.3f')) - uf_maximum = waitForObject(names.uf_maximum_value_pop_up) + uf_maximum = waitForObject(names.o_uf_maximum_value_pop_up) uf_maximum_value = uf_maximum.text test.compare(format(UF_MAXIMUM_VALUE,".3f"), uf_maximum_value) - test.log(f"Uf maximum value should be {format(UF_MAXIMUM_VALUE,'.3f')}") + test.log("Uf maximum value should be "+format(UF_MAXIMUM_VALUE,'.3f')) - tapObject(waitForObject(names.edit_uf_value)) - uf_maximum_displayed = waitForObject(names.uf_maximum_value) + tapObject(waitForObject(names.o_edit_uf_value)) + uf_maximum_displayed = waitForObject(names.o_uf_maximum_value) test.compare(format(UF_MAXIMUM_VALUE,".3f"), uf_maximum_displayed.text) - test.log(f"Uf maximum value displayed on uf_edit section should be " +\ - f"{format(UF_MAXIMUM_VALUE,'.3f')} by default") + test.log("Uf maximum value displayed on uf_edit section should be " +\ + format(UF_MAXIMUM_VALUE,'.3f')+" by default") utils.waitForGUI(1) - tapObject(waitForObject(names.uf_back_button)) - tapObject(waitForObject(names.uf_close_button)) + tapObject(waitForObject(names.o_uf_back_button)) + tapObject(waitForObject(names.o_uf_close_button)) def main(): - utils.tstStart("Verification of In-Treatment section of application") - startApplication("denaliSquish") + utils.tstStart("tst_In-treatment") + utility.start_application(config.AUT_NAME) hd = HDSimulator() @@ -172,18 +166,16 @@ hd.cmd_set_treatment_saline_bolus_data(target = target_value, cumulative = cumulative_value, delivered = delivered_value) - test.log(f"Verification of saline values from dialysis state for target value : {target_value}"+\ - f" cumulative value : {cumulative_value} and delivered value : {delivered_value}") + test.log("Verification of saline values from dialysis state for target value :" + str(target_value)+\ + " cumulative value :" +str(cumulative_value)+" and delivered value :"+ str(delivered_value)) verification_of_target_value(expected_target_value = target_value) utils.waitForGUI(0.5) verification_of_delivered_value(expected_delivered_value = delivered_value) utils.waitForGUI(0.5) verification_of_cumulative_value(expected_cumulative_value = cumulative_value) utils.waitForGUI(0.5) - #hd.cmd_set_saline_bolus_response(accepted= 1, reason=0, target=150, state= 1) - - + utils.tstDone() Index: tst_post/test.py =================================================================== diff -u -red42bcf28d1d324fb3caff7301b4aeb03041d7ff -r0cc92d3b75bfb96dc4ecafd760a9ce15e455033b --- tst_post/test.py (.../test.py) (revision ed42bcf28d1d324fb3caff7301b4aeb03041d7ff) +++ tst_post/test.py (.../test.py) (revision 0cc92d3b75bfb96dc4ecafd760a9ce15e455033b) @@ -16,21 +16,17 @@ # This test is a demo and is intended to be used as an example on how to call the dialin API within SquishQt. -# import names from time import sleep from dialin.ui import utils from dialin.ui import unittests - from dialin.ui.hd_simulator import HDSimulator -# from dialin.ui.dg_simulator import DGSimulator -# from dialin.ui.hd_simulator_alarms import HDAlarmsSimulator + def main(): utils.tstStart("demo") startApplication("denaliSquish") hd = HDSimulator() - #dg = DGSimulator() hd.cmd_send_power_on_self_test_version_request() Index: tst_standbymode/test.py =================================================================== diff -u -rc178841263d7366f577776e63b59bd562e5d4d72 -r0cc92d3b75bfb96dc4ecafd760a9ce15e455033b --- tst_standbymode/test.py (.../test.py) (revision c178841263d7366f577776e63b59bd562e5d4d72) +++ tst_standbymode/test.py (.../test.py) (revision 0cc92d3b75bfb96dc4ecafd760a9ce15e455033b) @@ -1,22 +1,28 @@ +# -*- 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/01/11 +# author Joseph Varghese +# +# NOTE: +# This test contradicts verification of standbymode. + + import names -import squish -import math import datetime import test -import sys from time import sleep from dialin.ui import utils -from dialin.ui import unittests - from dialin.ui.hd_simulator import HDSimulator - -from builtins import str as pyStr +from configuration import utility, config from builtins import int as pyInt -# from dialin.ui.dg_simulator import DGSimulator -# from dialin.ui.hd_simulator_alarms import HDAlarmsSimulator -GOODMORNING_START_TIME_SEC = 0 -GOODEVENING_START_TIME_SEC = 43200 def get_current_time(): @@ -41,7 +47,7 @@ @return: N/A """ - standby_text = waitForObject(names.standby_page) + standby_text = waitForObject(names.o_standby_page) create_treatment = object.children(standby_text)[1] child = object.children(create_treatment)[1] test.compare(child.text, "CREATE TREATMENT") @@ -53,19 +59,19 @@ @return: current time in seconds """ - standby_text = waitForObject(names.standby_page) + standby_text = waitForObject(names.o_standby_page) child = object.children(standby_text)[0] - if current_time >= GOODMORNING_START_TIME_SEC and \ - current_time <= GOODEVENING_START_TIME_SEC: + if current_time >= config.GOODMORNING_START_TIME_SEC and \ + current_time <= config.GOODEVENING_START_TIME_SEC: test.compare(child.text, "Good Morning") else: test.compare(child.text, "Good Evening") def main(): - utils.tstStart("demo") - startApplication("denaliSquish") + utils.tstStart("tst_standbymode") + utility.start_application(config.AUT_NAME) hd = HDSimulator() #dg = DGSimulator() @@ -79,19 +85,4 @@ utils.tstDone() - - #sleep(10) - #hd.logger.debug("Canceling treatment") - #hd.cmd_send_hd_operation_mode(HDOpModes.MODE_STAN.value) - #hd.logger.debug("Starting treatment") - #hd.cmd_send_hd_operation_mode(HDOpModes.MODE_TREA.value) - - #hd.cmd_initiate_treatment_response(YES, 0) - - - #hd.pre_treatment_on_selected_patient_id() - # hd.cmd_send_hd_post(0, True, True) - # hd.cmd_send_hd_operation_mode(4, 0) - - #hd.pre_treatment() - #hd._handler_ui_pre_treatment_uf_request("6") + \ No newline at end of file