Extend coverage of website mode tests

This commit is contained in:
Miguel Jacq 2019-09-03 12:23:27 +10:00
parent 458a0fb1d0
commit 9ae98eb7cb
No known key found for this signature in database
GPG key ID: EEA4341C6D97A0B6
5 changed files with 13 additions and 12 deletions

View file

@ -202,6 +202,9 @@ class GuiBaseTest(object):
else:
self.assertIsNone(mode.server_status.web.password, r'(\w+)-(\w+)')
def add_button_visible(self, mode):
'''Test that the add button should be visible'''
self.assertTrue(mode.server_status.file_selection.add_button.isVisible())
def url_description_shown(self, mode):
'''Test that the URL label is showing'''
@ -253,7 +256,7 @@ class GuiBaseTest(object):
def server_is_stopped(self, mode, stay_open):
'''Test that the server stops when we click Stop'''
if type(mode) == ReceiveMode or (type(mode) == ShareMode and stay_open):
if type(mode) == ReceiveMode or (type(mode) == ShareMode and stay_open) or (type(mode) == WebsiteMode):
QtTest.QTest.mouseClick(mode.server_status.server_button, QtCore.Qt.LeftButton)
self.assertEqual(mode.server_status.status, 0)