# -*- 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_Treatment_Time # date 2020/04/10 # author Behrouz NematiPour # import names from dialin.ui import utils from dialin import HDSimulator hd_sim = HDSimulator() def gotoScreenNtest_Contains_TimeSection(): mouseClick(waitForObject(names.o_treatmentHome_startTreatment)) test.compare(waitForObjectExists(names.o_treatmentStart_shape_Shape).visible, True) def startNTestTreatmentTime(vTotal): for i in range(0,vTotal+1): hd_sim.cmd_set_treatment_time(vTotal, i, vTotal - i) test.compare(waitForObjectExists(names.o_treatmentStart_shape_Shape).parent.parent.parent.parent.progressValue, i) test.compare(waitForObjectExists(names.o_treatmentStart_shape_Shape).parent.parent.parent.parent.timeTextValue, vTotal - i) def resetNTestTreatmentTime(vTotal): hd_sim.cmd_set_treatment_time(vTotal, 0, vTotal) test.compare(waitForObjectExists(names.o_treatmentStart_shape_Shape).parent.parent.parent.parent.maximum, vTotal) test.compare(waitForObjectExists(names.o_treatmentStart_shape_Shape).parent.parent.parent.parent.minimum, 0) def main(): utils.tstStart(__file__) startApplication(names.AUT_NAME) utils.waitForGUI(1) gotoScreenNtest_Contains_TimeSection() utils.waitForGUI(1) hd_sim.cmd_set_treatment_start_state() total = 60 resetNTestTreatmentTime(total) startNTestTreatmentTime(total) resetNTestTreatmentTime(total) total = 10 resetNTestTreatmentTime(total) startNTestTreatmentTime(total) resetNTestTreatmentTime(total) utils.tstDone()