コード例 #1
0
 def test_allocate_case_to_group(login, init_test_case):
     """分发案件给用户组"""
     operate_case, operate_view = init_test_case
     data = api.read_excel('test_allocate_case_to_group')
     group_name = data.get('group_name')
     case_name = api.create_case_name()
     operate_case.add_case(case_name)
     operate_case.allocate_case_to_group(case_name, group_name)
     prompt_message = api.prompt_message(login).text
     assert prompt_message == data.get('prompt_message')
コード例 #2
0
 def test_allocate_case_to_user(login, init_test_case):
     """将分发案件给单个用户"""
     operate_case, operate_view = init_test_case
     data = api.read_excel('test_allocate_case_to_user')
     group_name = data.get('group_name')
     user_name = data.get('user_name')
     case_name = api.create_case_name()
     operate_case.add_case(case_name)
     operate_case.allocate_case_to_user(case_name, group_name, user_name)
     time.sleep(1)
     prompt_message = api.prompt_message(login).text
     time.sleep(1)
     assert prompt_message == data.get('prompt_message')
コード例 #3
0
 def test_add_repetition_case(login, init_test_case):
     """新增重复案件"""
     operate_case, operate_view = init_test_case
     data = api.read_excel('test_add_repetition_case')
     case_name = api.create_case_name()
     # 新建案件
     operate_case.add_case(case_name)
     operate_case.switch_tab('案件列表')
     # 新建重复案件
     operate_case.add_case(case_name)
     # 获取提示信息
     prompt_message = api.prompt_message(login).text
     assert prompt_message == data.get('prompt_message')
     # 关闭新增案件窗口
     operate_case.close_add_case_window()
コード例 #4
0
 def test_new_password_diff(login, init_test_menu):
     """修改密码时,两次新密码不同"""
     operate_menu = init_test_menu
     operate_menu.open_menu('设置', '修改密码')
     data = api.read_excel('test_new_password_diff')
     old_password = data.get('old_password')
     new_password = data.get('new_password')
     confirm_password = data.get('confirm_password')
     operate_menu.change_password(old_password, new_password,
                                  confirm_password)
     time.sleep(1)
     prompt_message = api.prompt_message(login).text
     assert prompt_message == data.get('msg')
     time.sleep(1)
     # 关闭修改密码窗口
     operate_menu.close_password_window()