mirror of
https://github.com/onionshare/onionshare.git
synced 2025-02-07 10:25:29 -05: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
9356df7b72
commit
54a2fb069d
@ -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…
x
Reference in New Issue
Block a user