Ejemplo n.º 1
0
def audit_trail_updated(driver, context, internal_info, internal_url):  # noqa
    ApplicationPage(driver).go_to_cases_activity_tab_for_clc(
        internal_url, context)

    assert (context.status.lower()
            in Shared(driver).get_audit_trail_text().lower()
            ), "status has not been shown as approved in audit trail"
Ejemplo n.º 2
0
def queue_change_in_audit(driver, context, internal_url):
    ApplicationPage(driver).go_to_cases_activity_tab(internal_url, context)

    assert "moved the case to " + context.queue_name in Shared(
        driver).get_audit_trail_text()
Ejemplo n.º 3
0
def see_number_of_checkboxes_selected(driver, context, num):
    ApplicationPage(driver).click_move_case_button()
    # May be more queues due to case routing automation
    assert int(QueuesPages(driver).get_number_of_selected_queues()) >= int(num)
def case_notes_tab(driver, internal_url, context):
    ApplicationPage(driver).go_to_cases_activity_tab(internal_url, context)
def click_visible_to_exporters_checkbox(driver):
    application_page = ApplicationPage(driver)
    application_page.click_visible_to_exporter_checkbox()
Ejemplo n.º 6
0
def click_edit_flags_link(driver):
    CasePage(driver).select_first_good()
    ApplicationPage(driver).click_review_goods()
Ejemplo n.º 7
0
def licence_audit(driver, context, internal_url):  # noqa
    ApplicationPage(driver).go_to_cases_activity_tab(internal_url, context)
    second_audit = ApplicationPage(driver).get_text_of_audit_trail_item(1)
    assert context.licence_duration in second_audit
    assert context.licence_start_date in second_audit
Ejemplo n.º 8
0
def move_case_to_new_queue(driver, context):  # noqa
    ApplicationPage(driver).click_move_case_button()
    if not driver.find_element_by_id(context.queue_name.replace(
            " ", "-")).is_selected():
        driver.find_element_by_id(context.queue_name.replace(" ", "-")).click()
    Shared(driver).click_submit()
def click_post_note(driver, context):
    application_page = ApplicationPage(driver)
    # TODO Make this an implicit wait!
    time.sleep(1)
    application_page.click_post_note_btn()
    context.date_time_of_post = utils.get_formatted_date_time_h_m_pm_d_m_y()
def enter_case_note_text(driver, text, context):
    application_page = ApplicationPage(driver)
    if text == "too many characters":
        text = "T" * 2201
    context.text = text
    application_page.enter_case_note(text)
def i_enter_a_next_review_date(driver, context):
    ApplicationPage(driver).set_next_review_date("01", "01", "2100", context)
    Shared(driver).click_submit()
def filter_status_change(driver, user_type):  # noqa
    page = ApplicationPage(driver)
    page.select_filter_user_type_from_dropdown(user_type)
Ejemplo n.º 13
0
def latest_audit_trail(driver, expected_text, no):
    assert expected_text in ApplicationPage(
        driver).get_text_of_audit_trail_item(int(no) - 1)
Ejemplo n.º 14
0
 def to_application_page(self) -> ApplicationPage:
     path = self.driver.find_element_by_xpath(
         self.APPLICATION_ITEM).get_attribute('href')
     return ApplicationPage(self.driver, path=path)
def note_is_displayed(driver, context):
    application_page = ApplicationPage(driver)
    assert context.text in application_page.get_text_of_case_note(0)
    assert utils.search_for_correct_date_regex_in_element(
        application_page.get_text_of_case_note_date_time(
            0)), "incorrect time format of post on case note"
Ejemplo n.º 16
0
def select_status_save(driver, status, context):  # noqa
    application_page = ApplicationPage(driver)
    application_page.select_status(status)
    context.status = status
    context.date_time_of_update = utils.get_formatted_date_time_h_m_pm_d_m_y()
    Shared(driver).click_submit()
def i_click_cancel_button(driver):
    application_page = ApplicationPage(driver)
    application_page.click_cancel_btn()
Ejemplo n.º 18
0
def im_done_button(driver):  # noqa
    ApplicationPage(driver).click_im_done_button()
def entered_text_no_longer_in_case_field(driver, context):
    application_page = ApplicationPage(driver)
    assert context.text not in application_page.get_text_of_case_note_field(
    ), "cancel button hasn't cleared text"
Ejemplo n.º 20
0
def the_ecju_query_creation_is_visible_in_the_case_timeline(
        driver, context, internal_url):
    ApplicationPage(driver).go_to_cases_activity_tab(internal_url, context)
    assert context.ecju_question in Shared(driver).get_audit_trail_text()
Ejemplo n.º 21
0
def changes_have_been_made_to_case(driver, context, api_test_client):
    assert len(ApplicationPage(driver).get_case_notification_anchor())