Index: tst_ConfirmPrimingBegin/test.py =================================================================== diff -u -ra6462504dcafb3bfbc8638c83bc06321d1362912 -ref497ba544e919ae353985f2b3915997c5da3f32 --- tst_ConfirmPrimingBegin/test.py (.../test.py) (revision a6462504dcafb3bfbc8638c83bc06321d1362912) +++ tst_ConfirmPrimingBegin/test.py (.../test.py) (revision ef497ba544e919ae353985f2b3915997c5da3f32) @@ -4,7 +4,6 @@ from dialin.squish import utils from dialin.ui.hd_simulator import HDSimulator from dialin.common.msg_defs import RequestRejectReasons -from dialin.squish.utils import waitForGUI def skip_create_treatment(hd_simulator: HDSimulator): """ @@ -30,48 +29,57 @@ skip_create_treatment(hd_simulator) - test.compare(waitForObject(names.o_confirm_treatment_flickable).visible, True, "Found confirm treatment flickable") + test.compare(waitForObjectExists(names.o_confirm_treatment_flickable).visible, True, "Found confirm treatment flickable") + utils.waitForGUI(1) # object not ready flick(waitForObject(names.o_confirm_treatment_flickable), 0, 700) mouseClick(waitForObject(names.o_create_treatment_confirm)) # wait for priming simulation to complete - waitForGUI(7) + utils.waitForGUI(7) # advance to start the treatment test.compare(waitForObject(names.o_priming_flickable).visible, True, "Found priming flickable") flick(waitForObject(names.o_priming_flickable), 0, 123) test.compare(waitForObject(names.o_priming_continue_button).visible, True, "Found priming continue button") mouseClick(waitForObject(names.o_priming_continue_button)) + utils.waitForGUI(0.5) # object not ready + test.compare(waitForObjectExists(names.o_treatment_begin_back_button).visible, True, "Found treatment begin back button") - test.compare(waitForObject(names.o_treatment_begin_back_button).visible, True, "Found treatment begin back button") mouseClick(waitForObject(names.o_treatment_begin_back_button)) + utils.waitForGUI(0.5) # object not ready test.compare(waitForObject(names.o_priming_back_button).visible, True, "Found priming back button") + mouseClick(waitForObject(names.o_priming_back_button)) + utils.waitForGUI(0.5) # object not ready test.compare(waitForObject(names.o_create_treatment_confirm_back_button).visible, True, "Found create treatment confirm back button") - mouseClick(waitForObject(names.o_create_treatment_confirm_back_button)) + + mouseClick(waitForObject(names.o_create_treatment_confirm_back_button)) + utils.waitForGUI(0.5) test.compare(waitForObject(names.o_create_treatment_back_button).visible, True, "Found create treatment back button") + mouseClick(waitForObject(names.o_create_treatment_back_button)) - waitForGUI(0.1) + utils.waitForGUI(0.1) mouseClick(waitForObject(names.o_create_treatment_button)) - waitForGUI(0.1) - skip_create_treatment(hd_simulator) - test.compare(waitForObject(names.o_create_treatment_confirm).visible, True, "Found treatment confirm button") - mouseClick(waitForObject(names.o_create_treatment_confirm)) - # wait for priming simulation to complete - waitForGUI(7) - test.compare(waitForObject(names.o_priming_continue_button).visible, True, "Found priming continue button") - mouseClick(waitForObject(names.o_priming_continue_button)) - test_ultrafiltration_slider(hd_simulator) - test.compare(waitForObject(names.o_treatment_begin_start_button).visible, True, "Found treatment start button") - mouseClick(waitForObject(names.o_treatment_begin_start_button)) - waitForGUI(0.1) - mouseClick(waitForObject(names.o_treatmentStart_back)) - mouseClick(waitForObject(names.o_mainMenu_settings)) - mouseClick(waitForObject(names.o_settings_end_treatment)) - waitForGUI(3) + utils.waitForGUI(0.1) +# skip_create_treatment(hd_simulator) +# utils.waitForGUI(1) +# test.compare(waitForObjectExists(names.o_create_treatment_confirm).visible, True, "Found treatment confirm button") +# mouseClick(waitForObject(names.o_create_treatment_confirm)) +# # wait for priming simulation to complete +# utils.waitForGUI(7) +# test.compare(waitForObject(names.o_priming_continue_button).visible, True, "Found priming continue button") +# mouseClick(waitForObject(names.o_priming_continue_button)) +# test_ultrafiltration_slider(hd_simulator) +# test.compare(waitForObject(names.o_treatment_begin_start_button).visible, True, "Found treatment start button") +# mouseClick(waitForObject(names.o_treatment_begin_start_button)) +# utils.waitForGUI(0.1) +# mouseClick(waitForObject(names.o_treatmentStart_back)) +# mouseClick(waitForObject(names.o_mainMenu_settings)) +# mouseClick(waitForObject(names.o_settings_end_treatment)) + utils.waitForGUI(3) def test_ultrafiltration_slider(hd_simulator: HDSimulator): """ @@ -94,7 +102,7 @@ "type": "Text" } - test.compare(waitForObject(selected_value_object).visible, True) + test.compare(waitForObjectExists(selected_value_object).visible, True) mouseClick(waitForObject(slider_object), 0, 0, Qt.LeftButton) test.compare(waitForObject(selected_value_object).text, "{0} {1}".format(0, "mL"))