Exemplo n.º 1
0
def test_window_positions(caplog):
    testing_utils.run_gui(core_config=None,
                          runtime_config={
                              'LEFT_BAR_WINDOW_SIZE': (800, 800),
                              'RIGHT_BAR_WINDOW_SIZE': (800, 800),
                              'CONSOLE_WINDOW_SIZE': (800, 800),
                              'LEFT_BAR_WINDOW_POS': (10, 10),
                              'RIGHT_BAR_WINDOW_POS': (10, 10),
                              'CONSOLE_WINDOW_POS': (10, 10),
                              'LEFT_BAR_WINDOW_UNDOCKED': False,
                              'RIGHT_BAR_WINDOW_UNDOCKED': False,
                              'CONSOLE_WINDOW_UNDOCKED': False
                          },
                          gui_config={
                              'HISTORY_ENABLED': False,
                              'AUTO_BACKUP_ENABLED': False
                          })
    from rafcon.gui.runtime_config import global_runtime_config
    original_runtime_config = global_runtime_config.as_dict()

    try:
        undock_sidebars()
    finally:
        for key, value in original_runtime_config.iteritems():
            call_gui_callback(global_runtime_config.set_config_value, key,
                              value)

        testing_utils.close_gui()
        testing_utils.shutdown_environment(caplog=caplog)
Exemplo n.º 2
0
def test_pane_positions(caplog):
    testing_utils.run_gui(gui_config={
        'HISTORY_ENABLED': False,
        'AUTO_BACKUP_ENABLED': False
    },
                          runtime_config={
                              'LEFT_BAR_DOCKED_POS': 500,
                              'RIGHT_BAR_DOCKED_POS': 950,
                              'CONSOLE_DOCKED_POS': 700,
                              'LEFT_BAR_WINDOW_UNDOCKED': False,
                              'RIGHT_BAR_WINDOW_UNDOCKED': False,
                              'CONSOLE_WINDOW_UNDOCKED': False
                          })
    from rafcon.gui.runtime_config import global_runtime_config
    original_runtime_config = global_runtime_config.as_dict()

    try:
        check_pane_positions()
    finally:
        for key, value in original_runtime_config.iteritems():
            call_gui_callback(global_runtime_config.set_config_value, key,
                              value)

        testing_utils.close_gui()
        testing_utils.shutdown_environment(caplog=caplog)
Exemplo n.º 3
0
def test_pane_positions(caplog):
    testing_utils.run_gui(core_config=None,
                          gui_config={
                              'HISTORY_ENABLED': False,
                              'AUTO_BACKUP_ENABLED': False
                          },
                          runtime_config={
                              'MAIN_WINDOW_MAXIMIZED': False,
                              'MAIN_WINDOW_SIZE': (1500, 800),
                              'MAIN_WINDOW_POS': (0, 0),
                              'LEFT_BAR_DOCKED_POS': 400,
                              'RIGHT_BAR_DOCKED_POS': 800,
                              'CONSOLE_DOCKED_POS': 600,
                              'LEFT_BAR_WINDOW_UNDOCKED': False,
                              'RIGHT_BAR_WINDOW_UNDOCKED': False,
                              'CONSOLE_WINDOW_UNDOCKED': False,
                              'LEFT_BAR_HIDDEN': False,
                              'RIGHT_BAR_HIDDEN': False,
                              'CONSOLE_HIDDEN': False,
                          })
    from rafcon.gui.runtime_config import global_runtime_config
    original_runtime_config = global_runtime_config.as_dict()

    try:
        check_pane_positions()
    finally:
        for key, value in original_runtime_config.items():
            call_gui_callback(global_runtime_config.set_config_value, key,
                              value)

        testing_utils.close_gui()
        testing_utils.shutdown_environment(caplog=caplog)