SavePersonOrganizationAsync.robot 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  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/SearchOrganizationsAsync.robot
  7. Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/RemoveOrganizationsAsync.robot
  8. Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/SavePersonOrganizationAsync.robot
  9. Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/GetOrganizationByCodeAsync.robot
  10. *** Variables ***
  11. *** Test Cases ***
  12. Class_001_保存机构信息,修改RegionCode(地区编码)
  13. [Setup]
  14. [Template]
  15. #登录,获取用户Token
  16. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  17. #修改机构RegionCode
  18. ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
  19. Log ${res}
  20. #校验
  21. ${flag} Result Analysis ${res} True ${EMPTY} ${EMPTY}
  22. Should Be True ${flag}
  23. ${res1} GetOrganizationByCodeAsyncPost ${token} ${organizationInfo_mao}[0]
  24. ${regionCode1} Get From Dictionary ${res1}[content] RegionCode
  25. Should Be Equal As Strings ${regionCode1} ${regionCode}[1]
  26. #修改机构RegionCode
  27. ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[0] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
  28. Class_002_保存机构信息,修改ParentCode(上级机构)
  29. [Setup]
  30. [Template]
  31. #登录,获取用户Token
  32. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  33. #修改机构ParentCode
  34. ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organzationCode_gary}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
  35. Log ${res}
  36. #校验
  37. ${flag} Result Analysis ${res} True ${EMPTY} ${EMPTY}
  38. Should Be True ${flag}
  39. ${res1} GetOrganizationByCodeAsyncPost ${token} ${organizationInfo_mao}[0]
  40. ${parentCode} Get From Dictionary ${res1}[content] ParentCode
  41. Should Be Equal As Strings ${parentCode} ${organzationCode_gary}[0]
  42. #修改机构ParentCode回jo测试医院
  43. ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
  44. Class_003_保存机构信息,修改LogoUrl(Logo)
  45. [Setup]
  46. [Template]
  47. #登录,获取用户Token
  48. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  49. #修改机构LogoUrl
  50. ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[0] ${organizationInfo_jo}[0] ${image}[0] ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
  51. Log ${res}
  52. #校验
  53. ${flag} Result Analysis ${res} True ${EMPTY} ${EMPTY}
  54. Should Be True ${flag}
  55. ${res1} GetOrganizationByCodeAsyncPost ${token} ${organizationInfo_mao}[0]
  56. ${logoUrl} Get From Dictionary ${res1}[content] LogoUrl
  57. #校验图片名称
  58. ${logoUrls} Split String ${logoUrl} /
  59. Log ${logoUrls}
  60. ${logoUrlLen} Get Length ${logoUrls}
  61. ${images} Split String ${image}[0] /
  62. Log ${images}
  63. ${imagesLen} Get Length ${images}
  64. Should Be Equal As Strings ${logoUrls}[${logoUrlLen-1}] ${images}[${imagesLen-1}]
  65. #修改机构LogoUrl为空
  66. ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${image}[1] ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
  67. Class_004_保存机构信息,修改OrganizationName(机构名称)
  68. [Setup]
  69. [Template]
  70. #登录,获取用户Token
  71. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  72. #修改机构OrganizationName
  73. ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院修改 ${patientType}[0] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
  74. Log ${res}
  75. #校验
  76. ${flag} Result Analysis ${res} True ${EMPTY} ${EMPTY}
  77. Should Be True ${flag}
  78. ${res1} GetOrganizationByCodeAsyncPost ${token} ${organizationInfo_mao}[0]
  79. ${organizationName1} Get From Dictionary ${res1}[content] OrganizationName
  80. Should Be Equal As Strings ${organizationName1} jo下级测试医院修改
  81. #修改机构OrganizationName
  82. ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
  83. Class_005_保存机构信息,修改PatientType(服务对象)
  84. [Setup]
  85. [Template]
  86. #登录,获取用户Token
  87. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  88. #修改机构PatientType
  89. ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[1] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
  90. Log ${res}
  91. #校验
  92. ${flag} Result Analysis ${res} True ${EMPTY} ${EMPTY}
  93. Should Be True ${flag}
  94. ${res1} GetOrganizationByCodeAsyncPost ${token} ${organizationInfo_mao}[0]
  95. ${patientType1} Get From Dictionary ${res1}[content] PatientType
  96. Should Be Equal As Strings ${patientType1} ${patientType}[1]
  97. #修改机构PatientType
  98. ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
  99. Exception_001保存机构信息,Token非空校验
  100. [Setup]
  101. [Template]
  102. #修改机构信息,Token传入空值
  103. ${res} SavePersonOrganizationAsyncPost ${EMPTY} ${regionCode}[0] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 2 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
  104. Log ${res}
  105. #返回error信息校验
  106. ${flag} Result Analysis ${res} false ${1} Permission validation error
  107. Should Be True ${flag}
  108. Exception_002_保存机构信息,Token正确性校验
  109. [Setup]
  110. [Template]
  111. #修改机构信息,Token传入错误的值
  112. ${res} SavePersonOrganizationAsyncPost 11111 ${regionCode}[0] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 2 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
  113. Log ${res}
  114. #返回error信息校验
  115. ${flag} Result Analysis ${res} false ${1} Permission validation error
  116. Should Be True ${flag}
  117. Exception_003_保存机构信息,OrganizationCode非空校验
  118. [Setup]
  119. [Template]
  120. #登录,获取用户Token
  121. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  122. #修改机构RegionCode
  123. ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[0] ${organizationInfo_jo}[0] ${EMPTY} ${EMPTY} jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 2 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
  124. Log ${res}
  125. #返回error信息校验
  126. ${flag} Result Analysis ${res} false ${6018} OrganizationCode Empty Error
  127. Should Be True ${flag}
  128. Exception_004_保存机构信息,OrganizationCode正确性校验
  129. [Setup]
  130. [Template]
  131. #登录,获取用户Token
  132. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  133. #修改机构RegionCode
  134. ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[0] ${organizationInfo_jo}[0] ${EMPTY} 1111 jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 2 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
  135. Log ${res}
  136. #返回error信息校验
  137. ${flag} Result Analysis ${res} false ${6014} Organization Code Empty error
  138. Should Be True ${flag}
  139. Exception_005_保存机构信息,OrganizationName非空校验
  140. [Setup]
  141. [Template]
  142. #登录,获取用户Token
  143. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  144. #修改机构RegionCode
  145. ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[0] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] ${EMPTY} ${patientType}[0] ${isEncryptedShow}[0] 2 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
  146. Log ${res}
  147. #返回error信息校验
  148. ${flag} Result Analysis ${res} false ${6017} OrganizationName Empty Error
  149. Should Be True ${flag}
  150. Class_006_保存机构信息,修改IsEncryptedShow
  151. [Setup]
  152. [Template]
  153. #登录,获取用户Token
  154. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  155. #修改机构IsEncryptedShow
  156. ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[1] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
  157. Log ${res}
  158. #校验
  159. ${flag} Result Analysis ${res} True ${EMPTY} ${EMPTY}
  160. Should Be True ${flag}
  161. ${res1} GetOrganizationByCodeAsyncPost ${token} ${organizationInfo_mao}[0]
  162. ${IsEncryptedShow1} Get From Dictionary ${res1}[content] IsEncryptedShow
  163. Should Be True ${IsEncryptedShow1}
  164. #修改机构IsEncryptedShow
  165. ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
  166. Class_007_保存机构信息,修改ReferralLimitHours
  167. [Setup]
  168. [Template]
  169. #登录,获取用户Token
  170. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  171. #修改机构ReferralLimitHours
  172. ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 2 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
  173. Log ${res}
  174. #校验
  175. ${flag} Result Analysis ${res} True ${EMPTY} ${EMPTY}
  176. Should Be True ${flag}
  177. ${res1} GetOrganizationByCodeAsyncPost ${token} ${organizationInfo_mao}[0]
  178. ${ReferralLimitHours1} Get From Dictionary ${res1}[content] ReferralLimitHours
  179. Should Be Equal As Integers ${ReferralLimitHours1} 2
  180. #修改机构ReferralLimitHours
  181. ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
  182. Class_008_保存机构信息,修改ReferralOrganizationCodes
  183. [Setup]
  184. [Template]
  185. #登录,获取用户Token
  186. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  187. #修改机构ReferralLimitHours
  188. ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 2 ${organizationInfo_jo}[0]
  189. Log ${res}
  190. #校验
  191. ${flag} Result Analysis ${res} True ${EMPTY} ${EMPTY}
  192. Should Be True ${flag}
  193. ${res1} GetOrganizationByCodeAsyncPost ${token} ${organizationInfo_mao}[0]
  194. @{ReferralOrganizationCodes} Get From Dictionary ${res1}[content] ReferralOrganizationCodes
  195. Should Contain @{ReferralOrganizationCodes} ${organizationInfo_jo}[0]
  196. #修改机构ReferralLimitHours
  197. ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
  198. *** Keywords ***