mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-05 07:55:23 -04:00
Added test_autostop_timer, test_autostop_timer_too_short, and test_unreadable_file
This commit is contained in:
parent
981773070a
commit
4d5a9fdff5
2 changed files with 69 additions and 22 deletions
|
@ -59,7 +59,7 @@ class GuiBaseTest(unittest.TestCase):
|
|||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
# Quit
|
||||
QtCore.QTimer.singleShot(0, cls.gui.close_dialog.accept_button.click)
|
||||
QtCore.QTimer.singleShot(200, cls.gui.close_dialog.accept_button.click)
|
||||
cls.gui.close()
|
||||
|
||||
cls.gui.cleanup()
|
||||
|
@ -127,7 +127,7 @@ class GuiBaseTest(unittest.TestCase):
|
|||
def close_all_tabs(self):
|
||||
for _ in range(self.gui.tabs.count()):
|
||||
tab = self.gui.tabs.widget(0)
|
||||
QtCore.QTimer.singleShot(0, tab.close_dialog.accept_button.click)
|
||||
QtCore.QTimer.singleShot(200, tab.close_dialog.accept_button.click)
|
||||
self.gui.tabs.tabBar().tabButton(0, QtWidgets.QTabBar.RightSide).click()
|
||||
|
||||
def gui_loaded(self):
|
||||
|
@ -380,7 +380,7 @@ class GuiBaseTest(unittest.TestCase):
|
|||
def autostop_timer_widget_hidden(self, tab):
|
||||
"""Test that the auto-stop timer widget is hidden when share has started"""
|
||||
self.assertFalse(
|
||||
tab.get_mode().mode_settings_widget.autostop_timer_container.isVisible()
|
||||
tab.get_mode().mode_settings_widget.autostop_timer_widget.isVisible()
|
||||
)
|
||||
|
||||
def server_timed_out(self, tab, wait):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue