def add_configuration_with_queue(config_name, work_start, work_end, queue_name): delete_confs_with_name(config_name) queue_id = queue_helper.find_queue_id_with_name(queue_name) conf = _build_base_configuration(config_name, work_start, work_end) conf.queue = [queue_id] conf.queue_qos = {queue_id: 10} world.ws.statconfs.add(conf)
def add_configuration_with_queue(config_name, work_start, work_end, queue_name): delete_confs_with_name(config_name) queue_id = queue_helper.find_queue_id_with_name(queue_name) conf = _build_base_configuration(config_name, work_start, work_end) conf.queue = [queue_id] conf.queue_qos = {queue_id: 10} world.ws.statconfs.add(conf)
def open_queue_stat_page_on_day(queue_name, day, config_name): conf_id = stat_helper.find_conf_id_with_name(config_name) queue_id = queue_helper.find_queue_id_with_name(queue_name) host = world.config.xivo_host uri = '''https://%s/statistics/call_center/index.php/data/stats1''' % host qry = '''confid=%s&key=queue-%s&axetype=day&dbeg=%s&dend=%s&dday=%s&dweek=2012-08-17&dmonth=2012-08&dyear=2012''' % (conf_id, queue_id, day, day, day) url = '%s?%s' % (uri, qry) world.browser.get(url)
def add_configuration_with_queue_and_agent(config_name, work_start, work_end, queue_name, agent_number): delete_confs_with_name(config_name) queue_id = queue_helper.find_queue_id_with_name(queue_name) agent_id = agent_helper.find_agent_id_with_number(agent_number) conf = _build_base_configuration(config_name, work_start, work_end) conf.queue = [queue_id] conf.queue_qos = {queue_id: 10} conf.agent = [agent_id] world.ws.statconfs.add(conf)
def add_configuration_with_queue_and_agent(config_name, work_start, work_end, queue_name, agent_number): delete_confs_with_name(config_name) queue_id = queue_helper.find_queue_id_with_name(queue_name) agent_id = agent_helper.find_agent_id_with_number(agent_number) conf = _build_base_configuration(config_name, work_start, work_end) conf.queue = [queue_id] conf.queue_qos = {queue_id: 10} conf.agent = [agent_id] world.ws.statconfs.add(conf)
def complete_queue_member_infos(infos): result = {} if 'queue_name' in infos: result['queue_id'] = queue_helper.find_queue_id_with_name(infos['queue_name']) else: result['queue_id'] = infos['queue_id'] if 'agent_number' in infos: result['agent_id'] = agent_helper.find_agent_id_with_number(infos['agent_number']) else: result['agent_id'] = int(infos['agent_id']) if 'penalty' in infos: result['penalty'] = int(infos['penalty']) return result
def _open_queue_stat_page(queue_name, day, config_name, axis): conf_id = stat_helper.find_conf_id_with_name(config_name) queue_id = queue_helper.find_queue_id_with_name(queue_name) host = world.config.xivo_host uri = '''https://%s/statistics/call_center/index.php/data/stats1''' % host config = { 'conf_id': conf_id, 'queue_id': queue_id, 'axis': axis, 'day': day, } qry = '''confid=%(conf_id)s&key=queue-%(queue_id)s&axetype=%(axis)s&dbeg=%(day)s&dend=%(day)s&dday=%(day)s&dweek=%(day)s&dmonth=2014-07&dyear=2014''' % config url = '%s?%s' % (uri, qry) world.browser.get(url)
def add_configuration_with_infos(config_name, work_start, work_end, data): delete_confs_with_name(config_name) list_queue_id = [] dict_queue_id_qos = {} for q in data['queues']: queue_id = queue_helper.find_queue_id_with_name(q['name']) list_queue_id.append(queue_id) dict_queue_id_qos[queue_id] = q['qos'] list_agent_id = [] for agent_number in data['agents']: agent_id = agent_helper.find_agent_id_with_number(agent_number) list_agent_id.append(agent_id) conf = _build_base_configuration(config_name, work_start, work_end) conf.queue = list_queue_id conf.queue_qos = dict_queue_id_qos conf.agent = list_agent_id world.ws.statconfs.add(conf)
def add_configuration_with_infos(config_name, work_start, work_end, data): delete_confs_with_name(config_name) list_queue_id = [] dict_queue_id_qos = {} for q in data['queues']: queue_id = queue_helper.find_queue_id_with_name(q['name']) list_queue_id.append(queue_id) dict_queue_id_qos[queue_id] = q['qos'] list_agent_id = [] for agent_number in data['agents']: agent_id = agent_helper.find_agent_id_with_number(agent_number) list_agent_id.append(agent_id) conf = _build_base_configuration(config_name, work_start, work_end) conf.queue = list_queue_id conf.queue_qos = dict_queue_id_qos conf.agent = list_agent_id world.ws.statconfs.add(conf)
def add_configuration_with_queue_and_agents(config_name, work_start, work_end, queues, agents): delete_confs_with_name(config_name) queue_names = queues.split(',') queue_ids = [] queue_qos = {} for queue_name in queue_names: queue_id = queue_helper.find_queue_id_with_name(queue_name.strip()) queue_ids.append(queue_id) queue_qos[queue_id] = 10 agent_numbers = agents.split(',') agent_ids = [] for agent_number in agent_numbers: agent_ids.append(agent_helper.find_agent_id_with_number(agent_number.strip())) conf = _build_base_configuration(config_name, work_start, work_end) conf.queue = queue_ids conf.queue_qos = queue_qos conf.agent = agent_ids world.ws.statconfs.add(conf)
def add_configuration_with_queue_and_agents(config_name, work_start, work_end, queues, agents): delete_confs_with_name(config_name) queue_names = queues.split(',') queue_ids = [] queue_qos = {} for queue_name in queue_names: queue_id = queue_helper.find_queue_id_with_name(queue_name.strip()) queue_ids.append(queue_id) queue_qos[queue_id] = 10 agent_numbers = agents.split(',') agent_ids = [] for agent_number in agent_numbers: agent_ids.append( agent_helper.find_agent_id_with_number(agent_number.strip())) conf = _build_base_configuration(config_name, work_start, work_end) conf.queue = queue_ids conf.queue_qos = queue_qos conf.agent = agent_ids world.ws.statconfs.add(conf)
def when_i_edit_the_queue_group1_and_set_ring_strategy_at_group2(step, queue_name, ring_strategy): queue_id = queue_helper.find_queue_id_with_name(queue_name) common.open_url('queue', 'edit', {'id': queue_id}) queue_action_webi.type_queue_ring_strategy(ring_strategy) form.submit.submit_form()
def when_i_edit_the_queue_group1(step, queue_name): queue_id = queue_helper.find_queue_id_with_name(queue_name) common.open_url('queue', 'edit', {'id': queue_id}) form.submit.submit_form()
def when_i_remove_the_agent_with_extension_group1_from_the_queue_group2(step, extension, queue_name): queue_id = queue_helper.find_queue_id_with_name(queue_name) common.open_url('queue', 'edit', {'id': queue_id}) queue_action_webi.remove_agents_from_queue([extension]) form.submit.submit_form()
def then_the_queue_members_xlet_for_queue_1_should_display_agents( step, queue_name): queue_id = queue_helper.find_queue_id_with_name(queue_name) cti_helper.set_queue_for_queue_members(queue_id) res = cti_helper.get_queue_members_infos() assert_that(res['return_value']['row_count'], greater_than(0))
def then_the_queue_members_xlet_for_queue_1_is_empty(step, queue_name): queue_id = queue_helper.find_queue_id_with_name(queue_name) cti_helper.set_queue_for_queue_members(queue_id) res = cti_helper.get_queue_members_infos() assert_that(res['return_value']['row_count'], equal_to(0))
def when_i_edit_the_queue_group1_and_set_exit_context_at_group2(step, queue_name, context_name): queue_id = queue_helper.find_queue_id_with_name(queue_name) common.open_url('queue', 'edit', {'id': queue_id}) common.go_to_tab('Advanced') queue_action_webi.type_queue_exit_context(context_name) form.submit.submit_form()
def _new_queue_destination(queue_name): queue_id = queue_helper.find_queue_id_with_name(queue_name) return QueueDestination(queue_id)
def when_i_edit_the_queue_group1_and_set_ring_strategy_at_group2_with_errors( step, queue_name, ring_strategy): queue_id = queue_helper.find_queue_id_with_name(queue_name) common.open_url('queue', 'edit', {'id': queue_id}) queue_action_webi.type_queue_ring_strategy(ring_strategy) form.submit.submit_form_with_errors()
def when_i_remove_the_agent_with_extension_group1_from_the_queue_group2( step, extension, queue_name): queue_id = queue_helper.find_queue_id_with_name(queue_name) common.open_url('queue', 'edit', {'id': queue_id}) queue_action_webi.remove_agents_from_queue([extension]) form.submit.submit_form()
def when_i_edit_the_queue_group1(step, queue_name): queue_id = queue_helper.find_queue_id_with_name(queue_name) common.open_url('queue', 'edit', {'id': queue_id}) form.submit.submit_form()
def then_the_queue_members_xlet_for_queue_1_should_display_agents(step, queue_name): queue_id = queue_helper.find_queue_id_with_name(queue_name) cti_helper.set_queue_for_queue_members(queue_id) res = cti_helper.get_queue_members_infos() assert_that(res['return_value']['row_count'], greater_than(0))
def then_the_queue_members_xlet_for_queue_1_is_empty(step, queue_name): queue_id = queue_helper.find_queue_id_with_name(queue_name) cti_helper.set_queue_for_queue_members(queue_id) res = cti_helper.get_queue_members_infos() assert_that(res['return_value']['row_count'], equal_to(0))
def _new_queue_destination(queue_name): queue_id = queue_helper.find_queue_id_with_name(queue_name) return QueueDestination(queue_id)