def i_log_in_the_xivo_client_with_bad_server_port(step):
    conf_dict = {
        'main_server_port': 123,
        'login': '******',
        'password': '******'
    }
    cti_helper.configure_client(conf_dict)
    res = cti_helper.log_in_the_xivo_client()
    world.xc_result = res['test_result']
def i_log_in_the_xivo_client_as_1_pass_2_logged_agent(step, login, password, login_status):
    conf_dict = {
        'main_server_address': common.get_host_address(),
        'login': login,
        'password': password,
        'agent_option': login_status,
    }
    cti_helper.configure_client(conf_dict)
    result = cti_helper.log_in_the_xivo_client()
    assert_that(result['test_result'], equal_to('passed'),
                'could not log in the CTI client as %s pass %s' % (login, password))
def when_i_disable_menu_availability(step):
    conf_dict = {'enable_presence_reporting': False}
    cti_helper.configure_client(conf_dict)
def when_i_show_profile_on_status_bar(step):
    conf_dict = {'display_profile': 1}
    cti_helper.configure_client(conf_dict)
def when_i_show_agent_option_on_login_screen(step):
    conf_dict = {'show_agent_option': 1}
    cti_helper.configure_client(conf_dict)
def when_i_disable_the_hide_unlogged_agents_option(step):
    conf_dict = {'hide_unlogged_agents_for_xlet_queue_members': False}
    cti_helper.configure_client(conf_dict)
def when_i_enable_screen_pop_up(step):
    conf_dict = {'enable_screen_popup': True}
    cti_helper.configure_client(conf_dict)
def when_i_update_configuration_as_group1_to_group2(step, conf_key, conf_value):
    conf_dict = {conf_key: conf_value}
    cti_helper.configure_client(conf_dict)
def when_i_disable_multiple_instances(step):
    conf_dict = {'enable_multiple_instances': False}
    cti_helper.configure_client(conf_dict)
def when_i_set_the_switchboard_queues(step):
    queues = step.hashes[0]
    conf_dict = {'switchboard_incalls_queue': queues['incalls'],
                 'switchboard_on_hold_queue': queues['on hold']}
    cti_helper.configure_client(conf_dict)
def when_i_enable_keep_password(step):
    conf_dict = {'keep_password': True}
    cti_helper.configure_client(conf_dict)
def when_i_disable_connect_at_startup(step):
    conf_dict = {'autoconnect': False}
    cti_helper.configure_client(conf_dict)
def when_i_disable_auto_reconnect(step):
    conf_dict = {'enable_auto_reconnect': False}
    cti_helper.configure_client(conf_dict)
def when_i_set_auto_reconnect_interval_to_group1_seconds(step, interval):
    conf_dict = {'auto_reconnect_interval': int(interval)}
    cti_helper.configure_client(conf_dict)
def when_i_disable_start_systrayed(step):
    conf_dict = {'enable_start_systrayed': False}
    cti_helper.configure_client(conf_dict)