Index: tst_Treatment_Adjustment_Duration/test.py =================================================================== diff -u -r93fe289e1e33e4b2cf824e30f810490f073ecab3 -rcea779e4d5eb422603a9194f6b9a01ec7e268612 --- tst_Treatment_Adjustment_Duration/test.py (.../test.py) (revision 93fe289e1e33e4b2cf824e30f810490f073ecab3) +++ tst_Treatment_Adjustment_Duration/test.py (.../test.py) (revision cea779e4d5eb422603a9194f6b9a01ec7e268612) @@ -13,7 +13,9 @@ # import names -from dialin.ui import utils, hd_simulator +from dialin.ui import utils +from dialin import HDSimulator +HDSimulator = HDSimulator() def gotoScreenNtest_Contains_DurationSection(): @@ -33,13 +35,13 @@ gotoScreenNtest_Contains_DurationSection() utils.waitForGUI(1) - hd_simulator.setTreatmentStartState() + HDSimulator.setTreatmentStartState() durationMin = 0 durationMax = 60 * 3 # 3h durationElapsed = 10 # 10m - hd_simulator.setTreatmentTime(durationMax * 60, durationElapsed * 60) + HDSimulator.setTreatmentTime(durationMax * 60, durationElapsed * 60) test.compare(str(waitForObjectExists(names.o_treatmentStart_TimeText_TimeText ).time), "02:50:00") test.compare(str(waitForObjectExists(names.o_treatmentStart_TimeText_hour_Text ).text), "02") @@ -49,13 +51,13 @@ gotoScreenNTest_Adjustment() utils.waitForGUI(1) - hd_simulator.setTreatmentParamRanges(durationMin, durationMax, 0, 0, 0, 0) + HDSimulator.setTreatmentParamRanges(durationMin, durationMax, 0, 0, 0, 0) test.compare(waitForObjectExists(names.o_durationSlider_Slider).minimum, durationMin) test.compare(waitForObjectExists(names.o_durationSlider_Slider).maximum, durationMax) durationMin = 10 # 10m durationMax = 60 * 2 # 2h - hd_simulator.setTreatmentParamRanges(durationMin, durationMax, 0, 0, 0, 0) + HDSimulator.setTreatmentParamRanges(durationMin, durationMax, 0, 0, 0, 0) test.compare(waitForObjectExists(names.o_durationSlider_Slider).minimum, durationMin) test.compare(waitForObjectExists(names.o_durationSlider_Slider).maximum, durationMax) @@ -73,20 +75,20 @@ mouseClick(waitForObjectExists(names.o_confirmButton)) # rejected 65, revert to 75 - hd_simulator.sendTreatmentAdjustDurationResponse(0, 4, 75, 0) + HDSimulator.sendTreatmentAdjustDurationResponse(0, 4, 75, 0) test.compare(str(waitForObjectExists(names.o_TimeText_hour_Text_2 ).text), "01") test.compare(str(waitForObjectExists(names.o_TimeText_minute_Text_2).text), "15") # rejected 65, revert to 75 # let's see if we got twice with no change do we still act the same - hd_simulator.sendTreatmentAdjustDurationResponse(0, 4, 75, 0) + HDSimulator.sendTreatmentAdjustDurationResponse(0, 4, 75, 0) test.compare(str(waitForObjectExists(names.o_TimeText_hour_Text_2 ).text), "01") test.compare(str(waitForObjectExists(names.o_TimeText_minute_Text_2).text), "15") test.compare(waitForObjectExists(names.o_modalDialog).visible, True) # accepted - hd_simulator.sendTreatmentAdjustDurationResponse(1, 0, 45, 1000) + HDSimulator.sendTreatmentAdjustDurationResponse(1, 0, 45, 1000) test.compare(waitForObjectExists(names.o_treatmentStart_shape_Shape).visible, True) utils.tstDone()