Ejemplo n.º 1
0
def enter_permanent_or_temporary(driver, permanent_or_temporary,
                                 context):  # noqa
    context.perm_or_temp = permanent_or_temporary
    # type needs to be permanent or temporary
    apply = ApplyForALicencePage(driver)
    apply.click_permanent_or_temporary_button(permanent_or_temporary)
    functions.click_submit(driver)
def enter_details_of_copied_application(driver, context, name, option, code):
    ApplyForALicencePage(driver).enter_name_or_reference_for_application(name)
    functions.click_submit(driver)
    ApplyForALicencePage(driver).click_export_licence_yes_or_no(option)
    ApplyForALicencePage(driver).type_into_reference_number(code)
    context.name = name
    context.reference_code = code
    functions.click_submit(driver)
Ejemplo n.º 3
0
def create_standard_application(driver, export_type, context):  # noqa
    ExporterHubPage(driver).click_apply_for_a_licence()
    ApplyForALicencePage(driver).select_licence_type("export_licence")
    functions.click_submit(driver)
    enter_type_of_application(driver, "siel", context)
    enter_permanent_or_temporary(driver, export_type, context)
    enter_application_name(driver, context)
    enter_export_licence(driver, "yes", "123456", context)
Ejemplo n.º 4
0
def create_standard_individual_transhipment_application(driver,
                                                        context):  # noqa
    ExporterHubPage(driver).click_apply_for_a_licence()
    ApplyForALicencePage(driver).select_licence_type("transhipment")
    functions.click_submit(driver)
    enter_type_of_application(driver, "sitl", context)
    enter_application_name(driver, context)
    enter_export_licence(driver, "yes", "123456", context)
Ejemplo n.º 5
0
def create_standard_application(driver, good_type, country, context):  # noqa
    ExporterHubPage(driver).click_apply_for_a_licence()
    ApplyForALicencePage(driver).select_licence_type("export_licence")
    functions.click_submit(driver)
    enter_type_of_application(driver, "ogel", context)
    ogel = OgelPage(driver)
    ogel.enter_control_list_entry(good_type)
    ogel.enter_country(country)
Ejemplo n.º 6
0
def create_standard_individual_trade_control_application(driver,
                                                         context):  # noqa
    ExporterHubPage(driver).click_apply_for_a_licence()
    apply_for_licence_page = ApplyForALicencePage(driver)
    apply_for_licence_page.select_licence_type("trade_control_licence")
    functions.click_submit(driver)
    enter_type_of_application(driver, "sicl", context)
    enter_application_name(driver, context)
    apply_for_licence_page.select_trade_control_activity()
    apply_for_licence_page.select_trade_control_product_category()
Ejemplo n.º 7
0
def create_open_app(driver, export_type, context):  # noqa
    ExporterHubPage(driver).click_apply_for_a_licence()
    ApplyForALicencePage(driver).select_licence_type("export_licence")
    functions.click_submit(driver)
    enter_type_of_application(driver, "oiel", context)
    choose_open_licence_category(driver, "military", context)
    enter_permanent_or_temporary(driver, export_type, context)
    enter_application_name(driver, context)
    answer_firearms_question(driver)
Ejemplo n.º 8
0
def create_open_app_of_specific_type(driver, licence_type, context):  # noqa
    ExporterHubPage(driver).click_apply_for_a_licence()
    ApplyForALicencePage(driver).select_licence_type("export_licence")
    functions.click_submit(driver)
    enter_type_of_application(driver, "oiel", context)
    choose_open_licence_category(driver, licence_type, context)

    if licence_type in ["military", "uk_continental_shelf"]:
        enter_permanent_or_temporary(driver, "permanent", context)

    enter_application_name(driver, context)
    if licence_type in ["military", "uk_continental_shelf"]:
        answer_firearms_question(driver)
Ejemplo n.º 9
0
def application_is_submitted(driver):  # noqa
    assert ApplyForALicencePage(driver).is_success_panel_present()
Ejemplo n.º 10
0
def enter_application_name(driver, context):  # noqa
    apply = ApplyForALicencePage(driver)
    app_name = fake.bs()
    apply.enter_name_or_reference_for_application(app_name)
    context.app_name = app_name
    functions.click_submit(driver)
Ejemplo n.º 11
0
def i_delete_the_application(driver):  # noqa
    apply = ApplyForALicencePage(driver)
    apply.click_delete_application()
    assert "Applications - LITE" in driver.title, (
        "failed to go to Applications list page after deleting application "
        "from application overview page")
Ejemplo n.º 12
0
def choose_open_licence_category(driver, type_of_oiel, context):  # noqa
    # Values allowed: cryptographic, media, military, uk_continental_shelf, dealer
    apply = ApplyForALicencePage(driver)
    apply.select_open_licence_category(type_of_oiel)
Ejemplo n.º 13
0
def enter_type_of_application(driver, _type, context):  # noqa
    context.type = _type
    # type needs to be standard or open
    apply = ApplyForALicencePage(driver)
    apply.click_export_licence(_type)
    functions.click_submit(driver)
def correct_number_of_types(driver):
    assert len(
        driver.find_elements_by_name(
            ApplyForALicencePage(
                driver).F680_CLEARANCE_TYPE_CHECKBOXES_NAME)) == 6
def choose_types_of_clearance(driver):
    ApplyForALicencePage(driver).select_types_of_clearance()
    functions.click_submit(driver)
def create_mod_application(driver, context, type):  # noqa
    ExporterHubPage(driver).click_apply_for_a_licence()
    ApplyForALicencePage(driver).select_licence_type(type)
    functions.click_submit(driver)
def create_mod_application(driver, context, type):  # noqa
    ApplyForALicencePage(driver).select_mod_application_type(type)
    functions.click_submit(driver)
Ejemplo n.º 18
0
def enter_export_licence(driver, yes_or_no, reference, context):  # noqa
    apply = ApplyForALicencePage(driver)
    apply.click_export_licence_yes_or_no(yes_or_no)
    context.ref = reference
    apply.type_into_reference_number(reference)
    functions.click_submit(driver)
Ejemplo n.º 19
0
def answer_firearms_question(driver):  # noqa
    apply = ApplyForALicencePage(driver)
    apply.select_firearms_yes()
    functions.click_submit(driver)