UpdateOrganizationNameAsync.robot 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. *** Settings ***
  2. Documentation 客户端-更新组织名称
  3. Resource ../../../CommonConfig/Config.robot
  4. Resource ../../../AllApi/ClientAPI/PersonalInformationApi/CommonLoginAsync.robot
  5. Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/AddOrganizationsAsync.robot
  6. Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/UpdateOrganizationNameAsync.robot
  7. Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/SearchOrganizationsAsync.robot
  8. Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/RemoveOrganizationsAsync.robot
  9. *** Variables ***
  10. *** Test Cases ***
  11. Class_001_修改机构名称
  12. #随机生成组织名
  13. ${oranName} Random Characters
  14. ${oranName1} Random Characters
  15. #登录,获取用户Token
  16. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  17. Log ${token}
  18. #添加组织
  19. ${res} AddOrganizationsAsyncPost ${token} ${oranName} ${organizationInfo_mao}[0] ${EMPTY} ${patientType}[0] ${languageCode}[0]
  20. Log ${res}
  21. #添加组织成功校验
  22. ${flag} Result Analysis ${res} True ${EMPTY} ${EMPTY}
  23. Should Be True ${flag}
  24. #查询添加机构的OrganizationCode
  25. ${organizationCode} SearchOrganizationsAsyncOrganizationCode ${token} ${oranName} ${organizationInfo_mao}[0] ${organizationType}[1]
  26. #修改机构名称
  27. ${response} UpdateOrganizationNameAsyncPost ${token} ${organizationCode} ${oranName1}
  28. #成功修改机构校验
  29. ${flag} Result Analysis ${res} True ${EMPTY} ${EMPTY}
  30. Should Be True ${flag}
  31. ${organizationCode1} SearchOrganizationsAsyncOrganizationCode ${token} ${oranName1} ${organizationInfo_mao}[0] ${organizationType}[1]
  32. Should Be Equal As Strings ${organizationCode1} ${organizationCode}
  33. #删除组织
  34. ${res1} RemoveOrganizationsAsyncPost ${token} ${organizationCode}
  35. Exception_001_修改机构名称,Token非空校验
  36. #修改机构名称,Token非空校验
  37. ${res} UpdateOrganizationNameAsyncPost ${EMPTY} ${EMPTY} ${EMPTY}
  38. Log ${res}
  39. #返回error信息校验
  40. ${flag} Result Analysis ${res} false ${1} Permission validation error
  41. Should Be True ${flag}
  42. Exception_002_修改机构名称,Token正确性校验
  43. #修改机构名称,Token非空校验
  44. ${res} UpdateOrganizationNameAsyncPost 1111111 ${EMPTY} ${EMPTY}
  45. Log ${res}
  46. #返回error信息校验
  47. ${flag} Result Analysis ${res} false ${1} Permission validation error
  48. Should Be True ${flag}
  49. Exception_003_修改机构名称,OrganizationCode非空校验
  50. #登录,获取用户Token
  51. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  52. #修改机构名称,OrganizationCode非空校验
  53. ${res} UpdateOrganizationNameAsyncPost ${token} ${EMPTY} 111111111
  54. #返回error信息校验
  55. ${flag} Result Analysis ${res} false ${6018} OrganizationCode can't be empty
  56. Should Be True ${flag}
  57. Exception_004_修改机构名称,OrganizationCode正确性校验
  58. #登录,获取用户Token
  59. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  60. #修改机构名称,OrganizationCode非空校验
  61. ${res} UpdateOrganizationNameAsyncPost ${token} Organization_20220324020204McST47 111111111
  62. #添加组织失败校验
  63. ${flag} Result Analysis ${res} false ${EMPTY} ${EMPTY}
  64. Should Be True ${flag}
  65. Exception_005_修改机构名称,OrganizationName非空校验
  66. #登录,获取用户Token
  67. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  68. #修改机构名称,OrganizationCode非空校验
  69. ${res} UpdateOrganizationNameAsyncPost ${token} Organization_20220324020204McST47 ${EMPTY}
  70. #返回error信息校验
  71. ${flag} Result Analysis ${res} false ${6017} OrganizationName can't be empty
  72. Should Be True ${flag}
  73. Exception_006_修改机构名称,OrganizationName重名校验
  74. #随机生成组织名
  75. ${oranName1} Random Characters
  76. ${oranName2} Random Characters
  77. #登录,获取用户Token
  78. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  79. #添加组织1
  80. ${res1} AddOrganizationsAsyncPost ${token} ${oranName1} ${organizationInfo_mao}[0] ${EMPTY} ${patientType}[0] ${languageCode}[0]
  81. Log ${res1}
  82. #添加组织1成功校验
  83. ${flag1} Result Analysis ${res1} True ${EMPTY} ${EMPTY}
  84. Should Be True ${flag1}
  85. #添加组织2
  86. ${res2} AddOrganizationsAsyncPost ${token} ${oranName2} ${organizationInfo_mao}[0] ${EMPTY} ${patientType}[0] ${languageCode}[0]
  87. Log ${res2}
  88. #添加组织2成功校验
  89. ${flag2} Result Analysis ${res2} True ${EMPTY} ${EMPTY}
  90. Should Be True ${flag2}
  91. #查询添加组织的OrganizationCode
  92. ${organizationCode1} SearchOrganizationsAsyncOrganizationCode ${token} ${oranName1} ${organizationInfo_mao}[0] ${organizationType}[1]
  93. ${organizationCode2} SearchOrganizationsAsyncOrganizationCode ${token} ${oranName2} ${organizationInfo_mao}[0] ${organizationType}[1]
  94. #修改机构名称
  95. ${response} UpdateOrganizationNameAsyncPost ${token} ${organizationCode1} ${oranName2}
  96. #返回error信息校验
  97. ${flag3} Result Analysis ${response} false ${6056} OrganizationName Duplicate
  98. Should Be True ${flag3}
  99. #删除添加的组织
  100. ${response1} RemoveOrganizationsAsyncPost ${token} ${organizationCode1}
  101. ${response2} RemoveOrganizationsAsyncPost ${token} ${organizationCode2}
  102. #删除组织校验
  103. ${flag4} Result Analysis ${response1} True ${EMPTY} ${EMPTY}
  104. Should Be True ${flag4}
  105. ${flag5} Result Analysis ${response2} True ${EMPTY} ${EMPTY}
  106. Should Be True ${flag5}
  107. *** Keywords ***