You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
252 lines
20 KiB
252 lines
20 KiB
*** Settings ***
|
|
Test Teardown
|
|
Library DatabaseLibrary
|
|
Library RequestsLibrary
|
|
Library Collections
|
|
Library urllib3
|
|
|
|
*** Variables ***
|
|
&{cloudfactory_supplierfocus_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier_focus}
|
|
&{operation_backend_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847952999 Authorization=${gettoken_operate}
|
|
${uecclient} https://api-client-uec-test.qniao.cn
|
|
${yytclient} https://api-client-yyt-test.qniao.cn
|
|
${uecops} https://api-ops-uec-test.qniao.cn
|
|
${yytops} https://api-ops-yyt-test.qniao.cn
|
|
|
|
*** Test Cases ***
|
|
operate_save_virtual_supplier
|
|
Disable Warnings
|
|
Create Session yytops ${yytops} headers=${operation_backend_header}
|
|
${virtual_supplier_name} Set Variable autotest_supplier_paper_name
|
|
${virtual_supplier_details} Set Variable autotest_supplier_paper_details
|
|
${virtual_supplier_contactname} Set Variable autotest_supplier_paper_contactname
|
|
${virtual_supplier_contactmoblie} Set Variable 13800138000
|
|
${virtual_supplier_provinceid} Set Variable 440000
|
|
${virtual_supplier_cityid} Set Variable 440100
|
|
${virtual_supplier_districtid} Set Variable 440106
|
|
${virtual_supplier_streetid} Set Variable 440106003
|
|
${virtual_supplier_provincename} Set Variable 广东省
|
|
${virtual_supplier_cityname} Set Variable 广州市
|
|
${virtual_supplier_districtname} Set Variable 天河区
|
|
${virtual_supplier_streetname} Set Variable 车陂街道
|
|
${body} Set Variable {"name":"${virtual_supplier_name}","details":"${virtual_supplier_details}","contactName":"${virtual_supplier_contactname}","contactMoblie":"${virtual_supplier_contactmoblie}","provinceName":"${virtual_supplier_provincename}","cityName":"${virtual_supplier_cityname}","districtName":"${virtual_supplier_districtname}","streetName":"${virtual_supplier_streetname}","provinceId":${virtual_supplier_provinceid},"cityId":${virtual_supplier_cityid},"districtId":${virtual_supplier_districtid},"streetId":${virtual_supplier_streetid}}
|
|
Set Suite Variable ${virtual_supplier_name}
|
|
${response} POST On Session yytops /cloud-print-user-center/admin/supplier/directsalestore/virtual-supplier/save ${body.encode("utf8")}
|
|
Log ${response.status_code}
|
|
log ${response.json()}
|
|
Should Be Equal As Numbers 200 ${response.status_code}
|
|
Should Be Equal As Strings successful ${response.json()["message"]}
|
|
Should Be Equal As Strings ${virtual_supplier_name} ${response.json()["data"]["name"]}
|
|
sleep 1
|
|
|
|
operate_get_virtual_supplier_list
|
|
Create Session yytops ${yytops} headers=${operation_backend_header}
|
|
${response} Get On Session yytops /trading-center/admin/supplier/directsalestore/virtual-supplier/page
|
|
Log ${response.status_code}
|
|
log ${response.json()}
|
|
Should Be Equal As Numbers 200 ${response.status_code}
|
|
Should Be Equal As Strings successful ${response.json()["message"]}
|
|
${supplier_paper_id} Get From Dictionary ${response.json()["data"]["records"][0]} id
|
|
Set Global Variable ${supplier_paper_id}
|
|
|
|
operate_update_virtual_supplier_status
|
|
Create Session yytops ${yytops} headers=${operation_backend_header}
|
|
${body} Set Variable {"id":"${supplier_paper_id}","status":1} #虚拟供应商状态 0禁用 1启用
|
|
${response} POST On Session yytops /cloud-print-user-center/admin/supplier/directsalestore/virtual-supplier/updatestatus ${body.encode("utf8")}
|
|
Log ${response.status_code}
|
|
log ${response.json()}
|
|
Should Be Equal As Numbers 200 ${response.status_code}
|
|
Should Be Equal As Strings successful ${response.json()["message"]}
|
|
|
|
operate_create_enterprise_with_supplier_paper
|
|
Create Session yytops ${yytops} headers=${operation_backend_header}
|
|
${supplier_paper_name} Set Variable autotest_supplier_paper_name
|
|
${supplier_paper_type} Set Variable 2 #企业类型 1云印客户 2印刷包装厂 3造纸厂 4打包厂 5原纸供应商 6设备供应商 7其他
|
|
${supplier_paper_uniformSocialCreditCode} Set Variable autotest91440101MA59F2J10M
|
|
${supplier_paper_legalPersonName} Set Variable autotest_legalperson
|
|
${supplier_paper_legalPersonIdCardNo} Set Variable autotest_legalpersonidcardno
|
|
${supplier_paper_paperSettlementIntervalTypeId} Set Variable 1 #结算周期 1现结 2月结20天 3月结45天 4月结60天 5月结75天 6月结90天
|
|
${supplier_paper_locProvinceId} Set Variable 440000
|
|
${supplier_paper_locCityId} Set Variable 440100
|
|
${supplier_paper_locDistrictId} Set Variable 440106
|
|
${supplier_paper_locStreetId} Set Variable 440106003
|
|
${supplier_paper_locDetail} Set Variable autotest_supplier_paper_details
|
|
${supplier_paper_legalPersonIdCardFrontImg} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg
|
|
${supplier_paper_legalPersonIdCardBackImg} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg
|
|
${supplier_paper_businessLicenseImg} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg
|
|
${supplier_paper_contactsname} Set Variable autotest_contactsname
|
|
${supplier_paper_mobilePhone} Set Variable autotest_mobilePhone
|
|
${supplier_paper_telephone} Set Variable autotest_telephone
|
|
${supplier_paper_email} Set Variable autotest_email
|
|
${supplier_paper_wechatAccount} Set Variable autotest_wechatAccount
|
|
${supplier_paper_remark} Set Variable autotest_remark
|
|
${supplier_paper_bankAccountName} Set Variable autotest_bankAccountName
|
|
${supplier_paper_bankAccount} Set Variable autotest_bankAccount
|
|
${supplier_paper_bankName} Set Variable autotest_bankName
|
|
${supplier_paper_accountOpeningBranch} Set Variable autotest_accountOpeningBranch
|
|
${supplier_paper_locationBank} Set Variable autotest_locationBank
|
|
${body} Set Variable {"supplierId":"${supplier_paper_id}","enterprise":{"name":"${supplier_paper_name}","locDetail":"${supplier_paper_locDetail}","type":${supplier_paper_type},"uniformSocialCreditCode":"${supplier_paper_uniformSocialCreditCode}","legalPersonIdCardNo":"${supplier_paper_legalPersonIdCardNo}","legalPersonName":"${supplier_paper_legalPersonName}","paperSettlementIntervalTypeId":"${supplier_paper_paperSettlementIntervalTypeId}","locProvinceId":${supplier_paper_locProvinceId},"locCityId":${supplier_paper_locCityId},"locDistrictId":${supplier_paper_locDistrictId},"locStreetId":${supplier_paper_locStreetId},"legalPersonIdCardFrontImg":"${supplier_paper_legalPersonIdCardFrontImg}","legalPersonIdCardBackImg":"${supplier_paper_legalPersonIdCardBackImg}","businessLicenseImg":"${supplier_paper_businessLicenseImg}"},"enterpriseContacts":{"name":"${supplier_paper_contactsname}","mobilePhone":"${supplier_paper_mobilePhone}","telephone":"${supplier_paper_telephone}","email":"${supplier_paper_email}","wechatAccount":"${supplier_paper_wechatAccount}","remark":"${supplier_paper_remark}"},"enterpriseCorporateAccount":{"bankAccountName":"${supplier_paper_bankAccountName}","bankAccount":"${supplier_paper_bankAccount}","bankName":"${supplier_paper_bankName}","accountOpeningBranch":"${supplier_paper_accountOpeningBranch}","locationBank":"${supplier_paper_locationBank}"}}
|
|
${response} POST On Session yytops /cloud-print-user-center/admin/create/enterprise/with/supplier ${body.encode("utf8")}
|
|
Set Global Variable ${supplier_paper_name}
|
|
Log ${response.status_code}
|
|
log ${response.json()}
|
|
Should Be Equal As Numbers 200 ${response.status_code}
|
|
Should Be Equal As Strings successful ${response.json()["message"]}
|
|
sleep 1
|
|
|
|
operate_get_virtual_supplier_search
|
|
Create Session yytops ${yytops} headers=${operation_backend_header}
|
|
${param} Set Variable name=${virtual_supplier_name}
|
|
${response} Get On Session yytops /trading-center/admin/supplier/directsalestore/virtual-supplier/page params=${param}
|
|
Log ${response.status_code}
|
|
log ${response.json()}
|
|
Should Be Equal As Numbers 200 ${response.status_code}
|
|
Should Be Equal As Strings successful ${response.json()["message"]}
|
|
${supplier_enterprise_id} Get From Dictionary ${response.json()["data"]["records"][0]} enterpriseId
|
|
Set Global Variable ${supplier_enterprise_id}
|
|
|
|
operate_supplier_paper_save_base_info
|
|
Create Session yytops ${yytops} headers=${operation_backend_header}
|
|
${supplier_paper_name} Set Variable autotest_supplier_paper_name
|
|
${supplier_paper_shortName} Set Variable autotest_shortName
|
|
${supplier_paper_type} Set Variable 5 #企业类型 1云印客户 2印刷包装厂 3造纸厂 4打包厂 5原纸供应商 6设备供应商 7其他
|
|
${supplier_paper_uniformSocialCreditCode} Set Variable autotest91440101MA59F2J10M
|
|
${supplier_paper_legalPersonName} Set Variable autotest_legalperson
|
|
${supplier_paper_legalPersonIdCardNo} Set Variable autotest_legalpersonidcardno
|
|
${supplier_paper_legalPersonMobile} Set Variable 13800138000
|
|
${supplier_paper_paperSettlementIntervalTypeId} Set Variable 1 #结算周期 1现结 2月结20天 3月结45天 4月结60天 5月结75天 6月结90天
|
|
${supplier_paper_locProvinceId} Set Variable 440000
|
|
${supplier_paper_locCityId} Set Variable 440100
|
|
${supplier_paper_locDistrictId} Set Variable 440106
|
|
${supplier_paper_locStreetId} Set Variable 440106003
|
|
${supplier_paper_locprovincename} Set Variable 广东省
|
|
${supplier_paper_loccityname} Set Variable 广州市
|
|
${supplier_paper_locdistrictname} Set Variable 天河区
|
|
${supplier_paper_locstreetname} Set Variable 车陂街道
|
|
${supplier_paper_locDetail} Set Variable autotest_supplier_paper_details
|
|
${supplier_paper_legalPersonIdCardFrontImg} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg
|
|
${supplier_paper_legalPersonIdCardBackImg} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg
|
|
${supplier_paper_businessLicenseImg} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg
|
|
${body} Set Variable {"id":"${supplier_enterprise_id}","createTime":null,"updateTime":"${current_date_second}","name":"${supplier_paper_name}","shortName":"${supplier_paper_shortName}","receiptRequirement":null,"legalPersonName":"${supplier_paper_legalPersonName}","legalPersonIdCardNo":"${supplier_paper_legalPersonIdCardNo}","legalPersonMobile":"${supplier_paper_legalPersonMobile}","type":${supplier_paper_type},"registeredCapital":999,"regAddrLongitude":null,"regAddrLatitude":null,"supplierId":null,"annualTurnover":100,"uniformSocialCreditCode":"${supplier_paper_uniformSocialCreditCode}","locProvinceId":${supplier_paper_locProvinceId},"locProvinceName":"${supplier_paper_locprovincename}","locCityId":${supplier_paper_locCityId},"locCityName":"${supplier_paper_loccityname}","locDistrictId":${supplier_paper_locDistrictId},"locDistrictName":"${supplier_paper_locdistrictname}","locStreetId":${supplier_paper_locStreetId},"locStreetName":"${supplier_paper_locstreetname}","locDetail":"${supplier_paper_locDetail}","businessLicenseImg":"${supplier_paper_businessLicenseImg}","legalPersonIdCardFrontImg":"${supplier_paper_legalPersonIdCardFrontImg}","legalPersonIdCardBackImg":"${supplier_paper_legalPersonIdCardBackImg}"}
|
|
${response} POST On Session yytops /cloud-print-user-center/admin/save/supplier/base-info ${body.encode("utf8")}
|
|
log ${response.json()}
|
|
Should Be Equal As Numbers 200 ${response.status_code}
|
|
Should Be Equal As Strings successful ${response.json()["message"]}
|
|
sleep 1
|
|
|
|
operate_supplier_paper_save_main_products
|
|
Disable Warnings
|
|
Create Session yytops ${yytops} headers=${operation_backend_header}
|
|
${body} Set Variable {"enterpriseId":"${supplier_enterprise_id}","mainCategoryBrandId":"599233095564136448","mainCategoryId":"638458876659896320","mainProducts":"638458876659896320"}
|
|
${response} POST On Session yytops /cloud-print-user-center/admin/save/supplier/main-products ${body.encode("utf8")}
|
|
log ${response.json()}
|
|
Should Be Equal As Numbers 200 ${response.status_code}
|
|
Should Be Equal As Strings successful ${response.json()["message"]}
|
|
sleep 1
|
|
|
|
operate_supplier_paper_save_factory_list
|
|
Disable Warnings
|
|
Create Session yytops ${yytops} headers=${operation_backend_header}
|
|
${supplier_factory_locProvinceId} Set Variable 440000
|
|
${supplier_factory_locCityId} Set Variable 440100
|
|
${supplier_factory_locDistrictId} Set Variable 440106
|
|
${supplier_factory_locStreetId} Set Variable 440106003
|
|
${supplier_factory_locprovincename} Set Variable 广东省
|
|
${supplier_factory_loccityname} Set Variable 广州市
|
|
${supplier_factory_locdistrictname} Set Variable 天河区
|
|
${supplier_factory_locstreetname} Set Variable 车陂街道
|
|
${supplier_factory_locDetail} Set Variable autotest_supplier_factory_details
|
|
${supplier_factory_leaseContractImg} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg
|
|
${supplier_factory_factoryPhotos} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg
|
|
${body} Set Variable {"enterpriseId":"${supplier_enterprise_id}","factoryList":[{"locProvinceName":"${supplier_factory_locprovincename}","locCityName":"${supplier_factory_loccityname}","locDistrictName":"${supplier_factory_locdistrictname}","locStreetName":"${supplier_factory_locstreetname}","locDetail":"${supplier_factory_locDetail}","locProvinceId":${supplier_factory_locProvinceId},"locCityId":${supplier_factory_locCityId},"locDistrictId":${supplier_factory_locDistrictId},"locStreetId":${supplier_factory_locStreetId},"leaseContractImg":"${supplier_factory_leaseContractImg}","factoryPhotos":"${supplier_factory_factoryPhotos}"}]}
|
|
${response} POST On Session yytops /cloud-print-user-center/admin/save/factory-list ${body.encode("utf8")}
|
|
log ${response.json()}
|
|
Should Be Equal As Numbers 200 ${response.status_code}
|
|
Should Be Equal As Strings successful ${response.json()["message"]}
|
|
sleep 1
|
|
|
|
operate_supplier_paper_save_private_account
|
|
Disable Warnings
|
|
Create Session uecops ${uecops} headers=${operation_backend_header}
|
|
${supplier_private_account_cardholderName} Set Variable autotest_cardholder
|
|
${supplier_private_account_bankCardNumber} Set Variable autotest_bankCardNumber
|
|
${supplier_private_account_openingBank} Set Variable autotest_openingBank
|
|
${body} Set Variable {"enterpriseId":"${supplier_enterprise_id}","list":[{"cardholderName":"${supplier_private_account_cardholderName} ","bankCardNumber":"${supplier_private_account_bankCardNumber}","openingBank":"${supplier_private_account_openingBank} "}]}
|
|
${response} POST On Session uecops /uec/admin/save/enterprise/private-account ${body.encode("utf8")}
|
|
log ${response.json()}
|
|
Should Be Equal As Numbers 200 ${response.status_code}
|
|
Should Be Equal As Strings successful ${response.json()["message"]}
|
|
sleep 1
|
|
|
|
operate_supplier_paper_add_pc_machine
|
|
Disable Warnings
|
|
Create Session yytops ${yytops} headers=${operation_backend_header}
|
|
${supplier_machine_name} Set Variable autotest_supplier_machine_name
|
|
${supplier_machineType} Set Variable 10
|
|
${body} Set Variable {"enterpriseId":"${supplier_enterprise_id}","id":null,"name":"${supplier_machine_name}","machineType":"${supplier_machineType}"}
|
|
${response} POST On Session yytops /capacity-market/add/pc-machine ${body.encode("utf8")}
|
|
log ${response.json()}
|
|
Should Be Equal As Numbers 200 ${response.status_code}
|
|
Should Be Equal As Strings successful ${response.json()["message"]}
|
|
sleep 1
|
|
|
|
operate_supplier_paper_add_enterprise_administrator
|
|
Disable Warnings
|
|
Create Session yytops ${yytops} headers=${operation_backend_header}
|
|
${supplier_enterprise_administrator_realname} Set Variable autotest_name_supplier
|
|
${supplier_enterprise_administrator_mobile} Set Variable 13123456789
|
|
${supplier_enterprise_administrator_position} Set Variable ADMINISTRATOR #角色 ADMINISTRATOR管理员 ORDINARY普通员工
|
|
${body} Set Variable {"enterpriseId":"${supplier_enterprise_id}","realName":"${supplier_enterprise_administrator_realname}","mobile":${supplier_enterprise_administrator_mobile},"position":"${supplier_enterprise_administrator_position}"}
|
|
${response} POST On Session yytops /cloud-print-user-center/admin/save/user/to/enterprise ${body.encode("utf8")}
|
|
Set Suite Variable ${supplier_enterprise_administrator_mobile}
|
|
Set Suite Variable ${supplier_enterprise_administrator_realname}
|
|
Log ${response.status_code}
|
|
log ${response.json()}
|
|
Should Be Equal As Numbers 200 ${response.status_code}
|
|
Should Be Equal As Strings successful ${response.json()["message"]}
|
|
sleep 1
|
|
|
|
operate_get_supplier_paper_base_info
|
|
Create Session yytops ${yytops} headers=${operation_backend_header}
|
|
${response} Get On Session yytops /cloud-print-user-center/admin/get/supplier/base-info/${supplier_enterprise_id}
|
|
Log ${response.status_code}
|
|
log ${response.json()}
|
|
Should Be Equal As Numbers 200 ${response.status_code}
|
|
Should Be Equal As Strings successful ${response.json()["message"]}
|
|
|
|
operate_get_supplier_paper_settlement_account_info
|
|
Create Session yytops ${yytops} headers=${operation_backend_header}
|
|
${response} Get On Session yytops /cloud-print-user-center/admin/get/supplier/settlement-account-info/${supplier_enterprise_id}
|
|
Log ${response.status_code}
|
|
log ${response.json()}
|
|
Should Be Equal As Numbers 200 ${response.status_code}
|
|
Should Be Equal As Strings successful ${response.json()["message"]}
|
|
|
|
operate_get_supplier_paper_employee_list
|
|
Create Session yytops ${yytops} headers=${operation_backend_header}
|
|
${param} Set Variable supplierEnterpriseId=${supplier_enterprise_id}
|
|
${response} Get On Session yytops /cloud-print-user-center/get/employee-list params=${param}
|
|
Log ${response.status_code}
|
|
log ${response.json()}
|
|
Should Be Equal As Numbers 200 ${response.status_code}
|
|
Should Be Equal As Strings successful ${response.json()["message"]}
|
|
Should Be Equal As Strings ${supplier_enterprise_administrator_mobile} ${response.json()["data"]["records"][0]["mobile"]}
|
|
Should Be Equal As Strings ${supplier_enterprise_administrator_realname} ${response.json()["data"]["records"][0]["realName"]}
|
|
|
|
operate_get_supplier_paper_machine_list
|
|
Create Session yytops ${yytops} headers=${operation_backend_header}
|
|
${param} Set Variable enterpriseId=${supplier_enterprise_id}
|
|
${response} Get On Session yytops /cloud-print-user-center/get/supplier/machine/page params=${param}
|
|
Log ${response.status_code}
|
|
log ${response.json()}
|
|
Should Be Equal As Numbers 200 ${response.status_code}
|
|
Should Be Equal As Strings successful ${response.json()["message"]}
|
|
|
|
operate_get_supplier_paper_purchase_order_list
|
|
Create Session yytops ${yytops} headers=${operation_backend_header}
|
|
${param} Set Variable enterpriseId=${supplier_enterprise_id}
|
|
${response} Get On Session yytops /trading-center/admin/get/purchase-order-list/in/supplier-detail params=${param}
|
|
Log ${response.status_code}
|
|
log ${response.json()}
|
|
Should Be Equal As Numbers 200 ${response.status_code}
|
|
Should Be Equal As Strings successful ${response.json()["message"]}
|