From 0108087bfdc8085a39db0202b39cd92ab90294a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E9=87=91=E6=BB=A1?= Date: Fri, 22 Oct 2021 16:17:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AE=A2=E6=88=B7=E6=94=B6?= =?UTF-8?q?=E8=B4=A7=E5=9C=B0=E5=9D=80=E7=AE=A1=E7=90=86=E3=80=81=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E9=80=89=E6=8B=A9=E5=95=86=E5=93=81=E4=B8=8B=E5=8D=95?= =?UTF-8?q?=EF=BC=88=E6=AD=A3=E5=B8=B8=E4=BD=BF=E7=94=A8=E5=8D=83=E9=B8=9F?= =?UTF-8?q?=E6=8E=88=E4=BF=A1=E4=B8=8B=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 006_get_credit/customer_credit_password.robot | 1 + ...oduct_price_config_qniao_and_feisuan.robot | 0 ...uct_price_batch_update_purchaseprice.robot | 5 ++- .../customer_get_paper_list_and_detail.robot | 0 ...customer_enterprise_shipping_address.robot | 38 +++++++++++++++++++ ...customer_create_order_credit_payment.robot | 34 +++++++++++++++++ test_data_clear.robot | 8 ++++ 7 files changed, 85 insertions(+), 1 deletion(-) rename {013_product_price_config => 011_product_price_config}/product_price_config_qniao_and_feisuan.robot (100%) rename {011_paper_list_and_details => 013_paper_list_and_details}/customer_get_paper_list_and_detail.robot (100%) create mode 100644 014_shinpping_address/customer_enterprise_shipping_address.robot create mode 100644 015_customer_create_order/customer_create_order_credit_payment.robot diff --git a/006_get_credit/customer_credit_password.robot b/006_get_credit/customer_credit_password.robot index b8a0cc1..0efd9f8 100644 --- a/006_get_credit/customer_credit_password.robot +++ b/006_get_credit/customer_credit_password.robot @@ -36,3 +36,4 @@ customer_update_credit_password log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} + Set Global Variable ${customer_credit_password_new} diff --git a/013_product_price_config/product_price_config_qniao_and_feisuan.robot b/011_product_price_config/product_price_config_qniao_and_feisuan.robot similarity index 100% rename from 013_product_price_config/product_price_config_qniao_and_feisuan.robot rename to 011_product_price_config/product_price_config_qniao_and_feisuan.robot diff --git a/012_product_price_update/product_price_batch_update_purchaseprice.robot b/012_product_price_update/product_price_batch_update_purchaseprice.robot index 7b152a8..2214422 100644 --- a/012_product_price_update/product_price_batch_update_purchaseprice.robot +++ b/012_product_price_update/product_price_batch_update_purchaseprice.robot @@ -30,10 +30,13 @@ product_price_sku_list_search product_price_sku_batch_update_purchaseprice Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} ${product_price_sku_alterType} Set Variable 1 #变更类型 1统一修改 2增加价格 3减少价格 - ${product_status} Set Variable {"skuids":["${product_price_sku_id}"],"alterType":${product_price_sku_alterType},"price":6789} + ${product_price_sku_new} Set Variable 6789 + ${product_status} Set Variable {"skuids":["${product_price_sku_id}"],"alterType":${product_price_sku_alterType},"price":${product_price_sku_new}} ${body} Set Variable {"status":${product_status},"id":"${product_id}"} ${response} POST On Session yytclient /trading-center/product/unify/alter/purchasing-cost ${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"]} + ${product_price_sku_new} Get From Dictionary ${response.json()["data"]["records"][0]} skuId + Set Global Variable ${product_price_sku_new} diff --git a/011_paper_list_and_details/customer_get_paper_list_and_detail.robot b/013_paper_list_and_details/customer_get_paper_list_and_detail.robot similarity index 100% rename from 011_paper_list_and_details/customer_get_paper_list_and_detail.robot rename to 013_paper_list_and_details/customer_get_paper_list_and_detail.robot diff --git a/014_shinpping_address/customer_enterprise_shipping_address.robot b/014_shinpping_address/customer_enterprise_shipping_address.robot new file mode 100644 index 0000000..0b3bd92 --- /dev/null +++ b/014_shinpping_address/customer_enterprise_shipping_address.robot @@ -0,0 +1,38 @@ +*** Settings *** +Library RequestsLibrary +Library Collections +Library urllib3 + +*** Variables *** +&{cloudfactory_customer_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965388 Authorization=${getlogintoken_customer} +${uecclient} https://api-client-uec-test.qniao.cn + +*** Test Cases *** +customer_enterprise_shipping_address_list + Create Session uecclient ${uecclient} headers=${cloudfactory_customer_header} + ${response} Get On Session uecclient /uec/get/enterprise-shipping-address-list/by-userId + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code} + Should Be Equal As Strings successful ${response.json()["message"]} + +customer_enterprise_save_shipping_address + Create Session uecclient ${uecclient} headers=${cloudfactory_customer_header} + ${customer_enterprise_shipping_address_isDefault} Set Variable 1 #是否默认地址 0否 1是 + ${customer_enterprise_shipping_address_receiver} Set Variable autotest_receiver + ${customer_enterprise_shipping_address_receiverMobile} Set Variable 13800138000 + ${customer_enterprise_shipping_address_detail} Set Variable autotest_customer_enterprise_shipping_address_detail + ${customer_enterprise_shipping_address_provinceid} Set Variable 440000 + ${customer_enterprise_shipping_address_cityid} Set Variable 440100 + ${customer_enterprise_shipping_address_districtid} Set Variable 440106 + ${customer_enterprise_shipping_address_streetid} Set Variable 440106003 + ${customer_enterprise_shipping_address_provincename} Set Variable 广东省 + ${customer_enterprise_shipping_address_cityname} Set Variable 广州市 + ${customer_enterprise_shipping_address_districtname} Set Variable 天河区 + ${customer_enterprise_shipping_address_streetname} Set Variable 车陂街道 + ${body} Set Variable {"isDefault":${customer_enterprise_shipping_address_isDefault},"receiver":"${customer_enterprise_shipping_address_receiver}","receiverMobile":${customer_enterprise_shipping_address_receiverMobile},"detail":"${customer_enterprise_shipping_address_detail}","provinceId":${customer_enterprise_shipping_address_provinceid},"cityId":${customer_enterprise_shipping_address_cityid},"districtId":${customer_enterprise_shipping_address_districtid},"streetId":${customer_enterprise_shipping_address_streetid},"provinceName":"${customer_enterprise_shipping_address_provincename}","cityName":"${customer_enterprise_shipping_address_cityname}","districtName":"${customer_enterprise_shipping_address_districtname}","streetName":"${customer_enterprise_shipping_address_streetname}"} + ${response} POST On Session uecclient /uec/save/enterprise-shipping-address ${body.encode("utf-8")} + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code} + Should Be Equal As Strings successful ${response.json()["message"]} + ${customer_enterprise_shipping_address_id} Get From Dictionary ${response.json()} data + Set Global Variable ${customer_enterprise_shipping_address_id} diff --git a/015_customer_create_order/customer_create_order_credit_payment.robot b/015_customer_create_order/customer_create_order_credit_payment.robot new file mode 100644 index 0000000..91c90ee --- /dev/null +++ b/015_customer_create_order/customer_create_order_credit_payment.robot @@ -0,0 +1,34 @@ +*** Settings *** +Library RequestsLibrary +Library Collections +Library urllib3 + +*** Variables *** +&{cloudfactory_customer_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965388 Authorization=${getlogintoken_customer} +${yytclient} https://api-client-yyt-test.qniao.cn + +*** Test Cases *** +customer_create_order_credit_payment + Create Session uecclient ${uecclient} headers=${cloudfactory_customer_header} + ${customer_enterprise_shipping_address_receiver} Set Variable autotest_receiver + ${customer_enterprise_shipping_address_receiverMobile} Set Variable 13800138000 + ${customer_enterprise_shipping_address_detail} Set Variable autotest_customer_enterprise_shipping_address_detail + ${customer_enterprise_shipping_address_provinceid} Set Variable 440000 + ${customer_enterprise_shipping_address_cityid} Set Variable 440100 + ${customer_enterprise_shipping_address_districtid} Set Variable 440106 + ${customer_enterprise_shipping_address_streetid} Set Variable 440106003 + ${customer_enterprise_shipping_address_provincename} Set Variable 广东省 + ${customer_enterprise_shipping_address_cityname} Set Variable 广州市 + ${customer_enterprise_shipping_address_districtname} Set Variable 天河区 + ${customer_enterprise_shipping_address_streetname} Set Variable 车陂街道 + ${customer_create_order_paymentMethod} Set Variable 2 #支付方式 1微信支付 2授信支付 3线下支付 4飞算支付 + ${customer_create_order_realPayPrice} Set Variable + ${customer_create_order_totalOfferPrice} Set Variable + ${customer_create_order_productSkuList} Set Variable [{"gramWeight":"678","width":"787","length":"1092","quantity":5000,"buyTon":2.9134,"productName":"${paper_name}","unitPrice":${product_price_sku_new}*1.03,"bootFee":0,"cuttingFee":0,"freightFee":0,"serviceFee":0,"otherFee":0,"totalOfferPrice":20373.41,"remark":"autotest_customer_create_order_remark","productSkuId":"${product_price_sku_id}"}] + ${body} Set Variable {"receiverMobile":"${customer_enterprise_shipping_address_receiverMobile}","receiver":"${customer_enterprise_shipping_address_receiver}","deliveryProvinceId":${customer_enterprise_shipping_address_provinceid},"deliveryProvinceName":"${customer_enterprise_shipping_address_provincename}","deliveryCityId":${customer_enterprise_shipping_address_cityid},"deliveryCityName":"${customer_enterprise_shipping_address_cityname}","deliveryDistrictId":${customer_enterprise_shipping_address_districtid},"deliveryDistrictName":"${customer_enterprise_shipping_address_districtname}","deliveryStreetId":${customer_enterprise_shipping_address_streetid},"deliveryStreetName":"${customer_enterprise_shipping_address_streetname}","deliveryId":"${customer_enterprise_shipping_address_id}","deliveryDetails":"${customer_enterprise_shipping_address_detail}","paymentMethod":2,"realPayPrice":56.61,"totalOfferPrice":56.61,"password":"${customer_credit_password_new}","productSkuList":${customer_create_order_productSkuList.encode("utf-8")}} + ${response} POST On Session uecclient /trading-center/buyer/create/order ${body.encode("utf-8")} + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code} + Should Be Equal As Strings successful ${response.json()["message"]} + ${customer_create_order_id} Get From Dictionary ${response.json()["data"]} orderId + Set Global Variable ${customer_enterprise_shipping_address_id} diff --git a/test_data_clear.robot b/test_data_clear.robot index d6ebc8c..8d308a9 100644 --- a/test_data_clear.robot +++ b/test_data_clear.robot @@ -13,6 +13,7 @@ ${uecops} https://api-ops-uec-test.qniao.cn ${pscops} https://api-ops-psc-test.qniao.cn ${yytops} https://api-ops-yyt-test.qniao.cn ${yytclient} https://api-client-yyt-test.qniao.cn +${uecclient} https://api-client-uec-test.qniao.cn *** Test Cases *** database_delete_user_customerclue_customer @@ -110,3 +111,10 @@ supplierfocus_delete_paper_brand log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} + +customer_enterprise_delete_shipping_address + Create Session uecclient ${uecclient} headers=${cloudfactory_customer_header} + ${body} Set Variable {"id":"${customer_enterprise_shipping_address_id}"} + ${response} Delete On Session uecclient /uec/delete/enterprise-shipping-address/${customer_enterprise_shipping_address_id} ${body.encode.("utf8")} + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code}