def login_with_new_user(context, username): username = get_username(context, username) admin_dashboard_page.goto_users_list() admin_user_list_page.search_and_land_to_change_user(username) admin_add_user_page.verify_change_user_page() admin_add_user_page.delete_user() admin_user_list_page.verify_users_list_page()
def login_with_new_user(context, username, password): username = get_username(context, username) password = get_password(context, password) blueprint_login_page.open(context.config.userdata.get('blueprint_url')) blueprint_login_page.verify_login_page() blueprint_login_page.login(username, password) blueprint_login_page.verify_login_fail()
def login(context, username, password): username = get_username(context, username) password = get_password(context, password) admin_login_page.open( context.config.userdata.get('blueprint_url') + '/admin') admin_login_page.verify_login_page() admin_login_page.login(username, password) admin_dashboard_page.verify_login_pass()
def login_with_new_user(context, username, password): username = get_username(context, username) password = get_password(context, password) blueprint_login_page.open(context.config.userdata.get('blueprint_url')) blueprint_login_page.verify_login_page() blueprint_login_page.login(username, password) blueprint_dashboard_page.skip_tour(True) blueprint_dashboard_page.verify_login_pass()
def create_user_profile(context, username): username = get_username(context, username) admin_dashboard_page.goto_users_profile_list() admin_user_profile_page.verify_user_profile_page() admin_user_profile_page.goto_add_user_profile_page() admin_add_user_profile_page.verify_add_user_profile_page() admin_add_user_profile_page.add_user_profile("AutomationCompany", username, "", False, False, False, False) admin_user_profile_page.verify_user_profile_page()
def assign_group_to_user(context, username, group_name): username = get_username(context, username) admin_dashboard_page.goto_users_list() admin_user_list_page.verify_users_list_page() admin_user_list_page.search_and_land_to_change_user(username) admin_add_user_page.verify_change_user_page() admin_add_user_page.assign_group_and_save([group_name]) admin_user_list_page.verify_users_list_page() admin_dashboard_page.go_to_dashboard_page() time.sleep(1)
def unassgin_group_from_user(context, username, group_name): username = get_username(context, username) admin_dashboard_page.goto_users_list() admin_user_list_page.verify_users_list_page() admin_user_list_page.search_and_land_to_change_user(username) admin_add_user_page.verify_change_user_page() admin_add_user_page.unselect_group_and_save(group_name) admin_user_list_page.verify_users_list_page() admin_dashboard_page.go_to_dashboard_page() time.sleep(1)
def update_user(context, username): username = get_username(context, username) is_staff = False if 'staff' in username: is_staff = True admin_dashboard_page.goto_users_list() admin_user_list_page.verify_users_list_page() admin_user_list_page.search_and_land_to_change_user(username) admin_add_user_page.verify_change_user_page() admin_add_user_page.change_user("Automation", "User1", "*****@*****.**", True, is_staff, False, [''], "") admin_user_list_page.verify_users_list_page() time.sleep(1)
def create_user(context, username, password): username = get_username(context, username) password = get_password(context, password) is_staff = False if 'staff' in username: is_staff = True admin_dashboard_page.goto_users_list() admin_user_list_page.verify_users_list_page() admin_user_list_page.goto_add_user_page() admin_add_user_page.verify_add_user_page() admin_add_user_page.create_user(username, password) admin_add_user_page.change_user("Automation", "User1", "*****@*****.**", False, is_staff, False, ['System Administrators'], "") admin_user_list_page.verify_users_list_page() time.sleep(1)