def run_app(splash): """ Create and show Navigator's main window. """ window = MainWindow(splash=splash) window.setup() return window
def test_projects(qtbot, tmpconfig): tmpconfig.set('main', 'hide_quit_dialog', True) tmpconfig.set('main', 'hide_quit_dialog', True) tmpconfig.set('main', 'hide_update_dialog', True) widget = MainWindow( tab_home=False, tab_environments=False, tab_project=True, tab_community=False, tab_learning=False, config=tmpconfig, ) qtbot.addWidget(widget) def _interact(): with qtbot.waitSignal(widget._dialog_project_action.accepted, timeout=10000, raising=True): widget._dialog_project_action.accept() timer = QTimer() timer.setInterval(10000) timer.timeout.connect(_interact) timer.start() with qtbot.waitSignal(widget.sig_ready, timeout=30000, raising=True): widget.showMaximized()
def test_all(qtbot, tmpconfig): tmpconfig.set('main', 'hide_quit_dialog', True) tmpconfig.set('main', 'hide_quit_dialog', True) tmpconfig.set('main', 'hide_update_dialog', True) widget = MainWindow(config=tmpconfig) qtbot.addWidget(widget) with qtbot.waitSignal(widget.sig_ready, timeout=60000, raising=True): widget.showMaximized()
def botmain(qtbot, tmpconfig): tmpconfig.set('main', 'hide_quit_dialog', True) tmpconfig.set('main', 'hide_quit_dialog', True) tmpconfig.set('main', 'hide_update_dialog', True) widget = MainWindow(config=tmpconfig) qtbot.addWidget(widget) widget.showMaximized() return qtbot, widget
def test_geo_save(qtbot, tmpconfig): tmpconfig.set('main', 'hide_quit_dialog', True) tmpconfig.set('main', 'hide_quit_dialog', True) tmpconfig.set('main', 'hide_update_dialog', True) widget = MainWindow(config=tmpconfig) qtbot.addWidget(widget) with qtbot.waitSignal(widget.sig_ready, timeout=60000, raising=True): pass widget.close() assert tmpconfig.get('main', 'geo')
def test_learning(qtbot, tmpconfig): tmpconfig.set('main', 'hide_quit_dialog', True) tmpconfig.set('main', 'hide_quit_dialog', True) tmpconfig.set('main', 'hide_update_dialog', True) widget = MainWindow( tab_home=False, tab_environments=False, tab_project=False, tab_community=False, tab_learning=True, config=tmpconfig, ) qtbot.addWidget(widget) with qtbot.waitSignal(widget.sig_ready, timeout=30000, raising=True): widget.showMaximized()
def run_app(splash): """Create and show Navigator's main window.""" window = MainWindow(splash=splash, tab_project=False) # window.setup() return window