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
1a33728e
Commit
1a33728e
authored
Nov 09, 2023
by
liguangyu06
Browse files
用例优化
parent
085ac411
Changes
2
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_special_fresenius_group/特价单品_加入购物车_购物车展示.air/特价单品_加入购物车_购物车展示.py
View file @
1a33728e
...
...
@@ -60,25 +60,10 @@ for i in result["data"]["list"]:
if
i
[
"companyCode"
]
==
"00111"
:
for
j
in
i
[
"list"
]:
if
j
[
"buyerCartId"
]
==
19177
:
result
=
{
"groupPrice"
:
j
[
"groupPrice"
],
"timeStr"
:
j
[
"timeStr"
],
"documentNo"
:
j
[
"documentNo"
]}
result
=
{
"groupPrice"
:
j
[
"groupPrice"
],
"timeStr"
:
j
[
"timeStr"
],
"documentNo"
:
j
[
"documentNo"
],
"buyCartNum"
:
5
}
print
(
result
)
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict_buyercart"
)
# # 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
data/cmdc_special_fresenius_group/data
View file @
1a33728e
...
...
@@ -265,14 +265,14 @@ checkDict42: {"purchaseQuantity":5}
#测试场景:特价单品加入购物车验证以及购物车展示
"url43": "/product/mall/addBuyerCart"
"payload43": {"freseniusList":[{"currentCompanyId":6,"pSign":0,"productId":7438,"quantity":
1
,"agreementPriceId":0,"price":"101.0000","filialeCode":"00111","installedDate":null}],"groupProductType":1,"groupId":501,"currentCompanyId":6,"productId":7438,"pSign":0,"quantity":
1
,"agreementPriceId":0,"price":101,"filialeCode":"00111"}
"payload43": {"freseniusList":[{"currentCompanyId":6,"pSign":0,"productId":7438,"quantity":
5
,"agreementPriceId":0,"price":"101.0000","filialeCode":"00111","installedDate":null
,"splitQuantity":5
}],"groupProductType":1,"groupId":501,"currentCompanyId":6,"productId":7438,"pSign":0,"quantity":
5
,"agreementPriceId":0,"price":101,"filialeCode":"00111"}
#预期结果
checkDict43: {"success":true,"code":"200","message":"OK","data":"ok","freshToken":null}
#购物车列表
"url_buyercart": "/product/mall/queryTotalBuyerCartList"
"payload_buyercart": {"productName":"","materialCode":"","manufacturer":"","licenseCode":"","timeSortStatus":0,"pageSize":100,"pageStart":1}
#预期结果
checkDict_buyercart: {"groupPrice": 101.0, "timeStr":"2023-11-09至2031-12-31", "documentNo":"特价单品验证毋动"}
checkDict_buyercart: {"groupPrice": 101.0, "timeStr":"2023-11-09至2031-12-31", "documentNo":"特价单品验证毋动"
,"buyCartNum": 5
}
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