GetOrganizationSettingAsync.robot 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. *** Settings ***
  2. Documentation 客户端-获取机构配置信息
  3. ... SettingType 0-病人、1-检查、2-预约会诊
  4. ... 管理端机构>>更多>>病人配置、检查配置、预约会诊配置
  5. Suite Setup
  6. Resource ../../../CommonConfig/Config.robot
  7. Resource ../../../AllApi/ClientAPI/PersonalInformationApi/CommonLoginAsync.robot
  8. Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/GetOrganizationSettingAsync.robot
  9. *** Variables ***
  10. *** Test Cases ***
  11. class_001_获取机构配置信息(病人),版本号小于最新版本
  12. [Template]
  13. #获取Token
  14. ${token} GetCommonLoginAsyncToken ${user_jo0221}[0] ${EMPTY} ${user_jo0221}[1] ${3} ${0}
  15. Log ${token}
  16. #获取机构配置信息,病人、小于最新版本号
  17. ${res} GetOrganizationSettingAsyncPost ${token} ${getOrganizationSettingAsync_settingType}[0] 0.1
  18. Log ${res}
  19. ${content} Get From Dictionary ${res} content
  20. #校验
  21. ${settingVersion} Get From Dictionary ${content} SettingVersion
  22. Should Not Be Equal As Strings ${settingVersion} 0.1
  23. class_002_获取机构检查配置信息
  24. [Template]
  25. #获取Token
  26. ${token} GetCommonLoginAsyncToken ${user_jo0221}[0] ${EMPTY} ${user_jo0221}[1] ${3} ${0}
  27. Log ${token}
  28. #获取机构配置信息,检查、小于最新版本号
  29. ${res} GetOrganizationSettingAsyncPost ${token} ${getOrganizationSettingAsync_settingType}[1] 0.1
  30. Log ${res}
  31. ${content} Get From Dictionary ${res} content
  32. #校验
  33. ${settingVersion} Get From Dictionary ${content} SettingVersion
  34. Should Not Be Equal As Strings ${settingVersion} 0.1
  35. class_003_获取机构预约会诊配置信息
  36. [Template]
  37. #获取Token
  38. ${token} GetCommonLoginAsyncToken ${user_jo0221}[0] ${EMPTY} ${user_jo0221}[1] ${3} ${0}
  39. Log ${token}
  40. #获取机构配置信息,预约会诊、小于最新版本号
  41. ${res} GetOrganizationSettingAsyncPost ${token} ${getOrganizationSettingAsync_settingType}[2] 0.1
  42. Log ${res}
  43. ${content} Get From Dictionary ${res} content
  44. #校验
  45. ${settingVersion} Get From Dictionary ${content} SettingVersion
  46. Should Not Be Equal As Strings ${settingVersion} 0.1
  47. Exception_001_获取机构配置信息,Token传入空值
  48. [Template]
  49. #获取机构配置信息,Token传入空值
  50. ${res} GetOrganizationSettingAsyncPost ${EMPTY} ${getOrganizationSettingAsync_settingType}[2] 0.1
  51. Log ${res}
  52. #校验
  53. ${flag} Result Analysis ${res} false ${1} Permission validation error
  54. Should Be True ${flag}
  55. Exception_002_获取机构配置信息,SettingType传入非特定值
  56. [Template]
  57. #获取Token
  58. ${token} GetCommonLoginAsyncToken ${user_jo0221}[0] ${EMPTY} ${user_jo0221}[1] ${3} ${0}
  59. #获取机构配置信息,SettingType传入非特定值
  60. ${res} GetOrganizationSettingAsyncPost ${token} 99 0.1
  61. Log ${res}
  62. ${content} Get From Dictionary ${res} content
  63. #校验
  64. ${settingVersion} Get From Dictionary ${content} SettingVersion
  65. Should Be Empty ${settingVersion}
  66. Exception_003_获取机构配置信息,Version传入空值
  67. [Template]
  68. #获取Token
  69. ${token} GetCommonLoginAsyncToken ${user_jo0221}[0] ${EMPTY} ${user_jo0221}[1] ${3} ${0}
  70. Log ${token}
  71. #获取机构配置信息,Version传入空值
  72. ${res} GetOrganizationSettingAsyncPost ${token} ${getOrganizationSettingAsync_settingType}[0] ${EMPTY}
  73. Log ${res}
  74. ${content} Get From Dictionary ${res} content
  75. #校验
  76. ${flag} Result Analysis ${res} false ${6039} Not real version
  77. Should Be True ${flag}
  78. Exception_004_获取机构配置信息,Version大于或等于当前版本
  79. [Template]
  80. #获取Token
  81. ${token} GetCommonLoginAsyncToken ${user_jo0221}[0] ${EMPTY} ${user_jo0221}[1] ${3} ${0}
  82. Log ${token}
  83. #获取机构配置信息,Version大于或等于当前版本
  84. ${res} GetOrganizationSettingAsyncPost ${token} ${getOrganizationSettingAsync_settingType}[0] 9.9
  85. Log ${res}
  86. ${content} Get From Dictionary ${res} content
  87. #校验
  88. ${flag} Result Analysis ${res} false ${6041} This is the latest version
  89. Should Be True ${flag}
  90. Exception_005_获取机构配置信息,Version规则校验
  91. [Documentation] 需满足规则^[0-9]{1}(.[0-9])+$,不能大于10
  92. [Template]
  93. #获取Token
  94. ${token} GetCommonLoginAsyncToken ${user_jo0221}[0] ${EMPTY} ${user_jo0221}[1] ${3} ${0}
  95. Log ${token}
  96. #获取机构配置信息,Version不符合规则校验要求
  97. ${res} GetOrganizationSettingAsyncPost ${token} ${getOrganizationSettingAsync_settingType}[0] 10
  98. Log ${res}
  99. ${content} Get From Dictionary ${res} content
  100. #校验
  101. ${flag} Result Analysis ${res} false ${6039} Not real version
  102. Should Be True ${flag}
  103. *** Keywords ***