# -*- 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_DGLoadCellReadingsData # date 2020/07/26 # author Behrouz NematiPour # import names if names.DIALIN_LINK: from dialin.squish import utils, denaliMessages else: import utils import denaliMessages def gotoScreenNtest_Contains_DGLoadCellReadingsData(): mouseClick(waitForObject(names.o_mainMenu_manager)) test_values(0, 0, 0, 0) def test_values(vRs1Prim, vRs1Bkup, vRs2Prim, vRs2Bkup): test.compare(str(waitForObjectExists(names.o_managerHome_DGLoadCellReadingsData_Rs1Prim).text), "{:.2f}".format(vRs1Prim)) test.compare(str(waitForObjectExists(names.o_managerHome_DGLoadCellReadingsData_Rs1Bkup).text), "{:.2f}".format(vRs1Bkup)) test.compare(str(waitForObjectExists(names.o_managerHome_DGLoadCellReadingsData_Rs2Prim).text), "{:.2f}".format(vRs2Prim)) test.compare(str(waitForObjectExists(names.o_managerHome_DGLoadCellReadingsData_Rs2Bkup).text), "{:.2f}".format(vRs2Bkup)) def main(): utils.tstStart(__file__) startApplication(names.AUT_NAME) utils.waitForGUI(1) gotoScreenNtest_Contains_DGLoadCellReadingsData() utils.waitForGUI(1) step = 10 for i in range ( 10, 500, step): denaliMessages.setDGLoadCellReadingsData(i, i + step * 1, i + step * 2, i + step * 3) test_values (i, i + step * 1, i + step * 2, i + step * 3) denaliMessages.setDGLoadCellReadingsData(100, 200, 300, 400) test_values (100, 200, 300, 400) denaliMessages.setDGLoadCellReadingsData(100, 200, 300, 400) test_values (100, 200, 300, 400) # Coverage denaliMessages.setDGLoadCellReadingsData(0, 0, 0, 0) test_values (0, 0, 0, 0) utils.tstDone()