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
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
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
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
def i_click_on_licences(driver, context): # noqa CasePage(driver).change_tab(CaseTabs.COMPLIANCE_LICENCES)
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()
def go_to_final_advice(driver): CasePage(driver).change_tab(CaseTabs.FINAL_ADVICE)
def go_to_team_advice(driver): CasePage(driver).change_tab(CaseTabs.TEAM_ADVICE)
def i_click_assign_user_button(driver): CasePage(driver).click_assign_users()
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)
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)
def click_documents(driver): # noqa CasePage(driver).change_tab(CaseTabs.DOCUMENTS)
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()
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)
def on_compliance_case(driver): reference = CasePage(driver).get_reference_code_text() assert reference.startswith("COMP/") assert reference.endswith("/V")
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
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")
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()
def click_generated_documents(driver, context): CasePage(driver).change_tab(CaseTabs.DOCUMENTS) ApplicationPage(driver).click_generate_document_button()