예제 #1
0
def go_to_team_edit_page(driver, team, queue):  # noqa
    # we should already be on the profile page
    driver.find_element_by_id("link-edit-team").click()
    teams_page = TeamsPages(driver)
    teams_page.select_team_from_dropdown(team)
    teams_page.select_default_queue_from_dropdown(queue)
    functions.click_submit(driver)
예제 #2
0
def get_my_case_list(driver):  # noqa
    """
    Clicks on the menu and selects Cases
    Depending on team, default queue the list of cases will be different
    """
    driver.find_element_by_id("link-menu").click()
    driver.find_element_by_link_text("Cases").click()
예제 #3
0
def dont_see_queue_in_queue_list(driver, context):  # noqa
    case_page = CaseListPage(driver)
    functions.try_open_filters(driver)
    case_page.filter_by_case_reference(context.reference_code)
    functions.click_apply_filters(driver)
    assert context.reference_code not in driver.find_element_by_id(
        "main-content").text
예제 #4
0
def see_queue_in_queue_list(driver, context):  # noqa
    case_page = CaseListPage(driver)
    functions.try_open_filters(driver)
    case_page.click_clear_filters_button()
    case_page = CaseListPage(driver)
    functions.try_open_filters(driver)
    case_page.filter_by_case_reference(context.reference_code)
    functions.click_apply_filters(driver)
    assert driver.find_element_by_id(context.case_id).is_displayed()
예제 #5
0
def case_removed_from_queue(driver, queue):  # noqa
    driver.find_element_by_id("link-change-queues").click()
    select_queue(driver, queue, False)
    functions.click_submit(driver)
예제 #6
0
def case_assigned_to_queue(driver, queue):  # noqa
    driver.find_element_by_id("link-change-queues").click()
    select_queue(driver, queue, True)
    functions.click_submit(driver)
예제 #7
0
def i_see_the_case_page(driver, context):  # noqa
    assert context.reference_code in driver.find_element_by_id(ApplicationPage.HEADING_ID).text
예제 #8
0
def get_profile_page(driver):  # noqa
    driver.find_element_by_id("link-profile").click()
예제 #9
0
def move_case_to_new_queue(driver, context):  # noqa
    ApplicationPage(driver).click_move_case_button()
    if not driver.find_element_by_id(context.queue_name.replace(" ", "-")).is_selected():
        driver.find_element_by_id(context.queue_name.replace(" ", "-")).click()
    Shared(driver).click_submit()
예제 #10
0
def check_product_name_and_rating(driver, product_name, clc_rating):  # noqa
    product_table = driver.find_element_by_id("table-goods")
    name_element = product_table.find_element_by_xpath("//tbody/tr/td[3]")
    rating_element = product_table.find_element_by_xpath("//tbody/tr/td[6]")
    assert name_element.text == product_name
    assert rating_element.text == clc_rating