mirror of
https://github.com/jopohl/urh.git
synced 2026-03-08 01:06:49 +01:00
24 lines
930 B
Python
24 lines
930 B
Python
from PyQt5.QtWidgets import QApplication
|
|
|
|
from tests.QtTestCase import QtTestCase
|
|
|
|
|
|
class TestMaincontrollerGUI(QtTestCase):
|
|
def test_open_recent(self):
|
|
# Ensure we have at least one recent action
|
|
self.add_signal_to_form("esaver.complex")
|
|
self.assertEqual(len(self.form.signal_tab_controller.signal_frames), 1)
|
|
|
|
self.form.recentFileActionList[0].trigger()
|
|
self.assertEqual(len(self.form.signal_tab_controller.signal_frames), 2)
|
|
|
|
def test_update_decodings(self):
|
|
self.form.update_decodings()
|
|
self.assertTrue(True)
|
|
|
|
def test_options_changed(self):
|
|
self.add_signal_to_form("esaver.complex")
|
|
self.form.on_options_changed({"rel_symbol_length": 0, "show_pause_as_time": True, "default_view": 2})
|
|
QApplication.instance().processEvents()
|
|
self.assertEqual(self.form.signal_tab_controller.signal_frames[0].ui.cbProtoView.currentIndex(), 2)
|