*** Settings *** Documentation 查询可转诊机构列表 Resource ../../../CommonConfig/Config.robot Resource ../../../AllApi/ClientAPI/PersonalInformationApi/CommonLoginAsync.robot Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/FindOrganizationsByPageAsync.robot *** Test Cases *** Class_001_查询可转诊机构列表 #登录,获取用户Token ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0} #查询可转诊机构列表 ${res} FindOrganizationsByPageAsyncPost ${token} 1 1000000 ${EMPTY} log ${res} ${content} Get From Dictionary ${res} content @{list} Get From Dictionary ${content} PageData ${organizationCodes} Create List FOR ${value} IN @{list} ${organizationCode} Get From Dictionary ${value} OrganizationCode Append To List ${organizationCodes} ${organizationCode} END #校验,返回的数据中包含用户自己所在的医院 log @{organizationInfo_mao} List Should Contain Value ${organizationCodes} @{organizationInfo_mao} Class_002_查询可转诊机构列表,设置页大小 #登录,获取用户Token ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0} ${pageSize} Set Variable 20 #查询可转诊机构列表 ${res} FindOrganizationsByPageAsyncPost ${token} 1 ${pageSize} ${EMPTY} log ${res} #校验 ${content} Get From Dictionary ${res} content ${pageSize1} Get From Dictionary ${content} PageSize Should Be Equal As Strings ${pageSize1} ${pageSize} Class_003_查询可转诊机构列表,设置当前页 #登录,获取用户Token ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0} ${pageIndex} Set Variable 20 #查询可转诊机构列表 ${res} FindOrganizationsByPageAsyncPost ${token} ${pageIndex} 10 ${EMPTY} log ${res} #校验 ${content} Get From Dictionary ${res} content ${pageIndex1} Get From Dictionary ${content} PageIndex Should Be Equal As Strings ${pageIndex1} ${pageIndex} Class_004_查询可转诊机构列表,传入存在的KeyWord #登录,获取用户Token ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0} #查询可转诊机构列表 ${res} FindOrganizationsByPageAsyncPost ${token} 1 10 jo log ${res} ${content} Get From Dictionary ${res} content @{list} Get From Dictionary ${content} PageData ${organizationCodes} Create List FOR ${value} IN @{list} ${organizationCode} Get From Dictionary ${value} OrganizationCode Append To List ${organizationCodes} ${organizationCode} END #校验,返回的数据中包含用户自己所在的医院 log @{organizationInfo_mao} List Should Contain Value ${organizationCodes} @{organizationInfo_mao} Class_005_查询可转诊机构列表,传入不存在的KeyWord #登录,获取用户Token ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0} #查询可转诊机构列表 ${res} FindOrganizationsByPageAsyncPost ${token} 1 10 @#$%^&* log ${res} ${content} Get From Dictionary ${res} content ${totalCount} Get From Dictionary ${content} TotalCount Should Be Equal As Integers ${totalCount} 0 Exception_005_查询可转诊机构列表,Token非空校验 #查询可转诊机构列表 ${res} FindOrganizationsByPageAsyncPost ${EMPTY} 1 10 ${EMPTY} log ${res} #返回error信息校验 ${flag} Result Analysis ${res} false ${1} Permission validation error Should Be True ${flag} Exception_006_查询可转诊机构列表,Token正确性校验 #查询可转诊机构列表 ${res} FindOrganizationsByPageAsyncPost 11111 1 10 ${EMPTY} log ${res} #返回error信息校验 ${flag} Result Analysis ${res} false ${1} Permission validation error Should Be True ${flag}