# -*- 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_DGPressuresData # date 2020/07/26 # author Behrouz NematiPour # import names from dialin.ui import utils from configuration import config, utility def gotoScreenNtest_Contains_DGPressuresData(): 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, 0, 0, 0) def test_values(vROInletPSI, vROOutletPSI, vDrainInletPSI, vDrainOutletPSI): test.fail("TODO need to update the test_value function..return") return test.compare(str(waitForObjectExists(names.o_managerHome_DGPressuresData_ROInletPSI ).text), "{:.2f}".format(vROInletPSI )) test.compare(str(waitForObjectExists(names.o_managerHome_DGPressuresData_ROOutletPSI ).text), "{:.2f}".format(vROOutletPSI )) test.compare(str(waitForObjectExists(names.o_managerHome_DGPressuresData_DrainInletPSI ).text), "{:.2f}".format(vDrainInletPSI )) test.compare(str(waitForObjectExists(names.o_managerHome_DGPressuresData_DrainOutletPSI).text), "{:.2f}".format(vDrainOutletPSI)) def setDGPressuresData(vValue1, vValue2, vValue3, vValue4): test.fail(f"TODO need to populate the body, used to be denaliMessages.setDGOperationMode({vValue1}, {vValue2}, {vValue3}, {vValue4})") def main(): utils.tstStart(__file__) startApplication(config.AUT_NAME) utils.waitForGUI(1) gotoScreenNtest_Contains_DGPressuresData() utils.waitForGUI(1) step = 10 for i in range ( 10, 500, step): setDGPressuresData(i, i + step * 1, i + step * 2, i + step * 3) test_values (i, i + step * 1, i + step * 2, i + step * 3) setDGPressuresData(100, 200, 300, 400) test_values (100, 200, 300, 400) setDGPressuresData(100, 200, 300, 400) test_values (100, 200, 300, 400) # Coverage setDGPressuresData(0, 0, 0, 0) test_values (0, 0, 0, 0) utils.tstDone()