Index: tst_ConfirmPrimingBegin/test.py =================================================================== diff -u -ra6462504dcafb3bfbc8638c83bc06321d1362912 -rf29743f1a3b34472a3df5eaa4f8861fbc425f9ee --- tst_ConfirmPrimingBegin/test.py (.../test.py) (revision a6462504dcafb3bfbc8638c83bc06321d1362912) +++ tst_ConfirmPrimingBegin/test.py (.../test.py) (revision f29743f1a3b34472a3df5eaa4f8861fbc425f9ee) @@ -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.5) mouseClick(waitForObject(names.o_create_treatment_button)) - waitForGUI(0.1) + utils.waitForGUI(0.5) skip_create_treatment(hd_simulator) - test.compare(waitForObject(names.o_create_treatment_confirm).visible, True, "Found treatment confirm button") + 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 - waitForGUI(7) + 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)) - waitForGUI(0.1) + utils.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(3) def test_ultrafiltration_slider(hd_simulator: HDSimulator): """ @@ -82,7 +90,7 @@ """ slider_name = "_ultrafiltration" slider_object_name = slider_name + "Slider" - test.log("Slider Under Test", slider_object_name) + # test.log("Slider Under Test", slider_object_name) slider_selected_value_object_name = slider_name + "Value" slider_object = {"container": names.o_treatment_begin_container, "objectName": slider_object_name, @@ -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"))