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