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()
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()
def reactivate_flag(driver, context): FlagsListPage(driver).click_reactivate_link() functions.click_submit(driver, "Active")
def only_show_deactivated_flags(driver, context): FlagsListPage(driver).click_only_show_deactivated()
def deactivate_flag(driver, context): FlagsListPage(driver).click_deactivate_link() functions.click_submit(driver, "Deactivated")