Browse Source

新增客户收货地址管理、客户选择商品下单(正常使用千鸟授信下单

pull/18/head
梁金满 4 years ago
parent
commit
0108087bfd
7 changed files with 85 additions and 1 deletions
  1. 1
      006_get_credit/customer_credit_password.robot
  2. 0
      011_product_price_config/product_price_config_qniao_and_feisuan.robot
  3. 5
      012_product_price_update/product_price_batch_update_purchaseprice.robot
  4. 0
      013_paper_list_and_details/customer_get_paper_list_and_detail.robot
  5. 38
      014_shinpping_address/customer_enterprise_shipping_address.robot
  6. 34
      015_customer_create_order/customer_create_order_credit_payment.robot
  7. 8
      test_data_clear.robot

1
006_get_credit/customer_credit_password.robot

@ -36,3 +36,4 @@ customer_update_credit_password
log ${response.json()} log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]} Should Be Equal As Strings successful ${response.json()["message"]}
Set Global Variable ${customer_credit_password_new}

013_product_price_config/product_price_config_qniao_and_feisuan.robot → 011_product_price_config/product_price_config_qniao_and_feisuan.robot

5
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 product_price_sku_batch_update_purchaseprice
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${product_price_sku_alterType} Set Variable 1 #变更类型 1统一修改 2增加价格 3减少价格 ${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}"} ${body} Set Variable {"status":${product_status},"id":"${product_id}"}
${response} POST On Session yytclient /trading-center/product/unify/alter/purchasing-cost ${body.encode("utf8")} ${response} POST On Session yytclient /trading-center/product/unify/alter/purchasing-cost ${body.encode("utf8")}
Log ${response.status_code} Log ${response.status_code}
log ${response.json()} log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]} 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}

011_paper_list_and_details/customer_get_paper_list_and_detail.robot → 013_paper_list_and_details/customer_get_paper_list_and_detail.robot

38
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}

34
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}

8
test_data_clear.robot

@ -13,6 +13,7 @@ ${uecops} https://api-ops-uec-test.qniao.cn
${pscops} https://api-ops-psc-test.qniao.cn ${pscops} https://api-ops-psc-test.qniao.cn
${yytops} https://api-ops-yyt-test.qniao.cn ${yytops} https://api-ops-yyt-test.qniao.cn
${yytclient} https://api-client-yyt-test.qniao.cn ${yytclient} https://api-client-yyt-test.qniao.cn
${uecclient} https://api-client-uec-test.qniao.cn
*** Test Cases *** *** Test Cases ***
database_delete_user_customerclue_customer database_delete_user_customerclue_customer
@ -110,3 +111,10 @@ supplierfocus_delete_paper_brand
log ${response.json()} log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]} 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}
Loading…
Cancel
Save