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.
46 lines
2.8 KiB
46 lines
2.8 KiB
*** Settings ***
|
|
Library RequestsLibrary
|
|
Library Collections
|
|
Library urllib3
|
|
|
|
*** Test Cases ***
|
|
supplierfocus_save_paper_manufacturer
|
|
Disable Warnings
|
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
|
|
${body} Set Variable {"name":"${paper_manufacturer_name}","shortName":"${paper_manufacturer_shortName}","description":"${paper_manufacturer_description}","logoImg":"${paper_manufacturer_logoImg}"}
|
|
${response} POST On Session yytclient /trading-center/save/paper-manufacturer ${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
|
|
|
|
supplierfocus_get_paper_manufacturer_list
|
|
Disable Warnings
|
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
|
|
${response} Get On Session yytclient /trading-center/get/paper-manufacturer/list
|
|
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 ${paper_manufacturer_name} ${response.json()["data"]["records"][0]["name"]}
|
|
${paper_manufacturer_id} Get From Dictionary ${response.json()["data"]["records"][0]} id
|
|
Set Global Variable ${paper_manufacturer_id}
|
|
|
|
supplierfocus_search_paper_manufacturer
|
|
Disable Warnings
|
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
|
|
${param} Set Variable searchValue=${paper_manufacturer_name}
|
|
${response} Get On Session yytclient /trading-center/get/paper-manufacturer/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 ${paper_manufacturer_name} ${response.json()["data"]["records"][0]["name"]}
|
|
Should Be Equal As Strings ${paper_manufacturer_id} ${response.json()["data"]["records"][0]["id"]}
|
|
|
|
supplierfocus_edit_paper_manufacturer
|
|
Disable Warnings
|
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
|
|
${body} Set Variable {"id":"${paper_manufacturer_id}","name":"${paper_manufacturer_name}","shortName":"${paper_manufacturer_shortName}","description":"${paper_manufacturer_description}","logoImg":"${paper_manufacturer_logoImg}"}
|
|
${response} POST On Session yytclient /trading-center/save/paper-manufacturer ${body.encode("utf8")}
|
|
log ${response.json()}
|
|
Should Be Equal As Numbers 200 ${response.status_code}
|
|
Should Be Equal As Strings successful ${response.json()["message"]}
|