123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213 |
- *** Settings ***
- Documentation 保存机构信息
- Resource ../../../CommonConfig/Config.robot
- Resource ../../../AllApi/ClientAPI/PersonalInformationApi/CommonLoginAsync.robot
- Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/AddOrganizationsAsync.robot
- Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/SearchOrganizationsAsync.robot
- Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/RemoveOrganizationsAsync.robot
- Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/SavePersonOrganizationAsync.robot
- Resource ../../../AllApi/ClientAPI/OrganizationInformationApi/GetOrganizationByCodeAsync.robot
- *** Variables ***
- *** Test Cases ***
- Class_001_保存机构信息,修改RegionCode(地区编码)
- [Setup]
- [Template]
- #登录,获取用户Token
- ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
- #修改机构RegionCode
- ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
- Log ${res}
- #校验
- ${flag} Result Analysis ${res} True ${EMPTY} ${EMPTY}
- Should Be True ${flag}
- ${res1} GetOrganizationByCodeAsyncPost ${token} ${organizationInfo_mao}[0]
- ${regionCode1} Get From Dictionary ${res1}[content] RegionCode
- Should Be Equal As Strings ${regionCode1} ${regionCode}[1]
- #修改机构RegionCode
- ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[0] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
- Class_002_保存机构信息,修改ParentCode(上级机构)
- [Setup]
- [Template]
- #登录,获取用户Token
- ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
- #修改机构ParentCode
- ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organzationCode_gary}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
- Log ${res}
- #校验
- ${flag} Result Analysis ${res} True ${EMPTY} ${EMPTY}
- Should Be True ${flag}
- ${res1} GetOrganizationByCodeAsyncPost ${token} ${organizationInfo_mao}[0]
- ${parentCode} Get From Dictionary ${res1}[content] ParentCode
- Should Be Equal As Strings ${parentCode} ${organzationCode_gary}[0]
- #修改机构ParentCode回jo测试医院
- ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
- Class_003_保存机构信息,修改LogoUrl(Logo)
- [Setup]
- [Template]
- #登录,获取用户Token
- ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
- #修改机构LogoUrl
- ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[0] ${organizationInfo_jo}[0] ${image}[0] ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
- Log ${res}
- #校验
- ${flag} Result Analysis ${res} True ${EMPTY} ${EMPTY}
- Should Be True ${flag}
- ${res1} GetOrganizationByCodeAsyncPost ${token} ${organizationInfo_mao}[0]
- ${logoUrl} Get From Dictionary ${res1}[content] LogoUrl
- #校验图片名称
- ${logoUrls} Split String ${logoUrl} /
- Log ${logoUrls}
- ${logoUrlLen} Get Length ${logoUrls}
- ${images} Split String ${image}[0] /
- Log ${images}
- ${imagesLen} Get Length ${images}
- Should Be Equal As Strings ${logoUrls}[${logoUrlLen-1}] ${images}[${imagesLen-1}]
- #修改机构LogoUrl为空
- ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${image}[1] ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
- Class_004_保存机构信息,修改OrganizationName(机构名称)
- [Setup]
- [Template]
- #登录,获取用户Token
- ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
- #修改机构OrganizationName
- ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院修改 ${patientType}[0] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
- Log ${res}
- #校验
- ${flag} Result Analysis ${res} True ${EMPTY} ${EMPTY}
- Should Be True ${flag}
- ${res1} GetOrganizationByCodeAsyncPost ${token} ${organizationInfo_mao}[0]
- ${organizationName1} Get From Dictionary ${res1}[content] OrganizationName
- Should Be Equal As Strings ${organizationName1} jo下级测试医院修改
- #修改机构OrganizationName
- ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
- Class_005_保存机构信息,修改PatientType(服务对象)
- [Setup]
- [Template]
- #登录,获取用户Token
- ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
- #修改机构PatientType
- ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[1] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
- Log ${res}
- #校验
- ${flag} Result Analysis ${res} True ${EMPTY} ${EMPTY}
- Should Be True ${flag}
- ${res1} GetOrganizationByCodeAsyncPost ${token} ${organizationInfo_mao}[0]
- ${patientType1} Get From Dictionary ${res1}[content] PatientType
- Should Be Equal As Strings ${patientType1} ${patientType}[1]
- #修改机构PatientType
- ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
- Exception_001保存机构信息,Token非空校验
- [Setup]
- [Template]
- #修改机构信息,Token传入空值
- ${res} SavePersonOrganizationAsyncPost ${EMPTY} ${regionCode}[0] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 2 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
- Log ${res}
- #返回error信息校验
- ${flag} Result Analysis ${res} false ${1} Permission validation error
- Should Be True ${flag}
- Exception_002_保存机构信息,Token正确性校验
- [Setup]
- [Template]
- #修改机构信息,Token传入错误的值
- ${res} SavePersonOrganizationAsyncPost 11111 ${regionCode}[0] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 2 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
- Log ${res}
- #返回error信息校验
- ${flag} Result Analysis ${res} false ${1} Permission validation error
- Should Be True ${flag}
- Exception_003_保存机构信息,OrganizationCode非空校验
- [Setup]
- [Template]
- #登录,获取用户Token
- ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
- #修改机构RegionCode
- ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[0] ${organizationInfo_jo}[0] ${EMPTY} ${EMPTY} jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 2 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
- Log ${res}
- #返回error信息校验
- ${flag} Result Analysis ${res} false ${6018} OrganizationCode Empty Error
- Should Be True ${flag}
- Exception_004_保存机构信息,OrganizationCode正确性校验
- [Setup]
- [Template]
- #登录,获取用户Token
- ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
- #修改机构RegionCode
- ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[0] ${organizationInfo_jo}[0] ${EMPTY} 1111 jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 2 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
- Log ${res}
- #返回error信息校验
- ${flag} Result Analysis ${res} false ${6014} Organization Code Empty error
- Should Be True ${flag}
- Exception_005_保存机构信息,OrganizationName非空校验
- [Setup]
- [Template]
- #登录,获取用户Token
- ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
- #修改机构RegionCode
- ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[0] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] ${EMPTY} ${patientType}[0] ${isEncryptedShow}[0] 2 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
- Log ${res}
- #返回error信息校验
- ${flag} Result Analysis ${res} false ${6017} OrganizationName Empty Error
- Should Be True ${flag}
- Class_006_保存机构信息,修改IsEncryptedShow
- [Setup]
- [Template]
- #登录,获取用户Token
- ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
- #修改机构IsEncryptedShow
- ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[1] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
- Log ${res}
- #校验
- ${flag} Result Analysis ${res} True ${EMPTY} ${EMPTY}
- Should Be True ${flag}
- ${res1} GetOrganizationByCodeAsyncPost ${token} ${organizationInfo_mao}[0]
- ${IsEncryptedShow1} Get From Dictionary ${res1}[content] IsEncryptedShow
- Should Be True ${IsEncryptedShow1}
- #修改机构IsEncryptedShow
- ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
- Class_007_保存机构信息,修改ReferralLimitHours
- [Setup]
- [Template]
- #登录,获取用户Token
- ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
- #修改机构ReferralLimitHours
- ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 2 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
- Log ${res}
- #校验
- ${flag} Result Analysis ${res} True ${EMPTY} ${EMPTY}
- Should Be True ${flag}
- ${res1} GetOrganizationByCodeAsyncPost ${token} ${organizationInfo_mao}[0]
- ${ReferralLimitHours1} Get From Dictionary ${res1}[content] ReferralLimitHours
- Should Be Equal As Integers ${ReferralLimitHours1} 2
- #修改机构ReferralLimitHours
- ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
- Class_008_保存机构信息,修改ReferralOrganizationCodes
- [Setup]
- [Template]
- #登录,获取用户Token
- ${token} GetCommonLoginAsyncToken ${user_mao}[0] ${EMPTY} ${user_mao}[1] ${3} ${0}
- #修改机构ReferralLimitHours
- ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 2 ${organizationInfo_jo}[0]
- Log ${res}
- #校验
- ${flag} Result Analysis ${res} True ${EMPTY} ${EMPTY}
- Should Be True ${flag}
- ${res1} GetOrganizationByCodeAsyncPost ${token} ${organizationInfo_mao}[0]
- @{ReferralOrganizationCodes} Get From Dictionary ${res1}[content] ReferralOrganizationCodes
- Should Contain @{ReferralOrganizationCodes} ${organizationInfo_jo}[0]
- #修改机构ReferralLimitHours
- ${res} SavePersonOrganizationAsyncPost ${token} ${regionCode}[1] ${organizationInfo_jo}[0] ${EMPTY} ${organizationInfo_mao}[0] jo下级测试医院 ${patientType}[0] ${isEncryptedShow}[0] 1 ${organizationInfo_jo}[0],${organzationCode_gary}[0]
- *** Keywords ***
|