예제 #1
0
def edit_existing_flag(driver, context):
    flags_list_page = FlagsListPage(driver)
    add_edit_flag_page = AddEditFlagPage(driver)
    flags_list_page.click_edit_link()

    context.flag_name = f"Edited flag {utils.get_formatted_date_time_d_h_m_s()}"
    add_edit_flag_page.enter_name(context.flag_name)
    add_edit_flag_page.select_colour("red")
    add_edit_flag_page.enter_label("Hard to Find")
    add_edit_flag_page.enter_priority(1)

    Shared(driver).click_submit()
예제 #2
0
def add_flag(driver, context, blocks_approval):
    add_edit_flag_page = AddEditFlagPage(driver)
    context.flag_name = f"UAE {utils.get_formatted_date_time_d_h_m_s()}"[:24]

    FlagsListPage(driver).click_add_a_flag_button()

    add_edit_flag_page.enter_name(context.flag_name)
    add_edit_flag_page.select_level("Case")
    add_edit_flag_page.select_colour("orange")
    add_edit_flag_page.enter_label("Easy to Find")
    add_edit_flag_page.enter_priority(0)
    add_edit_flag_page.enter_blocking_approval(blocks_approval)

    Shared(driver).click_submit()
예제 #3
0
def reactivate_flag(driver, context):
    FlagsListPage(driver).click_reactivate_link()
    functions.click_submit(driver, "Active")
예제 #4
0
def only_show_deactivated_flags(driver, context):
    FlagsListPage(driver).click_only_show_deactivated()
예제 #5
0
def deactivate_flag(driver, context):
    FlagsListPage(driver).click_deactivate_link()
    functions.click_submit(driver, "Deactivated")