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()
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
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()
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
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()
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
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()
def case_in_compliance_list(driver, context): assert CompliancePages(driver).find_paginated_compliance_site_case_row( context.comp_site_case_id)
def i_search_for_licence(driver, context): # noqa CompliancePages(driver).filter_by_case_reference(context)
def see_overview_details(driver, context): assert context.overview in CompliancePages(driver).get_overview()
def add_overview_details(driver, context, details): CompliancePages(driver).edit_overview(details) context.overview = details
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
def add_people_present(driver, context, name, job): CompliancePages(driver).add_person_present(name, job) context.person_name = name context.job_title = job
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)
def view_compliance_case(driver, context): CompliancePages(driver).view_compliance_case(context.comp_site_case_id)
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()
def check_licence_is_present(driver, context): # noqa assert CompliancePages(driver).find_case_reference( context).text == context.reference_code
def add_inspection_details(driver, context, details): CompliancePages(driver).edit_inspection(details) context.inspection = details
def add_visit_report(driver): # noqa CompliancePages(driver).add_visit_report()
def see_inspection_details(driver, context): assert context.inspection in CompliancePages(driver).get_inspection()
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
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()