mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-10 19:52:50 -03:00
Wait longer in GUI tabs test, and check for the precense of chat mode widget in GUI base tests
This commit is contained in:
parent
a105ce7229
commit
6b53e3f2c5
2 changed files with 11 additions and 4 deletions
|
@ -87,6 +87,7 @@ class GuiBaseTest(unittest.TestCase):
|
|||
self.assertFalse(hasattr(tab, "share_mode"))
|
||||
self.assertFalse(hasattr(tab, "receive_mode"))
|
||||
self.assertFalse(hasattr(tab, "website_mode"))
|
||||
self.assertFalse(hasattr(tab, "chat_mode"))
|
||||
|
||||
def new_share_tab(self):
|
||||
tab = self.gui.tabs.widget(0)
|
||||
|
|
|
@ -20,7 +20,7 @@ class TestTabs(GuiBaseTest):
|
|||
tab.get_mode().server_status.status,
|
||||
tab.get_mode().server_status.STATUS_WORKING,
|
||||
)
|
||||
QtTest.QTest.qWait(500)
|
||||
QtTest.QTest.qWait(1000)
|
||||
self.assertEqual(
|
||||
tab.get_mode().server_status.status,
|
||||
tab.get_mode().server_status.STATUS_STARTED,
|
||||
|
@ -138,21 +138,27 @@ class TestTabs(GuiBaseTest):
|
|||
self.gui.tabs.widget(1).share_button.click()
|
||||
self.assertFalse(self.gui.tabs.widget(1).new_tab.isVisible())
|
||||
self.assertTrue(self.gui.tabs.widget(1).share_mode.isVisible())
|
||||
self.assertEqual(self.gui.status_bar.server_status_label.text(), 'Ready to share')
|
||||
self.assertEqual(
|
||||
self.gui.status_bar.server_status_label.text(), "Ready to share"
|
||||
)
|
||||
|
||||
# New tab, receive files
|
||||
self.gui.tabs.new_tab_button.click()
|
||||
self.gui.tabs.widget(2).receive_button.click()
|
||||
self.assertFalse(self.gui.tabs.widget(2).new_tab.isVisible())
|
||||
self.assertTrue(self.gui.tabs.widget(2).receive_mode.isVisible())
|
||||
self.assertEqual(self.gui.status_bar.server_status_label.text(), 'Ready to receive')
|
||||
self.assertEqual(
|
||||
self.gui.status_bar.server_status_label.text(), "Ready to receive"
|
||||
)
|
||||
|
||||
# New tab, publish website
|
||||
self.gui.tabs.new_tab_button.click()
|
||||
self.gui.tabs.widget(3).website_button.click()
|
||||
self.assertFalse(self.gui.tabs.widget(3).new_tab.isVisible())
|
||||
self.assertTrue(self.gui.tabs.widget(3).website_mode.isVisible())
|
||||
self.assertEqual(self.gui.status_bar.server_status_label.text(), 'Ready to share')
|
||||
self.assertEqual(
|
||||
self.gui.status_bar.server_status_label.text(), "Ready to share"
|
||||
)
|
||||
|
||||
# Close tabs
|
||||
self.gui.tabs.tabBar().tabButton(0, QtWidgets.QTabBar.RightSide).click()
|
||||
|
|
Loading…
Reference in a new issue