云印通原纸商城
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.
 
 

95 lines
6.9 KiB

*** Settings ***
Library RequestsLibrary
Library Collections
Library urllib3
*** Test Cases ***
operate_save_apply_credit_qniao
Disable Warnings
Create Session yytops ${yytops} headers=${operationpsc_header}
${body} Set Variable {"creditLine":${printing_packaging_factory_credit_qniao_save_creditLine},"enterpriseId":"${printing_packaging_factory_id}","enterpriseName":"${printing_packaging_factory_name}","enterpriseType":${printing_packaging_factory_credit_qniao_save_type},"legalpersonIdNo":"${printing_packaging_factory_legalpersonidcardno}","legalpersonMobile":null,"legalpersonName":"${printing_packaging_factory_legalpersonname}","purpose":${printing_packaging_factory_credit_qniao_save_purpose},"remark":"${printing_packaging_factory_credit_qniao_save_remark}","paperSettlementIntervalTypeId":"${printing_packaging_factory_credit_qniao_save_paperSettlementIntervalTypeId}"}
${response} POST On Session yytops /cloud-print-user-center/admin/credit/application/save/application ${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_get_credit_list
Disable Warnings
Create Session yytops ${yytops} headers=${operationpsc_header}
${response} Get On Session yytops /cloud-print-user-center/admin/credit/application/get/application-order-list
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
operate_get_credit_list_search
Disable Warnings
Create Session yytops ${yytops} headers=${operationpsc_header}
${param} Set Variable timeBegin=${current_date} 00:00:00&timeEnd=${current_date} 23:59:59&enterpriseName=${printing_packaging_factory_name}&legalpersonName=${printing_packaging_factory_legalpersonname}
${response} Get On Session yytops /cloud-print-user-center/admin/credit/application/get/application-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"]}
${printing_packaging_factory_credit_id} Get From Dictionary ${response.json()["data"]["records"][0]} id
Set Suite Variable ${printing_packaging_factory_credit_id}
operate_verify_reject_apply_credit_qniao
Disable Warnings
Create Session yytops ${yytops} headers=${operationpsc_header}
${printing_packaging_factory_verify_status} Set Variable 2 #审核状态 1审核通过 2审核驳回
${body} Set Variable {"status":${printing_packaging_factory_verify_status}}
${response} Put On Session yytops /cloud-print-user-center/admin/credit/application/verify/application-order/${printing_packaging_factory_credit_id} ${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_update_apply_credit_qniao
Disable Warnings
Create Session yytops ${yytops} headers=${operationpsc_header}
${body} Set Variable {"id":"${printing_packaging_factory_credit_id}","creditLine":${printing_packaging_factory_credit_qniao_edit_creditLine},"enterpriseId":"${printing_packaging_factory_id}","enterpriseName":"${printing_packaging_factory_name}","enterpriseType":${printing_packaging_factory_credit_qniao_edit_type},"legalpersonIdNo":"${printing_packaging_factory_legalpersonidcardno}","legalpersonMobile":null,"legalpersonName":"${printing_packaging_factory_legalpersonname}","purpose":${printing_packaging_factory_credit_qniao_edit_purpose},"remark":"${printing_packaging_factory_credit_qniao_edit_remark}","paperSettlementIntervalTypeId":"${printing_packaging_factory_credit_qniao_edit_paperSettlementIntervalTypeId}"}
${response} POST On Session yytops /cloud-print-user-center/admin/credit/application/update/application ${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_verify_pass_apply_credit_qniao
Disable Warnings
Create Session yytops ${yytops} headers=${operationpsc_header}
${printing_packaging_factory_verify_status} Set Variable 1 #审核状态 1审核通过 2审核驳回
${body} Set Variable {"status":${printing_packaging_factory_verify_status}}
${response} Put On Session yytops /cloud-print-user-center/admin/credit/application/verify/application-order/${printing_packaging_factory_credit_id} ${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_get_credit_list_details
Disable Warnings
Create Session yytops ${yytops} headers=${operationpsc_header}
${response} Get On Session yytops /cloud-print-user-center/admin/credit/get/enterprise-credit-list
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
operate_get_credit_list_details_search
Disable Warnings
Create Session yytops ${yytops} headers=${operationpsc_header}
${param} Set Variable enterpriseName=${printing_packaging_factory_name}&legalpersonName=${printing_packaging_factory_legalpersonname}
${response} Get On Session yytops /cloud-print-user-center/admin/credit/get/enterprise-credit-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 ${printing_packaging_factory_name} ${response.json()["data"]["records"][0]["enterpriseName"]}
${printing_packaging_factory_credit_details_id} Get From Dictionary ${response.json()["data"]["records"][0]} id
Set Suite Variable ${printing_packaging_factory_credit_details_id}
operate_get_credit_list_details_list
Disable Warnings
Create Session yytops ${yytops} headers=${operationpsc_header}
${response} Get On Session yytops /cloud-print-user-center/admin/credit/order/get/order-list/${printing_packaging_factory_credit_details_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 Integers ${printing_packaging_factory_credit_qniao_save_creditLine} ${response.json()["data"]["records"][0]["currentCreditLine"]}