Index: tst_Treatment_Adjustment_Duration/test.py =================================================================== diff -u -r393fd43e9a1cbf6b25a0f107928a051a622b2be2 -r867655840cada2d79fa5028c8fab68516ea59673 --- tst_Treatment_Adjustment_Duration/test.py (.../test.py) (revision 393fd43e9a1cbf6b25a0f107928a051a622b2be2) +++ tst_Treatment_Adjustment_Duration/test.py (.../test.py) (revision 867655840cada2d79fa5028c8fab68516ea59673) @@ -13,7 +13,9 @@ # import names -from dialin.squish import utils, denaliMessages +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) - denaliMessages.setTreatmentStartState() + HDSimulator.cmd_set_treatment_start_state() durationMin = 0 durationMax = 60 * 3 # 3h durationElapsed = 10 # 10m - denaliMessages.setTreatmentTime(durationMax * 60 , durationElapsed* 60 ) + HDSimulator.cmd_set_treatment_time(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) - denaliMessages.setTreatmentParamRanges(durationMin, durationMax, 0, 0, 0, 0) + HDSimulator.cmd_set_treatment_parameter_ranges(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 - denaliMessages.setTreatmentParamRanges(durationMin, durationMax, 0, 0, 0, 0) + HDSimulator.cmd_set_treatment_parameter_ranges(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 - denaliMessages.sendTreatmentAdjustDurationResponse(0, 4, 75, 0) + HDSimulator.cmd_send_treatment_adjust_duration_response(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 - denaliMessages.sendTreatmentAdjustDurationResponse(0, 4, 75, 0) + HDSimulator.cmd_send_treatment_adjust_duration_response(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 - denaliMessages.sendTreatmentAdjustDurationResponse(1, 0, 45, 1000) + HDSimulator.cmd_send_treatment_adjust_duration_response(1, 0, 45, 1000) test.compare(waitForObjectExists(names.o_treatmentStart_shape_Shape).visible, True) utils.tstDone()