Fix local GUI tests so they pass

This commit is contained in:
Micah Lee 2018-09-29 18:24:11 -07:00
parent cae9ca4b72
commit e9d1a88aa4
8 changed files with 171 additions and 122 deletions

View file

@ -94,68 +94,76 @@ class OnionShareGuiTest(unittest.TestCase):
def test_server_status_bar_is_visible(self):
CommonTests.test_server_status_bar_is_visible(self)
@pytest.mark.run(order=5)
def test_info_widget_is_visible(self):
CommonTests.test_info_widget_is_visible(self, 'share')
@pytest.mark.run(order=6)
def test_info_widget_shows_less(self):
CommonTests.test_info_widget_shows_less(self, 'share')
@pytest.mark.run(order=7)
def test_history_is_not_visible(self):
CommonTests.test_history_is_not_visible(self, 'share')
@pytest.mark.run(order=8)
def test_click_toggle_history(self):
CommonTests.test_click_toggle_history(self, 'share')
@pytest.mark.run(order=9)
def test_history_is_visible(self):
CommonTests.test_history_is_visible(self, 'share')
@pytest.mark.run(order=7)
@pytest.mark.run(order=10)
def test_server_working_on_start_button_pressed(self):
CommonTests.test_server_working_on_start_button_pressed(self, 'share')
@pytest.mark.run(order=8)
@pytest.mark.run(order=11)
def test_server_status_indicator_says_starting(self):
CommonTests.test_server_status_indicator_says_starting(self, 'share')
@pytest.mark.run(order=9)
@pytest.mark.run(order=12)
def test_settings_button_is_hidden(self):
CommonTests.test_settings_button_is_hidden(self)
@pytest.mark.run(order=10)
@pytest.mark.run(order=13)
def test_a_server_is_started(self):
CommonTests.test_a_server_is_started(self, 'share')
@pytest.mark.run(order=11)
@pytest.mark.run(order=14)
def test_a_web_server_is_running(self):
CommonTests.test_a_web_server_is_running(self)
@pytest.mark.run(order=12)
@pytest.mark.run(order=15)
def test_have_a_slug(self):
CommonTests.test_have_a_slug(self, 'share', False)
global slug
slug = self.gui.share_mode.server_status.web.slug
@pytest.mark.run(order=13)
@pytest.mark.run(order=16)
def test_server_status_indicator_says_started(self):
CommonTests.test_server_status_indicator_says_started(self, 'share')
@pytest.mark.run(order=14)
@pytest.mark.run(order=17)
def test_server_is_stopped(self):
CommonTests.test_server_is_stopped(self, 'share', True)
@pytest.mark.run(order=15)
@pytest.mark.run(order=18)
def test_web_service_is_stopped(self):
CommonTests.test_web_service_is_stopped(self)
@pytest.mark.run(order=16)
@pytest.mark.run(order=19)
def test_server_status_indicator_says_closed(self):
CommonTests.test_server_status_indicator_says_closed(self, 'share', True)
@pytest.mark.run(order=17)
@pytest.mark.run(order=20)
def test_server_started_again(self):
CommonTests.test_server_working_on_start_button_pressed(self, 'share')
CommonTests.test_server_status_indicator_says_starting(self, 'share')
CommonTests.test_a_server_is_started(self, 'share')
@pytest.mark.run(order=18)
@pytest.mark.run(order=21)
def test_have_same_slug(self):
'''Test that we have the same slug'''
self.assertEqual(self.gui.share_mode.server_status.web.slug, slug)
@pytest.mark.run(order=19)
@pytest.mark.run(order=22)
def test_server_is_stopped_again(self):
CommonTests.test_server_is_stopped(self, 'share', True)
CommonTests.test_web_service_is_stopped(self)