123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- *** Settings ***
- Documentation 客户端-更新组织名称
- Resource ../../../CommonConfig/Config.robot
- Resource ../../../AllApi/ClientAPI/PersonalInformationApi/CommonLoginAsync.robot
- Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/AddOrganizationsAsync.robot
- Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/UpdateOrganizationNameAsync.robot
- Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/SearchOrganizationsAsync.robot
- Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/RemoveOrganizationsAsync.robot
- *** Variables ***
- *** Test Cases ***
- Class_001_修改机构名称
- #随机生成组织名
- ${oranName} Random Characters
- ${oranName1} Random Characters
- #登录,获取用户Token
- ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
- Log ${token}
- #添加组织
- ${res} AddOrganizationsAsyncPost ${token} ${oranName} ${organizationInfo_mao}[0] ${EMPTY} ${patientType}[0] ${languageCode}[0]
- Log ${res}
- #添加组织成功校验
- ${flag} Result Analysis ${res} True ${EMPTY} ${EMPTY}
- Should Be True ${flag}
- #查询添加机构的OrganizationCode
- ${organizationCode} SearchOrganizationsAsyncOrganizationCode ${token} ${oranName} ${organizationInfo_mao}[0] ${organizationType}[1]
- #修改机构名称
- ${response} UpdateOrganizationNameAsyncPost ${token} ${organizationCode} ${oranName1}
- #成功修改机构校验
- ${flag} Result Analysis ${res} True ${EMPTY} ${EMPTY}
- Should Be True ${flag}
- ${organizationCode1} SearchOrganizationsAsyncOrganizationCode ${token} ${oranName1} ${organizationInfo_mao}[0] ${organizationType}[1]
- Should Be Equal As Strings ${organizationCode1} ${organizationCode}
- #删除组织
- ${res1} RemoveOrganizationsAsyncPost ${token} ${organizationCode}
- Exception_001_修改机构名称,Token非空校验
- #修改机构名称,Token非空校验
- ${res} UpdateOrganizationNameAsyncPost ${EMPTY} ${EMPTY} ${EMPTY}
- Log ${res}
- #返回error信息校验
- ${flag} Result Analysis ${res} false ${1} Permission validation error
- Should Be True ${flag}
- Exception_002_修改机构名称,Token正确性校验
- #修改机构名称,Token非空校验
- ${res} UpdateOrganizationNameAsyncPost 1111111 ${EMPTY} ${EMPTY}
- Log ${res}
- #返回error信息校验
- ${flag} Result Analysis ${res} false ${1} Permission validation error
- Should Be True ${flag}
- Exception_003_修改机构名称,OrganizationCode非空校验
- #登录,获取用户Token
- ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
- #修改机构名称,OrganizationCode非空校验
- ${res} UpdateOrganizationNameAsyncPost ${token} ${EMPTY} 111111111
- #返回error信息校验
- ${flag} Result Analysis ${res} false ${6018} OrganizationCode can't be empty
- Should Be True ${flag}
- Exception_004_修改机构名称,OrganizationCode正确性校验
- #登录,获取用户Token
- ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
- #修改机构名称,OrganizationCode非空校验
- ${res} UpdateOrganizationNameAsyncPost ${token} Organization_20220324020204McST47 111111111
- #添加组织失败校验
- ${flag} Result Analysis ${res} false ${EMPTY} ${EMPTY}
- Should Be True ${flag}
- Exception_005_修改机构名称,OrganizationName非空校验
- #登录,获取用户Token
- ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
- #修改机构名称,OrganizationCode非空校验
- ${res} UpdateOrganizationNameAsyncPost ${token} Organization_20220324020204McST47 ${EMPTY}
- #返回error信息校验
- ${flag} Result Analysis ${res} false ${6017} OrganizationName can't be empty
- Should Be True ${flag}
- Exception_006_修改机构名称,OrganizationName重名校验
- #随机生成组织名
- ${oranName1} Random Characters
- ${oranName2} Random Characters
- #登录,获取用户Token
- ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
- #添加组织1
- ${res1} AddOrganizationsAsyncPost ${token} ${oranName1} ${organizationInfo_mao}[0] ${EMPTY} ${patientType}[0] ${languageCode}[0]
- Log ${res1}
- #添加组织1成功校验
- ${flag1} Result Analysis ${res1} True ${EMPTY} ${EMPTY}
- Should Be True ${flag1}
- #添加组织2
- ${res2} AddOrganizationsAsyncPost ${token} ${oranName2} ${organizationInfo_mao}[0] ${EMPTY} ${patientType}[0] ${languageCode}[0]
- Log ${res2}
- #添加组织2成功校验
- ${flag2} Result Analysis ${res2} True ${EMPTY} ${EMPTY}
- Should Be True ${flag2}
- #查询添加组织的OrganizationCode
- ${organizationCode1} SearchOrganizationsAsyncOrganizationCode ${token} ${oranName1} ${organizationInfo_mao}[0] ${organizationType}[1]
- ${organizationCode2} SearchOrganizationsAsyncOrganizationCode ${token} ${oranName2} ${organizationInfo_mao}[0] ${organizationType}[1]
- #修改机构名称
- ${response} UpdateOrganizationNameAsyncPost ${token} ${organizationCode1} ${oranName2}
- #返回error信息校验
- ${flag3} Result Analysis ${response} false ${6056} OrganizationName Duplicate
- Should Be True ${flag3}
- #删除添加的组织
- ${response1} RemoveOrganizationsAsyncPost ${token} ${organizationCode1}
- ${response2} RemoveOrganizationsAsyncPost ${token} ${organizationCode2}
- #删除组织校验
- ${flag4} Result Analysis ${response1} True ${EMPTY} ${EMPTY}
- Should Be True ${flag4}
- ${flag5} Result Analysis ${response2} True ${EMPTY} ${EMPTY}
- Should Be True ${flag5}
- *** Keywords ***
|