Arthur-Wu committed this file on 2024-11-21
This commit is contained in:
50
YiMao/ZeroLib/test_CAnon015_.py
Normal file
50
YiMao/ZeroLib/test_CAnon015_.py
Normal file
@ -0,0 +1,50 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 匿名加购计件商品,并结算
|
||||
# @Date:: 2024/11/21
|
||||
import unittest,allure,time
|
||||
from configs.globalObj import LOGGER
|
||||
from YiMao.businessFunc.ClientApiLib import YMClientApi
|
||||
from YiMao.data.WuShangSceneTestData import *
|
||||
|
||||
|
||||
DescName = "Anon015-匿名加购计件商品,并结算"
|
||||
@allure.story(f'[场景测试] {DescName}验证')
|
||||
class Test_CAnon003(unittest.TestCase):
|
||||
f'''@Date:: 2024/11/15
|
||||
@Author:: Arthur Wu
|
||||
@Desc::
|
||||
[购物车客户端] {DescName}
|
||||
1、武商测试环境,计件商品inputcode为:
|
||||
|
||||
'''
|
||||
def setUp(self) -> None:
|
||||
self.timestamp = int(time.time())
|
||||
self.ymc = YMClientApi(ShoppingCartMac)
|
||||
# 会员有优惠商品暂未提供
|
||||
self.vip_goods_inputcode = VipGoodsInputcode # 统一番茄牛肉面
|
||||
|
||||
def test_CAnon003_AddMemberProductsForPurchase(self):
|
||||
allure.dynamic.description(f"描述:{DescName}")
|
||||
allure.step("步骤1:session开始")
|
||||
self.ymc.session_start()
|
||||
allure.step("步骤2:匿名登录")
|
||||
Payload01 = {"action": 0, "isAnon": True}
|
||||
LoginData = self.ymc.login_app_v2(Payload01)
|
||||
allure.step("步骤3:获取商品信息")
|
||||
GoodsInfoData = self.ymc.get_goods_info(self.vip_goods_inputcode)
|
||||
if GoodsInfoData['msg'] != '加购商品不存在':
|
||||
allure.step("步骤4:添加会员有优惠商品")
|
||||
self.ymc.add_cart_goods(GoodsInfoData, 1, LoginData)
|
||||
allure.step("步骤5:获取购物车商品信息")
|
||||
self.ymc.get_cart_goods_info([GoodsInfoData])
|
||||
allure.step("步骤6:请求订单结算")
|
||||
self.ymc.request_order_settlement(LoginData)
|
||||
else:
|
||||
LOGGER.info(f"---商品 {self.vip_goods_inputcode} 不存在")
|
||||
raise AssertionError(f"商品 {self.vip_goods_inputcode} 不存在")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main(verbosity=2)
|
5
YiMao/ZeroLib/test_CAnon016_.py
Normal file
5
YiMao/ZeroLib/test_CAnon016_.py
Normal file
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 加购计件商品,并退购
|
||||
# @Date:: 2024/11/21
|
5
YiMao/ZeroLib/test_CAnon017_.py
Normal file
5
YiMao/ZeroLib/test_CAnon017_.py
Normal file
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 加购计重商品,并结算
|
||||
# @Date:: 2024/11/21
|
5
YiMao/ZeroLib/test_CAnon018_.py
Normal file
5
YiMao/ZeroLib/test_CAnon018_.py
Normal file
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 加购计重商品,并退购
|
||||
# @Date:: 2024/11/21
|
5
YiMao/ZeroLib/test_CAnon019_.py
Normal file
5
YiMao/ZeroLib/test_CAnon019_.py
Normal file
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 加购1件重量待核验商品,无法结算
|
||||
# @Date:: 2024/11/21
|
5
YiMao/ZeroLib/test_CVip015_.py
Normal file
5
YiMao/ZeroLib/test_CVip015_.py
Normal file
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 加购计件商品,并结算
|
||||
# @Date:: 2024/11/21
|
5
YiMao/ZeroLib/test_CVip016_.py
Normal file
5
YiMao/ZeroLib/test_CVip016_.py
Normal file
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 加购计件商品,并退购
|
||||
# @Date:: 2024/11/21
|
5
YiMao/ZeroLib/test_CVip017_.py
Normal file
5
YiMao/ZeroLib/test_CVip017_.py
Normal file
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 加购计重商品,并结算
|
||||
# @Date:: 2024/11/21
|
5
YiMao/ZeroLib/test_CVip018_.py
Normal file
5
YiMao/ZeroLib/test_CVip018_.py
Normal file
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 加购计重商品,并退购
|
||||
# @Date:: 2024/11/21
|
5
YiMao/ZeroLib/test_CVip019_.py
Normal file
5
YiMao/ZeroLib/test_CVip019_.py
Normal file
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 加购1件重量待核验商品,无法结算
|
||||
# @Date:: 2024/11/21
|
5
YiMao/ZeroLib/test_C_.py
Normal file
5
YiMao/ZeroLib/test_C_.py
Normal file
@ -0,0 +1,5 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author:: Arthur Wu
|
||||
# @Description:: 会员登录,领取优惠券
|
||||
# @Date:: 2024/11/21
|
Binary file not shown.
Reference in New Issue
Block a user