Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
test
autotest-airtest-web-cmdc
Commits
d29404f4
Commit
d29404f4
authored
Feb 04, 2024
by
liguangyu06
Browse files
优化
parent
8c67fab2
Changes
3
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_buyercar_list/通过Excel复制添加商品-添加成功.air/通过Excel复制添加商品-添加成功.py
View file @
d29404f4
...
...
@@ -31,7 +31,8 @@ result_body_user_websites = requests.post(url_user_websites, json=request_body_u
result_body_user_websites
=
json
.
loads
(
result_body_user_websites
.
content
)
# 获取站点对应的id
company_id
=
result_body_user_websites
[
"data"
][
3
][
"companyId"
]
company_id
=
result_body_user_websites
[
"data"
][
2
][
"companyId"
]
# print(company_id)
# 第三步切换至站点
url_switch_website
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url_switch_website"
)
...
...
@@ -47,10 +48,11 @@ request_body_website_product = commonFuc().get_business_data(module, "payload_we
# 发送请求
result_body_website_product
=
requests
.
post
(
url_website_product
,
json
=
request_body_website_product
,
headers
=
headers
)
result_body_website_product
=
json
.
loads
(
result_body_website_product
.
content
)
# print(result_body_website_product)
# 获取站点的商品信息
product_code
=
result_body_website_product
[
"data"
][
"list"
][
0
][
"productcode"
]
# 第五步获取通过Excel复制添加商品
# 获取通过Excel复制添加商品接口地址
url_batch
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url_batch"
)
...
...
data/cmdc_buyercar_list/data
View file @
d29404f4
...
...
@@ -185,8 +185,8 @@ checkDict3: {"success":true,"code":"200","message":"OK","data":"ok"}
#新增跨站点商品至购物车
"payload300": {"currentCompanyId":
6
,"productId":
7892
,"quantity":1,"agreementPriceId":0,"price":
1879
,"filialeCode":"001
11
"}
"payload301": {"currentCompanyId":
3
,"productId":
25769
,"quantity":1,"agreementPriceId":0,"price":
69
,"filialeCode":"0010
3
"}
"payload300": {"currentCompanyId":
3
,"productId":
23380
,"quantity":1,"agreementPriceId":0,"price":
3980
,"filialeCode":"001
03
"}
"payload301": {"currentCompanyId":
7
,"productId":
9144
,"quantity":1,"agreementPriceId":0,"price":
1707.71
,"filialeCode":"0010
2
"}
#预期结果
checkDict300: {"success":true,"code":"200","message":"OK","data":"ok"}
...
...
data/cmdc_special_fresenius_group/data
View file @
d29404f4
...
...
@@ -254,8 +254,6 @@ checkDict38: {"productCode": "10173127"}
"url_website": "/user/mall/switchWebsite"
"payload_website": {"companyId":6,"companyCode":"00111"}
#测试场景:验证特价单品商品详情页面,显示特价信息
#获取特价单品信息
"payload40": {"groupCode":"","groupName":"","productCode":"","productInfo":"","materialCode":"","manufacturerList":[],"productLineName":"","description":"","manufacturerProductDesc":"","manufacturerProductNo":"","customerCode":"","customerName":"","manufacturerUserNo":"","manufacturerUserDesc":"","documentNo":"特价单品验证毋动","groupType":1,"groupPriceStatus":null,"pageStart":1,"pageSize":8}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment