Ejemplo n.º 1
0
def setup_user(sb):
    """ 添加用户 """
    request = {'name': generate_uuid()}
    MenuBar.click_menu_item_by_text(sb, '配置', '用户管理')
    user = User(request['name'], request['name'])
    UserPage.add_user_by_department_name(sb, user)
    yield request
    sb.save_teardown_screenshot()
Ejemplo n.º 2
0
def test_add_user(sb, login, setup_user_name_and_delete_user):
    user = User(
        setup_user_name_and_delete_user['name'], setup_user_name_and_delete_user['name'])
    UserPage.add_user_by_department_name(sb, user)
    UserPage.assert_alert_message(sb, '添加用户成功')