diff --git a/001_login_get_info/login_customer.robot b/001_login_get_info/login_customer.robot index a2a9aba..6a91822 100644 --- a/001_login_get_info/login_customer.robot +++ b/001_login_get_info/login_customer.robot @@ -36,7 +36,7 @@ customer_phone log ${gettoken_customer} #设置token变量 未转业务线 Set Suite Variable ${gettoken_customer} - #变量接收客户userid 获取字典内容 响应结果 serid-key + #变量接收客户userid 获取字典内容 响应结果 userid-key ${userid_customer} Get From Dictionary ${response.json()["data"]} userId #日志 log ${userid_customer} diff --git a/001_login_get_info/login_supplier.robot b/001_login_get_info/login_supplier.robot index 83cba7a..cfea066 100644 --- a/001_login_get_info/login_supplier.robot +++ b/001_login_get_info/login_supplier.robot @@ -36,7 +36,7 @@ supplier_phone log ${gettoken_supplier} #设置token变量 未转业务线 Set Suite Variable ${gettoken_supplier} - #变量接收供应商userid 获取字典内容 响应结果 serid-key + #变量接收供应商userid 获取字典内容 响应结果 userid-key ${userid_supplier} Get From Dictionary ${response.json()["data"]} userId #日志 log ${userid_supplier} diff --git a/001_login_get_info/login_supplier_focus.robot b/001_login_get_info/login_supplier_focus.robot index e2adcea..52bfdcb 100644 --- a/001_login_get_info/login_supplier_focus.robot +++ b/001_login_get_info/login_supplier_focus.robot @@ -4,7 +4,7 @@ Library Collections Library urllib3 *** Variables *** -&{cloud_factory_supplier_focus_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 +&{cloud_factory_supplier_focus_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847953922 ${uecclient} https://api-client-uec-test.qniao.cn ${yytclient} https://api-client-yyt-test.qniao.cn @@ -36,14 +36,14 @@ supplier_focus_phone log ${gettoken_supplier_focus} #设置token变量 未转业务线 Set Suite Variable ${gettoken_supplier_focus} - #变量接收集采商userid 获取字典内容 响应结果 serid-key + #变量接收集采商userid 获取字典内容 响应结果 userid-key ${userid_supplier_focus} Get From Dictionary ${response.json()["data"]} userId #日志 log ${userid_supplier_focus} #设置token变量 Set Suite Variable ${userid_supplier_focus} #设置带token的请求头 - &{cloudfactorysupplierfocusheader} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${gettoken_supplier_focus} + &{cloudfactorysupplierfocusheader} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847953922 Authorization=${gettoken_supplier_focus} #设置token变量 Set Suite Variable ${cloudfactorysupplierfocusheader} diff --git a/014_shinpping_address/customer_enterprise_shipping_address.robot b/014_shinpping_address/customer_enterprise_shipping_address.robot index 0b3bd92..82fb45a 100644 --- a/014_shinpping_address/customer_enterprise_shipping_address.robot +++ b/014_shinpping_address/customer_enterprise_shipping_address.robot @@ -31,6 +31,17 @@ customer_enterprise_save_shipping_address ${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")} + Set Global Variable ${customer_enterprise_shipping_address_receiver} + Set Global Variable ${customer_enterprise_shipping_address_receiverMobile} + Set Global Variable ${customer_enterprise_shipping_address_detail} + Set Global Variable ${customer_enterprise_shipping_address_provinceid} + Set Global Variable ${customer_enterprise_shipping_address_cityid} + Set Global Variable ${customer_enterprise_shipping_address_streetid} + Set Global Variable ${customer_enterprise_shipping_address_districtid} + Set Global Variable ${customer_enterprise_shipping_address_provincename} + Set Global Variable ${customer_enterprise_shipping_address_cityname} + Set Global Variable ${customer_enterprise_shipping_address_districtname} + Set Global Variable ${customer_enterprise_shipping_address_streetname} log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} diff --git a/015_customer_create_order/customer_create_order_credit_payment.robot b/015_customer_create_order/customer_create_order_credit_payment.robot index 91c90ee..238d392 100644 --- a/015_customer_create_order/customer_create_order_credit_payment.robot +++ b/015_customer_create_order/customer_create_order_credit_payment.robot @@ -9,7 +9,7 @@ ${yytclient} https://api-client-yyt-test.qniao.cn *** Test Cases *** customer_create_order_credit_payment - Create Session uecclient ${uecclient} headers=${cloudfactory_customer_header} + Create Session yytclient ${yytclient} 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 @@ -22,13 +22,11 @@ customer_create_order_credit_payment ${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")} + ${response} POST On Session yytclient /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} + Set Global Variable ${customer_create_order_id} diff --git a/016_enquiry_create_order/customer_enquiry_operate_and_supplier_quoted_price_create_order.robot b/016_enquiry_create_order/customer_enquiry_operate_and_supplier_quoted_price_create_order.robot new file mode 100644 index 0000000..1fb4184 --- /dev/null +++ b/016_enquiry_create_order/customer_enquiry_operate_and_supplier_quoted_price_create_order.robot @@ -0,0 +1,147 @@ +*** 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} +&{cloudfactory_supplierfocus_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier_focus} +&{cloud_factory_supplier_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier} +${yytclient} https://api-client-yyt-test.qniao.cn + +*** Test Cases *** +customer_add_enquiry + Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} + ${customer_enquiryContent} Set Variable autotest_enquiryContent + ${customer_deliveryDay} Set Variable 48 + ${customer_deliveryArea} Set Variable 广东省 广州市 天河区 + ${body} Set Variable {"enquiryContent":"${customer_enquiryContent}","picUrl":"","deliveryDay":${customer_deliveryDay},"deliveryArea":"${customer_deliveryArea}",} + ${response} POST On Session yytclient /trading-center/add/enquiry-order ${body.encode("utf-8")} + Set Global Variable ${customer_enquiryContent} + Set Suite Variable ${customer_deliveryDay} + Set Suite Variable ${customer_deliveryArea} + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code} + Should Be Equal As Strings successful ${response.json()["message"]} + ${customer_enquiry_id} Get From Dictionary ${response.json()} data + Set Global Variable ${customer_enquiry_id} + sleep 1 + +supplierfocus_get_enquiry_list + Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} + ${response} Get On Session yytclient /trading-center/get/enquiry-order/order-list + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code} + Should Be Equal As Strings successful ${response.json()["message"]} + +supplierfocus_get_enquiry_list_search + Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} + ${enquiry_status} Set Variable 0 #是否报价 0待报价 1已报价 + ${enquiry_valid_status} Set Variable 0 #是否有效 0生效 1失效 + ${param} Set Variable searchValue=${customer_enquiryContent}&status=${enquiry_status}&valid=${enquiry_valid_status} + ${response} Get On Session yytclient /trading-center/get/enquiry-order/order-list params=${param} + 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 ${customer_enquiry_id} ${response.json()["data"]["records"][0]["id"]} + +supplierfocus_edit_enquiry_details + Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} + ${customer_enquiry_remark} Set Variable autotest_remark + ${body} Set Variable {"addList":[{"deliveryId":null,"deliveryProvinceId":null,"deliveryProvinceName":null,"deliveryCityId":null,"deliveryCityName":null,"deliveryDistrictId":null,"deliveryDistrictName":null,"deliveryStreetId":null,"deliveryStreetName":null,"deliveryDetails":null,"deliveryReceiver":null,"deliveryReceiverMobile":null,"brandId":"${paper_name}","gramWeight":678,"width":787,"length":1000,"quantity":5000,"brandName":"${paper_brand_id}","enquiryId":"${customer_enquiry_id}","remark":"${customer_enquiry_remark}"},{"deliveryId":null,"deliveryProvinceId":null,"deliveryProvinceName":null,"deliveryCityId":null,"deliveryCityName":null,"deliveryDistrictId":null,"deliveryDistrictName":null,"deliveryStreetId":null,"deliveryStreetName":null,"deliveryDetails":null,"deliveryReceiver":null,"deliveryReceiverMobile":null,"brandId":"${paper_brand_id}","gramWeight":678,"width":787,"length":1092,"quantity":5000,"brandName":"${paper_name}","enquiryId":"${customer_enquiry_id}","remark":"${customer_enquiry_remark}"}],"delList":[],"updateList":[],"id":"${customer_enquiry_id}","askEnterprise":"${printing_packaging_factory_id}","belongEnterpriseName":"${printing_packaging_factory_name}","deliveryDay":${customer_deliveryDay},"deliveryArea":"${customer_deliveryArea}","enquiryContent":"${customer_enquiryContent}","picUrl":null,"receiver":null,"receiverMobile":null,"deliveryProvinceId":null,"deliveryCityId":null,"deliveryDistrictId":null,"deliveryStreetId":null,"deliveryProvinceName":null,"deliveryCityName":null,"deliveryDistrictName":null,"deliveryStreetName":null,"deliveryDetail":null,"deliveryId":null,"deliveryDetails":null,"deliveryReceiver":null,"deliveryReceiverMobile":null} + ${response} POST On Session yytclient /trading-center/update/enquiry-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"]} + sleep 1 + +supplierfocus_distribute_enquiry_details + Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} + ${body} Set Variable {"id":"${customer_enquiry_id}"} + ${response} POST On Session yytclient /trading-center/distribute/enquiry-reply ${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"]} + sleep 1 + +supplierfocus_get_enquiry_details + Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} + ${response} Get On Session yytclient /trading-center/get/enquiry-order/${customer_enquiry_id} + 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 Numbers 1 ${response.json()["data"]["isDistribute"]} #是否分发 0否 1是 + +supplierfocus_get_obtain_paper_quotes_list + Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} + ${param} Set Variable enquiryId=${customer_enquiry_id} + ${response} Get On Session yytclient /trading-center/get/obtain-paper-quotes/list param=${param} + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code} + Should Be Equal As Strings successful ${response.json()["message"]} + ${paper_quotes_item_id1} Get From Dictionary ${response.json()["data"][0]["replyList"][0]} id + Set Global Variable ${paper_quotes_item_id1} + ${paper_quotes_item_id2} Get From Dictionary ${response.json()["data"][0]["replyList"][1]} id + Set Global Variable ${paper_quotes_item_id2} + ${paperQuotedPriceId} Get From Dictionary ${response.json()["data"][0]["replyList"][0]} paperQuotedPriceId + Set Global Variable ${paperQuotedPriceId} + +supplierfocus_submit_paper_quotation + Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} + ${supplierfocus_paper_quotation_remark} Set Variable autotest_supplierfocus_paper_quotation_remark + ${body} Set Variable {"addList":[],"delList":[],"enquiryId":"${customer_enquiry_id}","updateList":[{"enquiryId":"${customer_enquiry_id}","paperQuotedPriceId":"${paperQuotedPriceId}","id":"${paper_quotes_item_id1}","productSkuId":"$ {product_price_sku_id}","paperId":null,"brandId":"${paper_brand_id}","paperName":null,"brandName":"${paper_name}","productName":null,"gramWeight":678,"quantity":5000,"length":1000,"width":787,"weight":2.6679,"unitFee":5150,"totalPrice":"13739.69","createTime":"${current_date}","updateTime":"${current_date}","effectiveTime":"${current_date}","salesEnterpriseId":"${supplier_paper_id}","remark":"${customer_enquiry_remark}","purchasePrice":5000,"otherFee":0,"repEnterprise":"553652487819759617","repEnterpriseName":"千鸟官方直营","salesEnterpriseName":"${printing_packaging_factory_name}","flyCalcSalesPrice":5100,},{"enquiryId":"${customer_enquiry_id}","paperQuotedPriceId":"${paperQuotedPriceId}","id":"${paper_quotes_item_id2}","productSkuId":"${product_price_sku_id}","paperId":null,"brandId":"${paper_brand_id}","paperName":null,"brandName":"${paper_name}","productName":null,"gramWeight":678,"quantity":5000,"length":1092,"width":787,"weight":2.9134,"unitFee":5150,"totalPrice":"15004.01","createTime ":"${current_date}","updateTime":"${current_date}","effectiveTime":"${current_date}","salesEnterpriseId":"652564100836102144","remark":"${customer_enquiry_remark}","purchasePrice :5000,"otherFee":0,"repEnterprise":"${supplier_paper_id}","repEnterpriseName":"千鸟官方直营","salesEnterpriseName":"${printing_packaging_factory_name}","flyCalcSalesPrice":5100,}],"remark":"${customer_paper_quotation_remark}"} + ${response} POST On Session yytclient /trading-center/submit/paper-quotation ${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"]} + sleep 1 + +supplier_enquiry_reply_batch + Create Session yytclient ${yytclient} headers=${cloud_factory_supplier_header} + ${supplier_paper_quotation_remark} Set Variable autotest_supplier_paper_quotation_remark + ${body} Set Variable {"enquiryId":"${customer_enquiry_id}","replyList":[{"brandName":"${paper_name}","brandId":"${paper_brand_id}","width":787,"length":1000,"gramWeight":678,"quantity":5000,"weight":2.6679,"unitFee":5000,"otherFee":0,"totalPrice":13339.5,"remark":"${customer_enquiry_remark}"},{"brandName":"${paper_name}","brandId":"${paper_brand_id}","width":787,"length":1092,"gramWeight":678,"quantity":5000,"weight":2.9134,"unitFee":5000,"otherFee":0,"totalPrice":14567,"remark":"${customer_enquiry_remark}"}],"remark":"${supplier_paper_quotation_remark}"} + ${response} POST On Session yytclient /trading-center/wechatapplet/add/enquiry-reply-batch ${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"]} + sleep 1 + +supplierfocus_get_supplier_quotation_record_list + Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} + ${param} Set Variable enquiryId=${customer_enquiry_id} + ${response} Get On Session yytclient /trading-center/get/supplier-quotation-record/list param=${param} + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code} + Should Be Equal As Strings successful ${response.json()["message"]} + +customer_get_enquiry_result + Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} + ${response} Get On Session yytclient /trading-center/get/enquiry-result/${customer_enquiry_id} + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code} + Should Be Equal As Strings successful ${response.json()["message"]} + +customer_enquiry_create_order_credit_payment + Create Session yytclient ${yytclient} 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_enquiry_create_order_productSkuList} Set Variable [{"enquiryReplyId":"${paper_quotes_item_id1}","enquiryId":"${customer_enquiry_id}","gramWeight":678,"width":787,"length":1000,"quantity":5000,"buyTon":2.6679,"productName":null,"purchasePrice":5000,"unitPrice":5150,"bootFee":0,"cuttingFee":0,"freightFee":0,"serviceFee":0,"otherFee":0,"totalOfferPrice":13739.69,"remark":"","productSkuId":"$ {product_price_sku_id}"},{"enquiryReplyId":"${paper_quotes_item_id2}","enquiryId":"${customer_enquiry_id}","gramWeight":678,"width":787,"length":1092,"quantity":5000,"buyTon":2.9134,"productName":null,"purchasePrice":5000,"unitPrice":5150,"bootFee":0,"cuttingFee":0,"freightFee":0,"serviceFee":0,"otherFee":0,"totalOfferPrice":15004.01,"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":${customer_create_order_paymentMethod},"realPayPrice":28743.7,"totalOfferPrice":28743.7,"password":"${customer_credit_password_new}","productSkuList":${customer_enquiry_create_order_productSkuList.encode("utf-8")}} + ${response} POST On Session yytclient /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_enquiry_create_order_id} Get From Dictionary ${response.json()["data"]} orderId + Set Global Variable ${customer_enquiry_create_order_id} + ${customer_enquiry_create_order_contractNo} Get From Dictionary ${response.json()["data"]} contractNo + Set Global Variable ${customer_enquiry_create_order_contractNo} diff --git a/017_order_and_receipt_and_delivery/get_oeder_and_receipt_and_delivery.robot b/017_order_and_receipt_and_delivery/get_oeder_and_receipt_and_delivery.robot new file mode 100644 index 0000000..3ac5281 --- /dev/null +++ b/017_order_and_receipt_and_delivery/get_oeder_and_receipt_and_delivery.robot @@ -0,0 +1,58 @@ +*** 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} +&{cloudfactory_supplierfocus_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier_focus} +&{cloud_factory_supplier_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier} +${yytclient} https://api-client-yyt-test.qniao.cn + +*** Test Cases *** +customer_get_order_list + Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} + ${response} Get On Session yytclient /trading-center/buyer/get/self-enterprise-order-page + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code} + Should Be Equal As Strings successful ${response.json()["message"]} + +customer_get_order_list_search + Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} + ${param} Set Variable status=2 #客户获取订单状态 2待发货 3待收货 5已完成 7待评价 + ${response} Get On Session yytclient /trading-center/buyer/get/self-enterprise-order-page params=${param} + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code} + Should Be Equal As Strings successful ${response.json()["message"]}${customer_enquiry_create_order_id} + Should Be Equal As Strings ${customer_enquiry_create_order_id} ${response.json()["data"]["records"][0]["orderId"]} + +customer_get_order_detail2 + Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} + ${response} Get On Session yytclient /trading-center/buyer/get/order-detail/${customer_enquiry_create_order_id} + 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 Numbers 2 ${response.json()["data"]["showStatus"]} + +supplierfocus_get_order_list + Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} + ${response} Get On Session yytclient /trading-center/get/supplier/order-management/page + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code} + Should Be Equal As Strings successful ${response.json()["message"]} + +supplierfocus_get_order_list_search + Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} + ${param} Set Variable clientContractNo=${customer_enquiry_create_order_contractNo} + ${response} Get On Session yytclient /trading-center/get/supplier/order-management/page params=${param} + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code} + Should Be Equal As Strings successful ${response.json()["message"]}${customer_enquiry_create_order_id} + Should Be Equal As Strings ${customer_enquiry_create_order_id} ${response.json()["data"]["records"][0]["orderId"]} + +supplierfocus_get_order_detail + Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} + ${response} Get On Session yytclient /trading-center/seller/get/customer-order-detail/${customer_enquiry_create_order_id} + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code} + Should Be Equal As Strings successful ${response.json()["message"]}