def test_satisfy_discount_ord(self):
     """新增订单促销满折"""
     ord = PromotionManage(self.driver)
     ord.open_promotion_manage()
     ord.click_order_promotion()
     before_add = ord.total_strip() if len(ord.checkbox) != 1 else 0
     ord.add()
     ord.discount()
     ord.condition_num()
     ord.discount_num()
     ord.customer_level()
     ord.save()
     after_add = ord.total_strip()
     self.assertEqual(after_add, before_add + 1)
     logger.info("成功新增订单促销——满折")
 def test_product_discount(self):
     """新增新增商品促销打折"""
     product_pro = PromotionManage(self.driver)
     product_pro.open_promotion_manage()
     product_pro.click_pro_promotion()
     before_add = len(product_pro.checkbox)
     product_pro.add()
     product_pro.open_product_list()
     product_pro.select_product_01()
     product_pro.confirm()
     product_pro.discount()
     product_pro.discount_percent()
     product_pro.customer_level()
     product_pro.save()
     after_add = len(product_pro.checkbox)
     self.assertEqual(after_add, before_add + 1)
     logger.info("成功新增商品促销——打折")
 def test_product_discount_c(self):
     """新增组合促销打折"""
     gro = PromotionManage(self.driver)
     gro.open_promotion_manage()
     gro.click_combine_promotion()
     before_add = gro.total_strip() if len(gro.checkbox) != 1 else 0
     gro.add()
     gro.promotion_title()
     gro.open_product_list()
     gro.select_product_0607()
     gro.confirm()
     gro.gro_discount()
     gro.condition_num()
     gro.discount_num()
     gro.customer_level()
     gro.save()
     after_add = gro.total_strip()
     self.assertEqual(after_add, before_add + 1)
     logger.info("成功新增组合促销——打折")