FindPatientOrganizationsByPageAsync.robot 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. *** Settings ***
  2. Documentation 分页查询上级机构列表
  3. Resource ../../../CommonConfig/Config.robot
  4. Resource ../../../AllApi/ClientAPI/PersonalInformationApi/CommonLoginAsync.robot
  5. Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/FindPatientOrganizationsByPageAsync.robot
  6. *** Test Cases ***
  7. Class_001_分页查询上级机构列表
  8. #登录,获取用户Token
  9. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  10. #查询上级机构列表
  11. ${res} FindPatientOrganizationsByPageAsyncPost ${token} 1 1000000 ${EMPTY}
  12. log ${res}
  13. ${content} Get From Dictionary ${res} content
  14. @{list} Get From Dictionary ${content} PageData
  15. ${organizationCodes} Create List
  16. FOR ${value} IN @{list}
  17. ${organizationCode} Get From Dictionary ${value} OrganizationCode
  18. Append To List ${organizationCodes} ${organizationCode}
  19. END
  20. #校验,返回的数据中不包含用户自己所在的医院
  21. log @{organizationInfo_mao}
  22. List Should Not Contain Value ${organizationCodes} @{organizationInfo_mao}
  23. Class_002_分页查询上级机构列表,设置页大小
  24. #登录,获取用户Token
  25. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  26. ${pageSize} Set Variable 20
  27. #查询上级机构列表
  28. ${res} FindPatientOrganizationsByPageAsyncPost ${token} 1 ${pageSize} ${EMPTY}
  29. log ${res}
  30. #校验
  31. ${content} Get From Dictionary ${res} content
  32. ${pageSize1} Get From Dictionary ${content} PageSize
  33. Should Be Equal As Strings ${pageSize1} ${pageSize}
  34. Class_003_分页查询上级机构列表,设置当前页
  35. #登录,获取用户Token
  36. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  37. ${pageIndex} Set Variable 20
  38. #查询上级机构列表
  39. ${res} FindPatientOrganizationsByPageAsyncPost ${token} ${pageIndex} 10 ${EMPTY}
  40. log ${res}
  41. #校验
  42. ${content} Get From Dictionary ${res} content
  43. ${pageIndex1} Get From Dictionary ${content} PageIndex
  44. Should Be Equal As Strings ${pageIndex1} ${pageIndex}
  45. Class_004_分页查询上级机构列表,传入存在的KeyWord
  46. #登录,获取用户Token
  47. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  48. #查询上级机构列表
  49. ${res} FindPatientOrganizationsByPageAsyncPost ${token} 1 10 jo
  50. log ${res}
  51. #校验
  52. ${content} Get From Dictionary ${res} content
  53. ${totalCount} Get From Dictionary ${content} TotalCount
  54. Should Not Be Equal As Integers ${totalCount} 0
  55. Class_005_分页查询上级机构列表,传入不存在的KeyWord
  56. #登录,获取用户Token
  57. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  58. #查询上级机构列表
  59. ${res} FindPatientOrganizationsByPageAsyncPost ${token} 1 10 @!#$%^rfghj
  60. log ${res}
  61. ${content} Get From Dictionary ${res} content
  62. ${totalCount} Get From Dictionary ${content} TotalCount
  63. Should Be Equal As Integers ${totalCount} 0
  64. Exception_001_分页查询上级机构列表,Token非空校验
  65. #查询上级机构列表
  66. ${res} FindPatientOrganizationsByPageAsyncPost ${EMPTY} 1 10 ${EMPTY}
  67. log ${res}
  68. #返回error信息校验
  69. ${flag} Result Analysis ${res} false ${1} Permission validation error
  70. Should Be True ${flag}
  71. Exception_002_分页查询上级机构列表,Token正确性校验
  72. #查询上级机构列表
  73. ${res} FindPatientOrganizationsByPageAsyncPost 1111 1 10 ${EMPTY}
  74. log ${res}
  75. #返回error信息校验
  76. ${flag} Result Analysis ${res} false ${1} Permission validation error
  77. Should Be True ${flag}