def go_to_team_edit_page(driver, team, queue): # noqa # we should already be on the profile page driver.find_element_by_id("link-edit-team").click() teams_page = TeamsPages(driver) teams_page.select_team_from_dropdown(team) teams_page.select_default_queue_from_dropdown(queue) functions.click_submit(driver)
def get_my_case_list(driver): # noqa """ Clicks on the menu and selects Cases Depending on team, default queue the list of cases will be different """ driver.find_element_by_id("link-menu").click() driver.find_element_by_link_text("Cases").click()
def dont_see_queue_in_queue_list(driver, context): # noqa case_page = CaseListPage(driver) functions.try_open_filters(driver) case_page.filter_by_case_reference(context.reference_code) functions.click_apply_filters(driver) assert context.reference_code not in driver.find_element_by_id( "main-content").text
def see_queue_in_queue_list(driver, context): # noqa case_page = CaseListPage(driver) functions.try_open_filters(driver) case_page.click_clear_filters_button() case_page = CaseListPage(driver) functions.try_open_filters(driver) case_page.filter_by_case_reference(context.reference_code) functions.click_apply_filters(driver) assert driver.find_element_by_id(context.case_id).is_displayed()
def case_removed_from_queue(driver, queue): # noqa driver.find_element_by_id("link-change-queues").click() select_queue(driver, queue, False) functions.click_submit(driver)
def case_assigned_to_queue(driver, queue): # noqa driver.find_element_by_id("link-change-queues").click() select_queue(driver, queue, True) functions.click_submit(driver)
def i_see_the_case_page(driver, context): # noqa assert context.reference_code in driver.find_element_by_id(ApplicationPage.HEADING_ID).text
def get_profile_page(driver): # noqa driver.find_element_by_id("link-profile").click()
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 check_product_name_and_rating(driver, product_name, clc_rating): # noqa product_table = driver.find_element_by_id("table-goods") name_element = product_table.find_element_by_xpath("//tbody/tr/td[3]") rating_element = product_table.find_element_by_xpath("//tbody/tr/td[6]") assert name_element.text == product_name assert rating_element.text == clc_rating