Esempio n. 1
0
def i_see_good_details_view_link(driver, context):  # noqa
    goods = CasePage(driver).get_goods()
    for good in goods:
        view_link_table_cell = good.find_element_by_css_selector(
            "td#view-good-details")
        if view_link_table_cell:
            assert "View" in view_link_table_cell.text
Esempio n. 2
0
def i_see_destinations(driver, context):
    destinations = [
        context.consignee, context.end_user, context.third_party,
        context.ultimate_end_user
    ]
    destinations_table_text = CasePage(driver).get_destinations_text()

    for destination in destinations:
        assert destination["name"] in destinations_table_text
Esempio n. 3
0
def finalise(driver):  # noqa
    CasePage(driver).change_tab(CaseTabs.FINAL_ADVICE)
    FinalAdvicePage(driver).click_finalise()
def case_is_finalised(driver):
    CasePage(driver).change_tab(CaseTabs.ACTIVITY)
    assert "reissued" in Shared(driver).get_audit_trail_text()
def check_control_list_code(driver, context):
    goods = CasePage(driver).get_goods_text()
    assert context.goods_control_list_entry in goods
Esempio n. 6
0
def i_see_inactive_party(driver, context):
    destinations = [context.third_party]
    destinations_table_text = CasePage(driver).get_deleted_entities_text()

    for destination in destinations:
        assert destination["name"] in destinations_table_text
Esempio n. 7
0
def i_click_on_licences(driver, context):  # noqa
    CasePage(driver).change_tab(CaseTabs.COMPLIANCE_LICENCES)
Esempio n. 8
0
def i_click_on_view_advice(driver, context):  # noqa
    CasePage(driver).change_tab(CaseTabs.USER_ADVICE)
def click_edit_destination_flags_link(driver):
    case_page = CasePage(driver)
    case_page.select_destination(0)
    case_page.click_edit_destinations_flags()
Esempio n. 10
0
def go_to_final_advice(driver):
    CasePage(driver).change_tab(CaseTabs.FINAL_ADVICE)
Esempio n. 11
0
def go_to_team_advice(driver):
    CasePage(driver).change_tab(CaseTabs.TEAM_ADVICE)
Esempio n. 12
0
def i_click_assign_user_button(driver):
    CasePage(driver).click_assign_users()
Esempio n. 13
0
def rerun_routing_rules(driver):
    application_page = ApplicationPage(driver)
    CasePage(driver).click_rerun_routing_rules()
    application_page.click_confirm_rerun_routing_rules()
    functions.click_submit(driver)
Esempio n. 14
0
def ecju_query_in_closed_list(driver, context):
    CasePage(driver).change_tab(CaseTabs.ECJU_QUERIES)
    assert context.ecju_question in EcjuQueriesPages(driver).get_closed_queries_text()
def i_click_additional_contacts_button(driver, context):
    CasePage(driver).change_tab(CaseTabs.ADDITIONAL_CONTACTS)
Esempio n. 16
0
def click_documents(driver):  # noqa
    CasePage(driver).change_tab(CaseTabs.DOCUMENTS)
Esempio n. 17
0
def click_edit_case_flags_link(driver):  # noqa
    CasePage(driver).click_change_case_flags()
def click_edit_goods_flags_link(driver):
    case_page = CasePage(driver)
    case_page.select_first_good()
    case_page.click_edit_goods_flags()
Esempio n. 19
0
def i_go_to_the_ecju_queries_tab(driver):
    CasePage(driver).change_tab(CaseTabs.ECJU_QUERIES)
def assert_flag_is_assigned(driver, context):
    assert CasePage(driver).is_goods_flag_applied(context.flag_name)
Esempio n. 21
0
def on_compliance_case(driver):
    reference = CasePage(driver).get_reference_code_text()
    assert reference.startswith("COMP/")
    assert reference.endswith("/V")
Esempio n. 22
0
def select_product_for_review(driver):
    CasePage(driver).select_first_good()
    ApplicationPage(driver).click_review_goods()
def i_click_next_review_date_button(driver):
    CasePage(driver).click_set_next_review_date()
def i_see_the_next_review_date(driver, context):
    context.formatted_next_review_date = (datetime.strptime(
        context.next_review_date, "%Y-%m-%d").date().strftime("%d %B %Y"))

    assert CasePage(
        driver).get_next_review_date() == context.formatted_next_review_date
Esempio n. 25
0
def assert_flag_is_assigned(driver, context):  # noqa
    assert CasePage(driver).is_flag_in_applied_flags_list(
        context.flag_name), ("Flag " + context.flag_name +
                             " is not applied to the case")
Esempio n. 26
0
def click_post_note(driver):  # noqa
    case_page = CasePage(driver)
    case_page.change_tab(CaseTabs.DETAILS)
    case_page.click_change_status()
def click_edit_flags_link(driver):
    CasePage(driver).select_first_good()
    ApplicationPage(driver).click_review_goods()
Esempio n. 28
0
def click_generated_documents(driver, context):
    CasePage(driver).change_tab(CaseTabs.DOCUMENTS)
    ApplicationPage(driver).click_generate_document_button()