示例#1
0
def run_app(splash):
    """
    Create and show Navigator's main window.
    """
    window = MainWindow(splash=splash)
    window.setup()
    return window
示例#2
0
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()
示例#3
0
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()
示例#4
0
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
示例#5
0
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')
示例#6
0
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()
示例#7
0
def run_app(splash):
    """Create and show Navigator's main window."""
    window = MainWindow(splash=splash, tab_project=False)
    # window.setup()
    return window