UpdateRankNameAsync.robot 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. *** Settings ***
  2. Documentation 客户端-更新职称名
  3. Resource ../../../CommonConfig/Config.robot
  4. Resource ../../../AllApi/ClientAPI/PersonalInformationApi/CommonLoginAsync.robot
  5. Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/AddRanksAsync.robot
  6. Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/GetAllRanksAsync.robot
  7. Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/RemoveRanksAsync.robot
  8. Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/UpdateRankNameAsync.robot
  9. Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/GetRankByCodeAsync.robot
  10. *** Variables ***
  11. *** Test Cases ***
  12. Class_001_更新职称名
  13. #随机生成职称名
  14. ${raName} Random Characters
  15. ${raName1} Random Characters
  16. #登录,获取用户Token
  17. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  18. #添加职称信息
  19. ${res1} AddRanksAsyncPost ${token} ${raName} ${organizationInfo_mao}[0] ${EMPTY}
  20. Log ${res1}
  21. #添加职称成功校验
  22. ${flag1} Result Analysis ${res1} True ${EMPTY} ${EMPTY}
  23. Should Be True ${flag1}
  24. #获取新添加职称信息记录的RankCode
  25. ${rankCode} GetAllRanksAsyncPost_RankCode ${token} ${EMPTY} ${organizationInfo_mao}[0]
  26. #更新职称名
  27. ${res2} UpdateRankNameAsyncPost ${token} ${rankCode} ${raName1}
  28. Log ${res2}
  29. #更新职称名校验
  30. ${flag2} Result Analysis ${res2} True ${EMPTY} ${EMPTY}
  31. Should Be True ${flag2}
  32. ${res3} GetRankByCodeAsyncPost ${token} ${rankCode}
  33. ${content} Get From Dictionary ${res3} content
  34. ${rankName} Get From Dictionary ${content} RankName
  35. Should Be Equal As Strings ${rankName} ${raName1}
  36. #删除职称
  37. ${response} RemoveRanksAsyncPost ${token} ${rankCode}
  38. #删除组织校验
  39. ${flag2} Result Analysis ${response} True ${EMPTY} ${EMPTY}
  40. Should Be True ${flag2}
  41. Exception_001_更新职称名,Token非空校验
  42. #更新职称名
  43. ${res} UpdateRankNameAsyncPost ${EMPTY} ${EMPTY} ${EMPTY}
  44. Log ${res}
  45. #返回error信息校验
  46. ${flag} Result Analysis ${res} false ${1} Permission validation error
  47. Should Be True ${flag}
  48. Exception_002_更新职称名,Token正确性校验
  49. #更新职称名
  50. ${res} UpdateRankNameAsyncPost 1111111 ${EMPTY} ${EMPTY}
  51. Log ${res}
  52. #返回error信息校验
  53. ${flag} Result Analysis ${res} false ${1} Permission validation error
  54. Should Be True ${flag}
  55. Exception_003_更新职称名,RankCode非空校验校验
  56. #登录,获取用户Token
  57. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  58. #更新职称名
  59. ${res} UpdateRankNameAsyncPost ${token} ${EMPTY} 1111
  60. Log ${res}
  61. #返回error信息校验
  62. ${flag} Result Analysis ${res} false ${6022} RankCode can't be empty
  63. Should Be True ${flag}
  64. Exception_004_更新职称名,不存在的RankCode
  65. #登录,获取用户Token
  66. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  67. #更新职称名
  68. ${res} UpdateRankNameAsyncPost ${token} 111 1111
  69. Log ${res}
  70. #更新失败,result返回false
  71. ${flag} Result Analysis ${res} false ${EMPTY} ${EMPTY}
  72. Should Be True ${flag}
  73. Exception_005_更新职称名,RankName非空校验
  74. #登录,获取用户Token
  75. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  76. #更新职称名
  77. ${res} UpdateRankNameAsyncPost ${token} 1111 ${EMPTY}
  78. Log ${res}
  79. #返回error信息校验
  80. ${flag} Result Analysis ${res} false ${6023} RankName can't be empty
  81. Should Be True ${flag}
  82. Exception_006_更新职称名,RankName重名校验
  83. [Tags] inexecution
  84. Exception_007_更新职称名,RankName最大字符长度校验
  85. [Tags] inexecution
  86. *** Keywords ***