Add simple test to ensure we can click the settings button

This commit is contained in:
Miguel Jacq 2018-10-17 13:48:13 +11:00
parent c79eedd626
commit f7ab305049
No known key found for this signature in database
GPG Key ID: EEA4341C6D97A0B6

View File

@ -0,0 +1,27 @@
#!/usr/bin/env python3
import pytest
import unittest
from PyQt5 import QtCore, QtTest
from .GuiShareTest import GuiShareTest
class LocalOpenSettingsDialogTest(unittest.TestCase, GuiShareTest):
@classmethod
def setUpClass(cls):
test_settings = {
}
cls.gui = GuiShareTest.set_up(test_settings, 'LocalOpenSettingsDialogTest')
@classmethod
def tearDownClass(cls):
GuiShareTest.tear_down()
def test_gui(self):
self.run_all_common_setup_tests()
self.run_all_share_mode_setup_tests()
# Make sure we can open the settings dialog via the settings button
QtCore.QTimer.singleShot(1000, self.accept_dialog)
QtTest.QTest.mouseClick(self.gui.settings_button, QtCore.Qt.LeftButton)
if __name__ == "__main__":
unittest.main()