From fd1174c41d8b625e10559b242bf0e6279a9cd20a Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Fri, 12 Oct 2018 20:44:10 +1100 Subject: [PATCH] Commit missing test changes for canceling a share --- tests_gui/TorGuiBaseTest.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests_gui/TorGuiBaseTest.py b/tests_gui/TorGuiBaseTest.py index 1c313726..b182b1d4 100644 --- a/tests_gui/TorGuiBaseTest.py +++ b/tests_gui/TorGuiBaseTest.py @@ -132,10 +132,17 @@ class TorGuiBaseTest(GuiBaseTest): def cancel_the_share(self, mode): '''Test that we can cancel this share before it's started up ''' - QtTest.QTest.mousePress(self.gui.mode.server_status.server_button, QtCore.Qt.LeftButton) + self.server_working_on_start_button_pressed(self.gui.share_mode) + self.server_status_indicator_says_starting(self.gui.share_mode) + self.add_delete_buttons_hidden() + self.settings_button_is_hidden() + QtTest.QTest.mousePress(mode.server_status.server_button, QtCore.Qt.LeftButton) QtTest.QTest.qWait(1000) - QtTest.QTest.mouseRelease(self.gui.mode.server_status.server_button, QtCore.Qt.LeftButton) - self.assertEqual(self.gui.mode.server_status.status, 0) + QtTest.QTest.mouseRelease(mode.server_status.server_button, QtCore.Qt.LeftButton) + self.assertEqual(mode.server_status.status, 0) + self.server_is_stopped(self.gui.share_mode, False) + self.web_service_is_stopped() + # Stealth tests def copy_have_hidserv_auth_button(self, mode):