def dont_see_user(driver, context): users_page = UsersPage(driver) driver.implicitly_wait(0) users_page.filter_by_email(context.added_email) try: users_page.is_user_email_displayed(context.added_email) except NoSuchElementException: pass driver.implicitly_wait(60)
def edit_user(driver, context): context.added_email = context.added_email + "edited" user_page = UsersPage(driver) user_page.enter_email(context.added_email) Shared(driver).click_submit()
def edit_user(driver, context): user_page = UsersPage(driver) user_page.go_to_user_page(context) user_page.click_change_email_link()
def reactivate_user(driver, context): user_page = UsersPage(driver) user_page.go_to_user_page(context) user_page.click_reactivate_user()
def see_new_user(driver, context): user_page = UsersPage(driver) user_page.filter_by_email(context.added_email) assert user_page.is_user_email_displayed( context.added_email), "Item couldn't be found"
def add_user(driver, context): user_page = UsersPage(driver) user_page.click_add_a_user_button() fake = Faker() context.added_email = fake.free_email() user_page.enter_email(context.added_email) user_page.select_option_from_team_drop_down_by_visible_text("Admin") user_page.select_option_from_role_drop_down_by_visible_text("Default") user_page.select_option_from_default_queue_drop_down_by_visible_text( "All cases") functions.click_submit(driver)
def select_default_queue_from_dropdown(self, queue): users_page = UsersPage(self.driver) users_page.select_option_from_default_queue_drop_down_by_visible_text( queue)
def select_team_from_dropdown(self, team): users_page = UsersPage(self.driver) users_page.select_option_from_team_drop_down_by_visible_text(team)
def go_to_manage_roles(driver): user_page = UsersPage(driver) user_page.click_on_manage_roles()