コード例 #1
0
def all_tabs_are_visible(driver):
    page = CompliancePages(driver)
    assert page.details_tab()
    assert page.ecju_queries_tab()
    assert page.notes_tab()
    assert page.generated_documents_tab()
    assert page.visits_tab()
コード例 #2
0
def add_visit_report_details(driver, context, visit_type, visit_date,
                             overall_risk, licence_risk):
    CompliancePages(driver).add_visit_report_details(visit_type, visit_date,
                                                     overall_risk,
                                                     licence_risk)
    context.visit_type = visit_type
    context.visit_date = visit_date
    context.overall_risk = overall_risk
    context.licence_risk = licence_risk
コード例 #3
0
def see_visit_report_details(driver, context):
    compliance_page = CompliancePages(driver)
    visit_date = do_timezone(
        datetime.datetime.strptime(context.visit_date, DATE_FORMAT),
        "Europe/London").strftime("%d %B %Y")
    assert context.visit_type in compliance_page.get_visit_type()
    assert visit_date in compliance_page.get_visit_date()
    assert context.overall_risk in compliance_page.get_overall_risk()
    assert context.licence_risk in compliance_page.get_licence_risk()

    # Banner details
    assert context.visit_type in compliance_page.get_compliance_banner_details(
    )
    assert visit_date in compliance_page.get_compliance_banner_details()
コード例 #4
0
def add_knowledge_of_products_details(driver, context, overview, risk):
    CompliancePages(driver).edit_knowledge_of_products(overview, risk)
    context.products_overview = overview
    context.products_risk = risk
コード例 #5
0
def see_knowledge_of_individuals_details(driver, context):
    assert context.individuals_overview in CompliancePages(
        driver).get_knowledge_of_individuals_overview()
    assert context.individuals_risk in CompliancePages(
        driver).get_knowledge_of_individuals_risk()
コード例 #6
0
def add_knowledge_of_individuals_details(driver, context, overview, risk):
    CompliancePages(driver).edit_knowledge_of_individuals(overview, risk)
    context.individuals_overview = overview
    context.individuals_risk = risk
コード例 #7
0
def see_compliance_with_licence_details(driver, context):
    assert context.compliance_overview in CompliancePages(
        driver).get_compliance_with_licence_overview()
    assert context.compliance_risk in CompliancePages(
        driver).get_compliance_with_licence_risk()
コード例 #8
0
def case_in_compliance_list(driver, context):
    assert CompliancePages(driver).find_paginated_compliance_site_case_row(
        context.comp_site_case_id)
コード例 #9
0
def i_search_for_licence(driver, context):  # noqa
    CompliancePages(driver).filter_by_case_reference(context)
コード例 #10
0
def see_overview_details(driver, context):
    assert context.overview in CompliancePages(driver).get_overview()
コード例 #11
0
def add_overview_details(driver, context, details):
    CompliancePages(driver).edit_overview(details)
    context.overview = details
コード例 #12
0
def person_is_present(driver, context):
    table = CompliancePages(driver).get_people_present_table()
    assert context.person_name in table
    assert context.job_title in table
コード例 #13
0
def add_people_present(driver, context, name, job):
    CompliancePages(driver).add_person_present(name, job)
    context.person_name = name
    context.job_title = job
コード例 #14
0
def visit_case_created(driver, context):
    page = CompliancePages(driver)
    page.visits_tab().click()
    assert page.find_paginated_compliance_visit_case("visit-" +
                                                     context.visit_case_id)
コード例 #15
0
def view_compliance_case(driver, context):
    CompliancePages(driver).view_compliance_case(context.comp_site_case_id)
コード例 #16
0
def see_knowledge_of_products_details(driver, context):
    assert context.products_overview in CompliancePages(
        driver).get_knowledge_of_products_overview()
    assert context.products_risk in CompliancePages(
        driver).get_knowledge_of_products_risk()
コード例 #17
0
def check_licence_is_present(driver, context):  # noqa
    assert CompliancePages(driver).find_case_reference(
        context).text == context.reference_code
コード例 #18
0
def add_inspection_details(driver, context, details):
    CompliancePages(driver).edit_inspection(details)
    context.inspection = details
コード例 #19
0
def add_visit_report(driver):  # noqa
    CompliancePages(driver).add_visit_report()
コード例 #20
0
def see_inspection_details(driver, context):
    assert context.inspection in CompliancePages(driver).get_inspection()
コード例 #21
0
def add_compliance_with_licences_details(driver, context, overview, risk):
    CompliancePages(driver).edit_compliance_with_licences(overview, risk)
    context.compliance_overview = overview
    context.compliance_risk = risk
コード例 #22
0
def view_visit_case_and_check_tabs(driver, context):
    page = CompliancePages(driver)
    page.view_visit_case(context.visit_case_id)
    assert page.ecju_queries_tab()
    assert page.generated_documents_tab()