def then_the_search_results_are(step):
    expected_list = [info['present'] for info in step.hashes if info['present']]
    not_expected_list = [info['not present'] for info in step.hashes if info['not present']]

    for expected in expected_list:
        assert common.find_line(expected) is not None

    for not_expected in not_expected_list:
        assert common.find_line(not_expected) is None, 'element %s unexpectedly found' % not_expected
def then_the_search_results_are(step):
    expected_list = [
        info['present'] for info in step.hashes if info['present']
    ]
    not_expected_list = [
        info['not present'] for info in step.hashes if info['not present']
    ]

    for expected in expected_list:
        assert common.find_line(expected) is not None

    for not_expected in not_expected_list:
        assert common.find_line(
            not_expected
        ) is None, 'element %s unexpectedly found' % not_expected
Example #3
0
def then_i_see_the_user_group1_group2_exists(step, firstname, lastname):
    common.open_url('user', 'search',
                    {'search': '%s %s' % (firstname, lastname)})
    user_line = common.find_line("%s %s" % (firstname, lastname))
    assert user_line is not None, 'User: %s %s does not exist' % (firstname,
                                                                  lastname)
    common.open_url('user', 'search', {'search': ''})
def then_i_see_the_element_not_exists(step, name):
    common.open_url("voicemail")
    line = common.find_line(name)
    assert line is None, "voicemail: %s exist" % name
def then_entry_appears_in_the_list(step, entry):
    assert common.find_line(entry) is not None
Example #6
0
def then_i_see_the_element_exists(step, name):
    common.open_url('incall')
    line = common.find_line(name)
    assert line is not None, 'incall: %s does not exist' % name
Example #7
0
def then_i_see_the_context_not_exists(step, name):
    open_url('context')
    line = common.find_line(name)
    assert line is None, 'Context: %s exist' % name
Example #8
0
def is_agent_in_agent_group(agent_group, agent_name):
    go_to_agent_group_page_list(agent_group)
    form.input.edit_text_field_with_id('it-toolbar-search', agent_name)
    form.submit.submit_form('it-toolbar-subsearch')
    return common.find_line(agent_name) is not None
def then_entry_appears_in_the_list(step, entry):
    assert common.find_line(entry) is not None
Example #10
0
def group_is_no_longer_in_list(group_name):
    return common.find_line(group_name) is None
Example #11
0
def then_the_user_not_exist(step, firstname, lastname):
    common.open_url('user', 'search',
                    {'search': '%s %s' % (firstname, lastname)})
    user_line = common.find_line("%s %s" % (firstname, lastname))
    assert user_line is None, 'User: %s %s exist' % (firstname, lastname)
    common.open_url('user', 'search', {'search': ''})
Example #12
0
def then_i_see_the_user_group1_group2_exists(step, firstname, lastname):
    common.open_url('user', 'search', {'search': '%s %s' % (firstname, lastname)})
    user_line = common.find_line("%s %s" % (firstname, lastname))
    assert user_line is not None, 'User: %s %s does not exist' % (firstname, lastname)
    common.open_url('user', 'search', {'search': ''})
Example #13
0
def then_i_see_the_element_exists(step, name):
    common.open_url('queue')
    line = common.find_line(name)
    assert line is not None, 'queue: %s does not exist' % name
Example #14
0
def then_i_see_the_element_not_exists(step, name):
    common.open_url('meetme')
    line = common.find_line(name)
    assert line is None, 'conference room: %s exist' % name
Example #15
0
def then_there_is_no_outcall(step, name):
    common.open_url('outcall', 'list')
    assert common.find_line(name) is None
Example #16
0
def then_this_line_is_not_displayed_in_the_list(step):
    common.open_url('line', 'search', {'search': world.id})
    assert common.find_line(world.id) is None
    common.open_url('line', 'search', {'search': ''})
Example #17
0
def then_i_see_the_element_not_exists(step, name):
    common.open_url('line', 'search', {'search': name})
    line = common.find_line(name)
    common.open_url('line', 'search', {'search': ''})
    assert line is None, 'Line: %s exist' % name
Example #18
0
def then_i_see_the_context_not_exists(step, name):
    open_url('context')
    line = common.find_line(name)
    assert line is None, 'Context: %s exist' % name
Example #19
0
def then_i_see_the_element_not_exists(step, name):
    common.open_url('meetme')
    line = common.find_line(name)
    assert line is None, 'conference room: %s exist' % name
Example #20
0
def then_the_user_not_exist(step, firstname, lastname):
    common.open_url('user', 'search', {'search': '%s %s' % (firstname, lastname)})
    user_line = common.find_line("%s %s" % (firstname, lastname))
    assert user_line is None, 'User: %s %s exist' % (firstname, lastname)
    common.open_url('user', 'search', {'search': ''})
Example #21
0
def then_i_see_the_element_not_exists(step, name):
    common.open_url('incall')
    line = common.find_line(name)
    assert line is None, 'incall: %s exist' % name
Example #22
0
def then_i_see_the_element_not_exists(step, name):
    common.open_url('queue')
    line = common.find_line(name)
    assert line is None, 'queue: %s exist' % name
Example #23
0
def is_agent_in_agent_group(agent_group, agent_name):
    go_to_agent_group_page_list(agent_group)
    form.input.edit_text_field_with_id("it-toolbar-search", agent_name)
    form.submit.submit_form("it-toolbar-subsearch")
    return common.find_line(agent_name) is not None