コード例 #1
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
コード例 #2
0
def assign_user_to_case(driver, enabled_disabled):
    if enabled_disabled == "enabled":
        assert (
            "disabled" not in CaseListPage(driver).get_class_name_of_assign_users_button()
        ), "assign users button is not enabled"
    elif enabled_disabled == "disabled":
        assert (
            "disabled" in CaseListPage(driver).get_class_name_of_assign_users_button()
        ), "assign users button is not disabled"
コード例 #3
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()
コード例 #4
0
def user_is_on_case_list(driver, context):
    first_name, last_name = context.user_name.split(" ", 1)
    first_name = first_name[0].upper()
    last_name = last_name[0].upper()

    assert first_name + last_name in CaseListPage(driver).get_text_of_assignees(
        driver, context.case_id
    ), f"'{context.user_name}' is not an assignee on case list"
コード例 #5
0
def system_queue_shown_in_dropdown(driver, queue_name):  # noqa
    CaseListPage(driver).click_on_queue_name(queue_name)
コード例 #6
0
def system_queue_shown_in_dropdown(driver, context):
    CaseListPage(driver).click_on_queue_name(context.queue_name)
コード例 #7
0
def filter_search_for_assign_users(driver, internal_info):
    CaseListPage(driver).enter_name_to_filter_search_box(internal_info["name"])
コード例 #8
0
def i_can_see_the_case_on_the_exporter_amendments_queue(driver, context):
    case_list_page = CaseListPage(driver)
    case_list_page.assert_case_is_present(context.app_id)
コード例 #9
0
def case_in_cases_list(driver, context):  # noqa
    context.case_row = CaseListPage(driver).get_case_row(context.case_id)
    assert context.reference_code in context.case_row.text
コード例 #10
0
def click_checkbox_for_application(driver, internal_url, context):
    CaseListPage(driver).click_on_case_checkbox(context.case_id)
    CaseListPage(driver).click_on_assign_users_button()
コード例 #11
0

@then("user is assignee on case list")
def user_is_on_case_list(driver, context):
    first_name, last_name = context.user_name.split(" ", 1)
    first_name = first_name[0].upper()
    last_name = last_name[0].upper()

    assert first_name + last_name in CaseListPage(driver).get_text_of_assignees(
        driver, context.case_id
    ), f"'{context.user_name}' is not an assignee on case list"


@when("I filter assigned user by Not Assigned")
def i_filter_case_officer_by_not_assigned(driver):
    case = CaseListPage(driver)
    functions.try_open_filters(driver)
    case.enter_assigned_user_filter_text("Not assigned")
    functions.click_apply_filters(driver)


@then("only SSO users name is displayed in user list for assign cases")
def user_is_on_case_list(driver, internal_info):
    elements = CaseListPage(driver).get_text_checkbox_elements()
    for element in elements:
        assert internal_info["name"] in element.text, internal_info["name"] + "is not displayed in user list"


@then("user is not assignee on case list")
def user_is_not_on_case_list(driver, context):
    assert not CaseListPage(driver).has_assignees(driver, context.case_id), "This case has assignees"
コード例 #12
0
def filter_by_ogel(driver):
    functions.try_open_filters(driver)
    CaseListPage(driver).select_filter_case_type_from_dropdown(
        "Open General Export Licence")
    functions.click_apply_filters(driver)
コード例 #13
0
def assert_case_is_present(driver, apply_for_clc_query, context):
    assert CaseListPage(driver).assert_case_is_present(context.clc_case_id), "clc case ID is not present on page"
コード例 #14
0
def filter_status_change(driver, context, status):  # noqa
    CaseListPage(driver).select_filter_user_status_from_dropdown(status)
    functions.click_apply_filters(driver)
コード例 #15
0
def queue_shown_in_dropdown(driver, context):  # noqa
    CaseListPage(driver).click_on_queue_name(context.queue_name)
コード例 #16
0
def user_is_on_case_list(driver, internal_info):
    elements = CaseListPage(driver).get_text_checkbox_elements()
    for element in elements:
        assert internal_info["name"] in element.text, internal_info["name"] + "is not displayed in user list"
コード例 #17
0
def user_is_not_on_case_list(driver, context):
    assert not CaseListPage(driver).has_assignees(driver, context.case_id), "This case has assignees"
コード例 #18
0
def case_sla(driver, context):  # noqa
    assert CaseListPage(driver).get_case_row_sla(context.case_row) == "0"
コード例 #19
0
def select_all_cases(driver):
    CaseListPage(driver).click_select_all_checkbox()
コード例 #20
0
def i_click_clear_filters(driver, context):  # noqa
    CaseListPage(driver).click_clear_filters_button()
コード例 #21
0
def i_click_on_the_exporter_amendments_banner(driver, context):
    case_list_page = CaseListPage(driver)
    case_list_page.click_on_exporter_amendments_banner()