Index: tst_DGOperationMode/test.py =================================================================== diff -u -r343ceb5e6ac46457315f5e3abe762b13fa8db8c4 -r316fd2f51b0fa89c0f69949d79ef246e1e4bc4ed --- tst_DGOperationMode/test.py (.../test.py) (revision 343ceb5e6ac46457315f5e3abe762b13fa8db8c4) +++ tst_DGOperationMode/test.py (.../test.py) (revision 316fd2f51b0fa89c0f69949d79ef246e1e4bc4ed) @@ -1,25 +1,24 @@ # -*- 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_DGOperationMode -# date 2020/07/26 -# author Behrouz NematiPour +# Copyright (c) 2020-2025 Diality Inc. - All Rights Reserved. # +# 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 test.py +# +# @author (last) Vy +# @date (last) 01-Dec-2023 +# @author (original) Behrouz NemaiPour +# @date (original) 28-Jul-2020 +# +############################################################################ import names -if names.DIALIN_LINK: - from dialin.squish import utils, denaliMessages -else: - import utils - import denaliMessages +from dialin.ui import utils +from configuration import config, utility - opModes = [ "DG_MODE_FAUL" , "DG_MODE_SERV" , @@ -36,43 +35,50 @@ ] def gotoScreenNtest_Contains_DGOperationModeData(): - mouseClick(waitForObject(names.o_mainMenu_manager)) + mainMenuManager = utility.get_object_from_names(names.o_mainMenu_manager, "names.o_mainMenu_manager object is missing") + if mainMenuManager is not None: + mouseClick(waitForObject(names.o_mainMenu_manager)) test_values(0) def test_values(vDGOpMode): + test.fail(f"TODO need to update body of the test_value({vDGOpMode}) function...return") + return + if (vDGOpMode < len(opModes)): test.compare(str(waitForObjectExists(names.o_managerHome_DGOperationModeData_DGOpMode).text), opModes[vDGOpMode]) else: test.compare(str(waitForObjectExists(names.o_managerHome_DGOperationModeData_DGOpMode).text), "UNDEFINED [{}]".format(vDGOpMode)) - +def setDGOperationMode(vValue1): + test.fail(f"TODO need to populate the body, used to be denaliMessages.setDGOperationMode({vValue1})") + def main(): utils.tstStart(__file__) - startApplication(names.AUT_NAME) + startApplication(config.AUT_NAME) utils.waitForGUI(1) gotoScreenNtest_Contains_DGOperationModeData() utils.waitForGUI(1) step = 1 for i in range ( 0, len(opModes), step): - denaliMessages.setDGOperationMode(i) + setDGOperationMode(i) test_values (i) - denaliMessages.setDGOperationMode(1) + setDGOperationMode(1) test_values (1) # Coverage - denaliMessages.setDGOperationMode(1) + setDGOperationMode(1) test_values (1) - denaliMessages.setDGOperationMode(0) + setDGOperationMode(0) test_values (0) outOfRangeCheck = len(opModes) + 1 - denaliMessages.setDGOperationMode(outOfRangeCheck) + setDGOperationMode(outOfRangeCheck) test_values (outOfRangeCheck) utils.tstDone()