RemoveOrganizationsAsync.robot 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. *** Variables ***
  9. *** Test Cases ***
  10. Class_001_删除组织,删除单个组织
  11. #随机生成组织名
  12. ${oranName} Random Characters
  13. #登录,获取用户Token
  14. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  15. Log ${token}
  16. #添加组织
  17. ${res} AddOrganizationsAsyncPost ${token} ${oranName} ${organizationInfo_mao}[0] ${EMPTY} ${patientType}[0] ${languageCode}[0]
  18. Log ${res}
  19. #添加组织校验
  20. ${flag} Result Analysis ${res} True ${EMPTY} ${EMPTY}
  21. Should Be True ${flag}
  22. #搜索组织,返回OrganizationCode
  23. ${organizationCode} SearchOrganizationsAsyncOrganizationCode ${token} ${oranName} ${organizationInfo_mao}[0] ${organizationType}[1]
  24. #删除组织
  25. ${response} RemoveOrganizationsAsyncPost ${token} ${organizationCode}
  26. #删除组织校验
  27. ${flag} Result Analysis ${response} True ${EMPTY} ${EMPTY}
  28. Should Be True ${flag}
  29. ${res1} SearchOrganizationsAsyncPost ${token} ${oranName} ${organizationInfo_mao}[0] ${organizationType}[1]
  30. ${content} Get From Dictionary ${res1} content
  31. Should Be Empty ${content}
  32. Class_002_删除组织,删除多个组织
  33. #随机生成组织名
  34. ${oranName1} Random Characters
  35. ${oranName2} Random Characters
  36. #登录,获取用户Token
  37. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  38. Log ${token}
  39. #添加组织1
  40. ${res1} AddOrganizationsAsyncPost ${token} ${oranName1} ${organizationInfo_mao}[0] ${EMPTY} ${patientType}[0] ${languageCode}[0]
  41. Log ${res1}
  42. #添加组织1校验
  43. ${flag} Result Analysis ${res1} True ${EMPTY} ${EMPTY}
  44. Should Be True ${flag}
  45. #搜索组织1,返回OrganizationCode
  46. ${organizationCode1} SearchOrganizationsAsyncOrganizationCode ${token} ${oranName1} ${organizationInfo_mao}[0] ${organizationType}[1]
  47. #添加组织2
  48. ${res2} AddOrganizationsAsyncPost ${token} ${oranName2} ${organizationInfo_mao}[0] ${EMPTY} ${patientType}[0] ${languageCode}[0]
  49. Log ${res2}
  50. #添加组织2校验
  51. ${flag} Result Analysis ${res2} True ${EMPTY} ${EMPTY}
  52. Should Be True ${flag}
  53. #搜索组织2,返回OrganizationCode
  54. ${organizationCode2} SearchOrganizationsAsyncOrganizationCode ${token} ${oranName2} ${organizationInfo_mao}[0] ${organizationType}[1]
  55. #删除组织
  56. ${response} RemoveOrganizationsAsyncPost ${token} ${organizationCode1},${organizationCode2}
  57. #删除组织校验
  58. ${flag} Result Analysis ${response} True ${EMPTY} ${EMPTY}
  59. Should Be True ${flag}
  60. ${res3} SearchOrganizationsAsyncPost ${token} ${oranName1} ${organizationInfo_mao}[0] ${organizationType}[1]
  61. ${content} Get From Dictionary ${res3} content
  62. Should Be Empty ${content}
  63. ${res4} SearchOrganizationsAsyncPost ${token} ${oranName2} ${organizationInfo_mao}[0] ${organizationType}[1]
  64. ${content} Get From Dictionary ${res4} content
  65. Should Be Empty ${content}
  66. Exception_001_删除组织,Token非空校验
  67. #删除组织,Token传入空值
  68. ${res} RemoveOrganizationsAsyncPost ${EMPTY} ${EMPTY}
  69. #返回error信息校验
  70. ${flag} Result Analysis ${res} false ${1} Permission validation error
  71. Should Be True ${flag}
  72. Exception_002_删除组织,Token正确性校验
  73. #删除组织,Token传入错误的值
  74. ${res} RemoveOrganizationsAsyncPost 11111111111 ${EMPTY}
  75. #返回error信息校验
  76. ${flag} Result Analysis ${res} false ${1} Permission validation error
  77. Should Be True ${flag}
  78. *** Keywords ***