FindOrganizationsByPageAsync.robot 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. *** Settings ***
  2. Documentation 查询可转诊机构列表
  3. Resource ../../../CommonConfig/Config.robot
  4. Resource ../../../AllApi/ClientAPI/PersonalInformationApi/CommonLoginAsync.robot
  5. Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/FindOrganizationsByPageAsync.robot
  6. *** Test Cases ***
  7. Class_001_查询可转诊机构列表
  8. #登录,获取用户Token
  9. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  10. #查询可转诊机构列表
  11. ${res} FindOrganizationsByPageAsyncPost ${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 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} FindOrganizationsByPageAsyncPost ${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} FindOrganizationsByPageAsyncPost ${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} FindOrganizationsByPageAsyncPost ${token} 1 10 jo
  50. log ${res}
  51. ${content} Get From Dictionary ${res} content
  52. @{list} Get From Dictionary ${content} PageData
  53. ${organizationCodes} Create List
  54. FOR ${value} IN @{list}
  55. ${organizationCode} Get From Dictionary ${value} OrganizationCode
  56. Append To List ${organizationCodes} ${organizationCode}
  57. END
  58. #校验,返回的数据中包含用户自己所在的医院
  59. log @{organizationInfo_mao}
  60. List Should Contain Value ${organizationCodes} @{organizationInfo_mao}
  61. Class_005_查询可转诊机构列表,传入不存在的KeyWord
  62. #登录,获取用户Token
  63. ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
  64. #查询可转诊机构列表
  65. ${res} FindOrganizationsByPageAsyncPost ${token} 1 10 @#$%^&*
  66. log ${res}
  67. ${content} Get From Dictionary ${res} content
  68. ${totalCount} Get From Dictionary ${content} TotalCount
  69. Should Be Equal As Integers ${totalCount} 0
  70. Exception_005_查询可转诊机构列表,Token非空校验
  71. #查询可转诊机构列表
  72. ${res} FindOrganizationsByPageAsyncPost ${EMPTY} 1 10 ${EMPTY}
  73. log ${res}
  74. #返回error信息校验
  75. ${flag} Result Analysis ${res} false ${1} Permission validation error
  76. Should Be True ${flag}
  77. Exception_006_查询可转诊机构列表,Token正确性校验
  78. #查询可转诊机构列表
  79. ${res} FindOrganizationsByPageAsyncPost 11111 1 10 ${EMPTY}
  80. log ${res}
  81. #返回error信息校验
  82. ${flag} Result Analysis ${res} false ${1} Permission validation error
  83. Should Be True ${flag}